Fulfillment giving 404 when using tracking_url

Highlighted
New Member
2 0 0

Hi,

We are making calls to fulfill orders that come through our shipping platform, and it seems to be working for 90% of our customers, however we are running into issues when we try to use a carrier not on the Shopify platform(Although this may be un-related).  We send the tracking_company, a tracking_number and a tracking_url, but we receive a 404 error back with no real explanation of the problem.  We have checked the location_id and it is correct, the client only has 1 location so it's fairly easy to tell.

 

The request and response is below;

 

REQUEST

-------------------------------------

POST https://XXXXXXXXXXX.myshopify.com//admin/api/2020-01/orders/2176046399573/fulfillments.json HTTP/1.1
Content-Type: application/json
Authorization: Basic XXXXXX
Host: XXXXXXXXXXXX.myshopify.com
Content-Length: 358

{"fulfillment":{"tracking_company":"DHLGERMANY","tracking_url":"https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?piececode=XXXXXXXXXXXXXXXXXX","li..."}}
-------------------------------------

RESPONSE

-------------------------------------

HTTP/1.1 404 Not Found
Date: Fri, 13 Mar 2020 16:05:25 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Set-Cookie: __cfduid=d410015893c74f4681f8144ff30a5e3771584115525; expires=Sun, 12-Apr-20 16:05:25 GMT; path=/; domain=.myshopify.com; HttpOnly; SameSite=Lax
X-Sorting-Hat-PodId: XXXXXXXXXXX
X-Sorting-Hat-ShopId: XXXXXXXXXXX
Vary: Accept-Encoding
Referrer-Policy: origin-when-cross-origin
X-Frame-Options: DENY
X-ShopId: XXXXXXXXXXX
X-ShardId: XXXXXXXXXXX
X-Stats-UserId:
X-Stats-ApiClientId: XXXXXXXXXXX
X-Stats-ApiPermissionId: XXXXXXXXXXX
X-Shopify-API-Terms: By accessing or using the Shopify API you agree to the Shopify API License and Terms of Use at https://www.shopify.com/legal/api-terms
HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT: 1/80
X-Shopify-Shop-Api-Call-Limit: 1/80
X-Shopify-API-Version: 2020-01
Strict-Transport-Security: max-age=7889238
X-Request-Id: XXXXXXXXXXX
X-Shopify-Stage: production
Content-Security-Policy: XXXXXXXXXXX
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block; report=/xss-report?source%5Baction%5D=create&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Forders%2Ffulfillments&source%5Bsection%5D=admin_api&source%5Buuid%5D=50862b6a-0e89-45af-806d-c04e8562e92c
X-Dc: gcp-us-central1,gcp-us-central1
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: XXXXXXXXXXX-LHR
alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
Content-Length: 22

{"errors":"Not Found"}

0 Likes
Highlighted
Shopify Staff
Shopify Staff
582 70 127

Hi @tonyoddsphereco,

 

Can you kindly provide the X-Shopify-Request-ID value from the response headers of a failed call? I can use this to check our logs and try to get more details on the error.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
2 0 0

Hi,

Sorry for the delay, the client didn't go ahead in the end but we are testing a new client now.  The RequestID is either 04fbc56b300000189308153200000001 or 03436fc5-aba6-45df-a3c9-f22e2cfc0fb8...I don't see an x-shopify-request-id.  The shopid is 41184788637.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
582 70 127

Hey @tonyoddsphereco,

In the call from that request_id, an invalid line item id is being used. I'm not sure where the number being used came from, but it doesn't seem to correspond to anything on the order. Once you switch that with the proper line_item_id, the rest of the call looks good so it should complete as expected.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes