Update tracking/carrier via API Fulfillment

Highlighted
Tourist
44 0 2

Hi Guys,

I want to be able to update unfulfilled and fulfilled Shopify sales orders with tracking number, carrier name and ship date.  This is my json:

{
  
    "fulfillment": [
      {
         "created_at": "2012-03-13T16:09:54-04:00",
         "order_id": 1103492775994,
         "location_id": 11437473850,
         "tracking_company": "UPS",
         "tracking_number": "92612999937200573000127766",
         "updated_at": "2018-12-31T14:22:25-04:00",
         "tracking_urls": null,
         "status": success
      }
    ]
    
}

Once sent with API credentials, I get a 200 response OK.  But when I check the contents of the GET on this order, the fulfillment block is empty.  Not sure what I am doing wrong....

0 Likes
Highlighted
Shopify Partner
1840 177 711

Hi,

I am going to assume you are doing this on an order endpoint directly trying to write its fulfillment property.

Instead, you need to use the fulfillment API endpoint such as

POST /admin/orders/<ORDER_ID>/fulfillments.json

Hope this helps!

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
Highlighted
New Member
1 0 0

Hello @KarlOffenberger ,

 

I don't have any worries when I POST a Fulfillment on the end point you mention, however if I ever want to update one of those elements:

  • tracking_number
  • tracking_url
  • tracking_company

 

Then I get the error response from Shopify:

"Request failed with HTTP Code 406."

It seems that it won't accept those kind of modifications. The end point I use is as in the documentation:

So does it mean that once you have POST a Fulfillment corresponding to one order, then you can only PUT a new tracking_number but nothing else?

Have been trying for a while now and am getting confused, any help would be much appreciated.

 

Cheers!

0 Likes