Unable to Claim Inventory while creating order


curl -X POST "https://[SHOP_DOMAIN]/admin/api/[API_VERSION]/graphql.json?use_case=orderCreate" \
  -H "Content-Type: application/json" \
  -H "X-Shopify-Access-Token: [ACCESS_TOKEN]" \
  -d '{
    "query": "mutation OrderCreate($order: OrderCreateOrderInput!, $options: OrderCreateOptionsInput) { orderCreate(order: $order, options: $options) { userErrors { field message } order { id name } } }",
    "variables": {
      "order": {
        "billingAddress": {
          "address1": "[REDACTED_ADDRESS]",
          "address2": "",
          "city": "[REDACTED_CITY]",
          "country": "India",
          "firstName": "[REDACTED_FIRST_NAME]",
          "lastName": "[REDACTED_LAST_NAME]",
          "phone": "[REDACTED_PHONE]",
          "province": "[REDACTED_STATE]",
          "zip": "[REDACTED_ZIP]"
        },
        "discountCode": {
          "itemFixedDiscountCode": {
            "amountSet": {
              "shopMoney": {
                "amount": "119.90",
                "currencyCode": "INR"
              }
            },
            "code": "[REDACTED_DISCOUNT_CODE]"
          }
        },
        "email": "[REDACTED_EMAIL]",
        "lineItems": [
          {
            "quantity": 1,
            "requiresShipping": true,
            "variantId": "gid://shopify/ProductVariant/[VARIANT_ID]",
            "properties": []
          }
        ],
        "customAttributes": [],
        "metafields": [],
        "note": null,
        "phone": "[REDACTED_PHONE]",
        "shippingAddress": {
          "address1": "[REDACTED_ADDRESS]",
          "address2": "",
          "city": "[REDACTED_CITY]",
          "country": "India",
          "firstName": "[REDACTED_FIRST_NAME]",
          "lastName": "[REDACTED_LAST_NAME]",
          "province": "[REDACTED_STATE]",
          "zip": "[REDACTED_ZIP]"
        },
        "tags": "order_failed",
        "taxesIncluded": false,
        "test": false
      },
      "options": {
        "inventoryBehaviour": "DECREMENT_OBEYING_POLICY",
        "sendReceipt": false,
        "sendFulfillmentReceipt": false
      }
    }
  }'

This is the curl we are hitting, please let us know if anyone else is also facing this issue & insights on how to solve this?

3 Likes

I confirm that we’ve been experiencing the same issue over the past two days.

What’s strange is that if we resubmit the exact same request multiple times, it eventually works, even though nothing changes in the request or the inventory.

Also for same request the error message is not consistent, sometimes it is “Unable to Claim Inventory” and sometimes “Unable to reserve inventory”.

@Parth_Arora can you please confirm which API version you are in?

Hi @Parth_Arora,

Since you’re passing, "inventoryBehaviour": "DECREMENT_OBEYING_POLICY", this can be expected behaviour that the inventory is not claimed if there is no inventory available based on the product variant’s inventory policy.

If the variant’s inventory policy is set to DENY then the product inventory won’t be claimed and decremented if the inventory is out of stock.

You can prevent this from occurring by passing: "inventoryBehaviour": "DECREMENT_IGNORING_POLICY" in the OrderCreate mutation, and it will automatically decrement and claim the inventory regardless if the product is out of stock or not.

If you have a specific example where this occurred unexpectedly, with a product that was in stock and should have been claimed, we will need a specific example to look into further, if you can provide the full HTTP Response from such call, specifically the HTTP body showing the error, and the HTTP x-request-id Header for us to find the call in our internal logs, we can then help look into this further.

Hi @Kellan-Shopify,

Will share the x-request-id shortly, but to answer your questions the product had quantity available but on placing order using DECREMENT_IGNORING_POLICY, the shopify admin order page showed a warning that the product might be out of stock but that was not the case.

link of the issue

Also what @ayoub mentioned is spot on.

Hi, I can confirm we have been running into the same issue for the last 3 days or so. I am using admin graphql createOrder mutation, version 2025-01. I can GUARANTEE you the item has inventory. This feels like a delay on variant availability being updated with a delay or something upon inventory/variant creation. could that be the case / a recent bug on Shopify?

Also confirming:

  • The variant is included in a valid location/shipping profile.
  • Rates are set
  • and location is able to fulfill orders

Hi @Parth_Arora,

it’s difficult to help troubleshoot this behaviour over the community forums as we would need to look into the details of the specific inventory item, and store shipping settings to be able to fully troubleshoot. Since we are not authenticated and can’t discuss the details of specific stores via the Community Forums, I would recommend reaching out to our Shopify Support Team via the Shopify Help Center, so we can look into and discuss the details of the store with you in an authenticated support interaction.

That said, since the product is setup for shipping via the Podar Arced varccha location as displayed in your screen recording, I would recommend reviewing the following on the store:

  1. Check the Location Settings, to ensure that the location is set to fulfill online orders

  2. Check that the product is included in a shipping profile, that also has shipping rates setup for the location in question

@Kellan-Shopify Here are the request ids:
9f2701ef-4998-4f09-9ec1-c11a6de8cbbb-1769111669
b1ae819b-2b3b-4f9f-9492-88231b075945-1769111719
7b634fd6-27e1-4052-81bc-6956ba9b3507-1769111717
ef2a54f5-cbf3-48a7-8ec5-9348af9f3e9b-1769111711
908fcd2f-a071-4033-89b9-918df3069e8c-1769111697
2d9990e5-342a-471a-9808-60f25a655686-1769111690
d7cc07b6-2dc9-4d20-9dd6-1eab37afc23d-1769111689

1:28

92f4f027-5ec2-4d33-9e8e-6c74cfa93c26-1769111855
7b206804-3196-44b2-9369-6b0ff60e2635-1769111834
e0e07d31-efb0-41b3-ae84-55979e444df3-1769111827

Hi Kellan-

We are also seeing this issue- I’ve looked at all our settings and examined payloads. Nothing has changed on our side and we are seeing this issue across many shops. Notably, the issue stopped for us completely at 12:20 am ET Thursday, and started up again at 10:34 am ET, also today. Looks like something changed at Shopify, was rolled back, and was changed again this morning.

1 Like

@Kellan-Shopify : same issue foun from our end too. we have checked all the location and shipping profile settings thoroughly. the issue seems to be intermittent (happening on certain orders) and the same orders go through sometimes when retried with exact same payload which is super weird.

2 Likes

Hi Everyone ( @here ),

Thank you for sharing the examples and confirming the issue has been occurring for you as well. I’ve looked into this further and I can confirm that this is actually a known issue that our developers are currently investigating with inventory allocation at checkout/order creation, and they are working on a fix for this at this very moment.

The impact of this issue was not large enough to warrant an update of the Shopify Status page, so if the behaviour is still occurring for you in a few hours, I’d recommend reaching out to Shopify Support directly via the Help Center, with specific recent examples, and our Support Team can help look into the examples and the incident to confirm if the incident has been resolved, and if your cases are related to the incident or due to other store related settings and behaviours as I mentioned in my previous post.

In the meantime, I may recommend retrying the order creation if you receive the error as it is seemingly intermittent at this time.

I can confirm that we are also facing exactly same issue with users in our app.

During the past few days, the user has been constantly reporting this error. Retrying the request with the same parameters is actually allowing us to create an order. But it’s not always work. So merchants need to click a button to manually trigger order importing.

We see that error more often when we need to create a batch of orders (not a single one), in this case few orders from the batch can’t be imported and need to be re-created.

Is there any suggestion what other options we have to solve this issue on our end (other than re-try operation)? And maybe you have any ETA when we can expect the issue to be solved on the Shopify side.

Sorry for bothering you, but we are constantly receiving customer requests with that issue, and produce extra work for us and for merchants (who need to control order creation flow).

For past similar cases in the past, suggestion solution was to update to a newer Shopify api version. Would it help in the current case?

Thank you in advance for your help.

2 Likes

@Kellan-Shopify : can you confirm on the current status of the fix? is this resolved now?

We are seeing the same issue here, it happened again a few minutes ago. Is there any update?

1 Like

I am also facing exactly same issue, I have lot of customers in hudreds connecting to me regarding this issue.
Is there any update or ETA on when will this be fixed?

This is causing huge problem for us.
Note: I am using 2025-01 Graphql API and inventoryBehaviour as DECREMENT_OBEYING_POLICY

@Kellan-Shopify

We encountered the same issue at the same time, and our merchants have reported this problem multiple times.

We have confirmed that the variant is in stock and available for sale. However, after multiple retries, the same “Unable to claim inventory” error is still returned.

We hope Shopify can fix this issue as soon as possible.

@here,

I’ve been discussing this with our developers further, who are continuing to investigate and work on a fix for this issue at this time.

Though we have no estimated timeframes for when this will be resolved, I can assure you our developers are working on this as quickly as possible, with the highest priority given the scope of the issue.

We have also added this to the public Shopify Status page, you can review this for any updates on when this issue is resolved:

Unfortunately there are no known workarounds at this time, other than retrying the request, and as we do have this issue listed in the public Shopify Status page for updates I’ll go ahead and close this thread for now.

If you have any specific examples and wanted to confirm if they were related to the incident or not, please do reach out to Shopify Support via the Shopify Help Center, and our support team can help review the shipping and inventory settings on the store to confirm if there’s any expected explanations for the errors, or if it’s related to this issue.

Still very much encountering this bug - it is particularly prevalent on orders with lots of line items (5+) and retrying, even 3 times, seems to still result in order create failure - particularly on these large carts.

All items are in stock in the target market (100+) - creating a draft order then converting that into an actual order works fine but creating the order directly via graphql results in these erratic INVENTORY_CLAIM_FAILED errors.

Hi @AMB,

I can confirm that the incident described above was resolved as of January 23rd, if you have any new examples of this error occurring, I would recommend reaching out to our support team via the Shopify Help Center, while logged into an account that has access to the specific store/app where the error is occurring, and we can help look into specific examples in a fully authenticated support interaction and help determine if this is the same issue described above, or if there’s something else happening in your case.

When reaching out, please have the following details ready from an API call returning the error within the last 30 days.

  • The full plain text HTTP Request, including URL, Body, and Headers (no access tokens)
  • The full plain text HTTP Response, including Body and Headers