Development discussions around Shopify APIs
We see a situation fairly often across a variety of customers where for whatever reason, a variant ID is removed after the order is placed but before we add the fulfillment. Here's the most recent example:
```
REQUEST:
--------------------------------
{
"fulfillment": {
"location_id": 49470292,
"notify_customer": true,
"status": "success",
"tracking_numbers": [
"**************"
],
"tracking_urls": [
"https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=************"
],
"line_items": [
{
"id": 6574869840033,
"quantity": 2
}
],
"tracking_company": "USPS"
}
}
RESPONSE:
--------------------------------
{
"errors": "Not Found"
}```
Posted to /admin/api/2020-10/orders/3178684776609/fulfillments.json
(Request ID ff18a979-ba2f-49aa-ac75-8a4a2d70323a)
I've confirmed that the location ID is valid and the line item ID is valid, but the variant ID on this line item isn't valid anymore so the location can't be mapped (went to variants/453479609.json). We try to do this dynamically and because the variant ID isn't found, we just use the default location ID. I think it's failing because the internal lookup of line item -> variant -> inventory item -> location can't be managed.
What advice do you have for situations like this? We see it a lot and it seems unfair to keep the entire fulfillment from posting because the customer rearranged their variants and some old ones got wiped out.
Other Request ID's on this store with the same issue:
72891646-9c18-4a58-b129-6ec3d53edb97
9b32fea2-aac8-4146-a5f1-1cef1d767c07
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023