Unable to Create Fulfillments Using the ShopifyAPI

Highlighted
New Member
4 0 0

I'm currently attempting to create fulfillments for an order via the ShopifyAPI.

Here's the call I'm making (directly from the ShopifyAPI documentation):

Endpoint: https://storename.myshopify.com/admin/api/2019-04/orders/524076744763/fulfillments.json

Body:

{
  "fulfillment": {
    "location_id": 47828563,
    "tracking_number": "123456789",
    "tracking_urls": [
      "https://shipping.xyz/track.php?num=123456789",
      "https://anothershipper.corp/track.php?code=abc"
    ],
    "notify_customer": true
  }
}

 

However, I'm still unable to successfully fill the items on the order.  Any help would be greatly appreciated!

0 Likes

Did you fix it already? To help you it would be nice to know what answer you got from the API. Did it succeed or fail and with what message?

 

If the API response was successful, do you see the fulfilment inside the Shopify Admin?

Casper | Picqer (e-commerce warehouse management software)
0 Likes
New Member
1 0 0

We're having a similar issue and would appreciate any input.

 

Sending a GET to admin/orders/<order_id>/fulfillments.json successfully returns an empty array as we'd expect.

 

200 OK
{ "fulfillments": [] }

However POSTing to admin/orders/<order_id>/fulfillments.json returns a 404.

 

Example request and response (Last 5 digits of numbers changed for privacy):

POST admin/orders/<order_id>/fulfillments.json
{
	"fulfillment": {
		"location_id": 15185300000,
		"tracking_number": "0361175152200000",
		"tracking_urls": ["https://REDACTED.com/track-shipment?trackingId=REDACTED"],
		"notify_customer": true
	}
}
==========================
404 NOT FOUND
{
"errors": "Not Found"
}

The X-Request-Id was b009dd93-2173-4b67-bf1f-e92c7f20986c

 

0 Likes
Shopify Partner
11 0 1

We are having a similar issue and would appreciate any input.

 

When sending a GET to admin/orders/<order_id>/fulfillments.json we get a successful response


200 OK
{
"fulfillments": []
}

 

However a POST to the same endpoint errors with a 404.

 

POST admin/orders/<order_id>/fulfillments.json
{
"fulfillment": {
"location_id": 15185300000,
"tracking_number": "0361175152200000",
"tracking_urls": ["https://REDACTED.com/track-shipment?trackingId=REDACTED"],
"notify_customer": true
}
}

404 NOT FOUND
{
"errors": "Not Found"
}

 

The X-Request-Id is b009dd93-2173-4b67-bf1f-e92c7f20986c

 

Any ideas are greatly appreciated

0 Likes