Discussing APIs and development related to customers, discounts, and order management.
Solved! Go to the solution
This is an accepted solution.
Looks like shopify has fixed the issue on their end
Hi Sengming, I'm experiencing the same issue. Did you find a solution for this?
Nope! No solution yet unfortunately, just a bunch of angry customers =(
I'll keep the thread updated if I find anything.
Hi Sengming,
Can you check if there is correct shipping rates and options enabled for this order / address as well as that the variants are in available in stock?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
> Can you check if there is correct shipping rates and options enabled for this order / address
I'm not totally sure what this means. The shipping line and shipping address is set correctly for this order. Was there anything else you were looking for?
> as well as that the variants are in available in stock?
Yes the variants are in stock.
Note that the draft order from the original post has been completed. Here's another example
Request
PUT /admin/api/2023-07/draft_orders/1167951200505/complete.json HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 0
Content-Type: application/json
User-Agent: HTTPie/3.2.2
Response X-Request-ID: 154ce9d2-0a10-47be-abbe-18dd10875d84
HTTP/1.1 422 Unprocessable Entity
X-Request-ID: 154ce9d2-0a10-47be-abbe-18dd10875d84
{
"errors": "Product variant not found., Your cart has been updated and the items you added can’t be shipped to your address. Remove the items to complete your order., and Your payment couldn’t be processed because your order total has changed. Check your order total and try again."
}
This is what the variant looks like
{ "id": 40086113714360, "title": "6XL", "price": "65.00", "sku": "1089-01-6XL", "position": 6, "inventory_policy": "deny", "compare_at_price": null, "fulfillment_service": "manual", "inventory_management": "shopify", "option1": "6XL", "option2": null, "option3": null, "created_at": "2021-07-19T17:20:01+08:00", "updated_at": "2024-01-04T21:43:10+08:00", "taxable": true, "barcode": "1089-01-6XL", "grams": 400, "image_id": 39255650664697, "weight": 400, "weight_unit": "g", "inventory_item_id": 42180516479160, "inventory_quantity": 51, "requires_shipping": true, "admin_graphql_api_id": "gid://shopify/ProductVariant/40086113714360" },
The shipping has also been set on the draft order
Additional details:
- Users of our app have successfully completed the same affected draft orders from their dashboard, it looks like it's not working from the API side only.
- One user was using a different Shopify app that could complete the same draft order as well.
- We're starting to see partial successes on all the affected orders when attempting re-complete the orders, the pattern looks random so far to us.
Hi Sengming, I'm also experiencing the same issue. Any new ideas?
no new ideas yet! How about you? I'll keep this thread updated as if I learn anything.
We have also started getting this error via the API. Also it isn't consistent, seems to be happening to few requests intermittently, then those draft orders will keep throwing the same error.
I can confirm that no settings have been changed, this randomly started to pop up.
We're experiencing same issue, we can't complete any draft order since yesterday because of the error 'Product variant not found'.
There is nothing changed from our side, but Shopify suddenly returns the error since yesterday.
@Liam Is there any breaking change introduced by Shopify side recently?
Same issue since yesterday. This is the API response:
{
"errors": "Product variant not found. and Product variant not found."
}
x-request-id: d6370096-7df0-4a67-8b21-edced0da6032
@LiamI have tested with different api versions but get the same error. No changes have been made on our end recently. It started throwing this error yesterday out of the blue. Also can confirm that all items in the order are available in stock.
Hi folks - it's possible that this issue is occurring due to variants being missing from a catalogue, can you check that all product variants are part of a catalogue?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
There is no "catalogs" option under products as mentioned in the link you shared and I don't think we have ever created one.
I checked the sales channels to which the products in the order were published and sure enough, two of them were not published to the custom app which I was using for calling shopify API. After publishing them to the app channel, the API call succeeded. Thanks for the help! Though I am not sure why this has started cropping up all of a sudden.
Thanks for the tip! And I am glad it is working for you.
Unfortunately my app is not a sales channel app so it doesn't work for me.
Could it be that some items in your order are not published to the online store channel?
This is an accepted solution.
Looks like shopify has fixed the issue on their end
Hi Ranjan,
Correct - we shipped a fix for this on Friday
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog