What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Help Needed: Putting Shopify Order on Hold via Postman - Encountering Errors

Help Needed: Putting Shopify Order on Hold via Postman - Encountering Errors

arturooro10
Visitor
2 0 0

Hi everyone,

I need some help with putting an order on hold using Postman. I'm currently working on a project where, if a postal code is incorrect, I want to put the order on hold to verify it with the customer.

I've been using some documentation, but I'm encountering errors and can't seem to get it right. Here's what I've done so far:

  1. I used the Shopify API documentation to set up my Postman request.
  2. I've made sure to include the necessary headers and authentication.
  3. However, I'm getting an error and the order isn't being put on hold.

Has anyone successfully done this before? Could you provide a detailed example or point out what I might be doing wrong?

Thanks in advance for your help!


{
  "query": "mutation fulfillmentOrderHold($fulfillmentHold: FulfillmentOrderHoldInput!, $id: ID!) { fulfillmentOrderHold(fulfillmentHold: $fulfillmentHold, id: $id) { fulfillmentOrder { id status requestStatus fulfillmentHolds { reason reasonNotes } } userErrors { field message } } }",
  "variables": {
    "fulfillmentHold": {
      "notifyMerchant": true,
      "reason": "INVENTORY_OUT_OF_STOCK",
      "reasonNotes": "Waiting on new shipment"
    },
    "id": "gid://shopify/FulfillmentOrder/13969017503969"
  }
}
{
    "data": {
        "fulfillmentOrderHold": {
            "fulfillmentOrder": null,
            "userErrors": [
                {
                    "field": [
                        "id"
                    ],
                    "message": "Fulfillment order does not exist."
                }
            ]
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 11,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 2000.0,
                "currentlyAvailable": 1990,
                "restoreRate": 100.0
            }
        }
    }
}
Replies 2 (2)

SomeUsernameHe
Shopify Partner
517 57 110

I think your issue is here:

 "id": "gid://shopify/FulfillmentOrder/13969017503969"

 

If we check the Shopify docs for Global ID's we don't see a 'FulfillmentOrder' object. Maybe try 'Fulfillment '

Documentation: https://shopify.dev/docs/api/usage/gids

Have I helped? Consider putting coffee in my mouth!
Buy Me a Coffee

Eric-HAN
Shopify Partner
255 29 27

Hi  ,there

The error has already prompted the error.  "message": "Fulfillment order does not exist."

you could use the query graphql to query your available ids first .

query {
  fulfillmentOrders(first: 10) {
    nodes {
      id
    }
  }
}

 

- Helpful? Please hit Like and mark it as a solution
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me    Buy Me A Coffee