Search code examples
shopifyshopify-apishopify-storefront-api

Shopify Fulfillment rest api integration "Required parameter missing or invalid"


My Payload Data is:

{
"fulfillment": {
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": $orderID
}
],
"tracking_info": {
"number": $trackingID,
"url": "https://ship.nimbuspost.com/shipping/tracking/". $trackingID
}
}
}

My API Response is:

{
"errors": {
"fulfillment": "Required parameter missing or invalid"
}
}

Not able to identify the missing parameter. please help me to identify the missing parameter.


Solution

  • You cannot fulfill an order with a tracking number. To successfully fulfill and order, you need the Shopify Order ID. With that, you usually operate off of Shopify Fulfillment Orders. These also have ID you should be using. Once you try to fulfill a Fulfillment Order, you specify the line item to fulfill, with a quantity. Note that at this point, you can also provide a tracking number to be applied.

    You seem to be skipping an awful of the crucial information needed. Perhaps try your efforts using a proper GraphQL query in Shopify GraphiQL, or, if you are stuck with RestAPI, ensure you match their parameters as they are clearly listed in the Fulfillment Endpoint docs.