Re: Using POSTMAN to test updating order tracking with new Fulfillment Order API

Using POSTMAN to test updating order tracking with new Fulfillment Order API

FLSDBH
New Member
4 0 0

Has anyone used POSTMAN to test updating the tracking formation on a Shopify order using the POST – Updates the tracking information for a fulfillment order method in the Shopify Fulfillment endpoint?
I’m trying to migrate from our old Shopify Fulfillment API to the newer FulfillmentOrders. I can get order information in POSTMAN using this url:
https://{{APIKey}}:{{PW}}@{{StoreId}}.myshopify.com/admin/orders/{{OrderID}}/fulfillment_orders.json
But when I try to update the tracking information using the new API call:
https://{{APIKey}}:{{PW}}@{{StoreId}}.myshopify.com/admin/api/2023-07/fulfillments/{{Fulfillmentid}}/update_tracking.json
with this body in json format:
{
"fulfillment": {
     "notify_customer": true,
     "tracking_info": {
          "number": "1234567890",
          "company": "USPS"
        }
    }
}
it returns this error:
{
   "errors": "Not Found"
}
With no other details like what was not found. I have verified that I’m using the fulfillment order number and not the Shopify order number and all other variables like APIKEY, API-Password, and Store.
For reference, this is the old call I used and was working up till 7/5/2023:
https://{{APIKey}}:{{PW}}@{{StoreId}}.myshopify.com/admin/api/2023-01/orders/{{OrderID}}/fulfillments.json
with this body in json format:
{
"fulfillment":{
   "location_id":123456789,
   "tracking_number":"9999999999",
   "tracking_company":null,
   "line_items":null,
   "notify_customer":true
   }
}

 

Thanks in advance for any help or guidance on this issue.

Replies 3 (3)

ctsai
Shopify Partner
4 0 0

Hi @FLSDBH 

 

You can try using this endpoint: 'admin/api/2023-07/fulfillments.json' and then including the fulfillment order id in the body under "line_items_by_fulfillment_order"

 

So the body would look something like this:

{
"fulfillment": {
     "notify_customer": true,
     "tracking_info": {
          "number": "1234567890",
          "company": "USPS"
        }

    "line_items_by_fulfillment_order":{
        "fulfillment_order_id": YOUR FULFILLMENT ORDER ID

    }

  }
}

FLSDBH
New Member
4 0 0

Thanks for the help and advice.  I was able to get your solution to work in POSTMAN with one exception.  I enclosed the fulfillment_order_id in brackets "[]". However, when I execute it in my C# application, I get an error response "Response: {"errors":["Fulfillment payloads fulfillment order must be greater than 0"]}".  I googled the error and others indicated that I need to add the line-item ID #'s and quantity. But the "Official" documentation doesn't indicate that the ID#'s and quantities are needed.  If anyone from Shopify REST development is monitoring, can you please respond with advice?

FLSDBH
New Member
4 0 0

I found my error in my C# code, the JSON body needs to be in lowercase and I had used upper case for some of the element names.  Once I set all element names to lower case, no more fulfillment  payload error.