- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Unexpected v1 GUIDs returned in item_variation_id with call to RetrievePayment
I'm working on report building system based off items sold. I have a site that handles the PAYMENT_UPDATED webhook.
That page sends the entity_id (paymentId) to the v1 RetrievePayment API to get the details of the transaction.
I then parse through the itemizations collection to look at each item sold in a transaction.
For each item, I grab item_detail->item_variation_id and send that off to v2 RetrieveInventoryCount to get the current inventory for that item after the sale.
This all works great (thanks for these APIs, by the way!) and has been running for a few weeks with no problems. But yesterday, I noticed a problem. Some of the items in my catelog are showing a v1 GUID in itemizations->item_detail->item_variation_id in the data retrieved from RetrievePayment.
The problem item's variations all have valid v2 item_variation_ids. But looking at their parent item with v2 RetrieveCatalogObject, I can see these problem variations also have at catalog_v1_ids collection that is not present in other items.
Questions:
1 - why are the v2 item_variation_ids not getting returned in RetrievePayment for these items like they are for everything else in my catalog (so far)?
2 - Is there are a way for me to stop this from happening? Assuming it's the source of the problem, is there a way for me to remove the catalog_v1_ids collection from these variations?
Also - I know I can code around this problem by making a series of other API calls when I detect a v1 GUID in item_variation_id but I would rather not take that approach unless there are no other options available to me.
Thank you in advance for any help you can offer.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Hey @UglyBaby!
We would recommend reaching out to our API team directly for assistance with this because we're not really versed in this on our team.
You can Contact Us by email and someone on our Customer Success team can help directly connect you with one of our API team members.
Thanks for understanding!
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report