400 bad request when trying fulfillment service

New Member
9 0 0

Hi,

 

I am trying to fulfill an order using fulfillment rest api, below is the payload. passing valid location details.

 

URI: https://the-XXXX.myshopify.com/admin/api/2019-04/orders/112375735XXXX/fulfillments.json

Request:

<tns:fulfillment>
<tns:location_id>4214XXXX</tns:location_id>
<tns:tracking_number>1Z4743410363XXXX</tns:tracking_number>
<tns:tracking_urls>
http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=1Z4743410363XXXX&TypeOfInquiryNumber=T&...
</tns:tracking_urls>
<tns:notify_customer>true</tns:notify_customer>
</tns:fulfillment>

 

Response:

<bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
-<part name="summary">
<summary>Bad Request</summary>
</part>
-<part name="code">
<code>400</code>
</part>
-<part name="detail">
<detail>
<?xml version="1.0" encoding="UTF-8"?>
<errors type="array">
<error>order required parameter missing or invalid</error>
</errors>
</detail>
</part>
</bindingFault>

 

Appreciate any assitance.

 

Thanks,

Lakshmana.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1127 79 162

Hey there, 

 

I can check into our logs and see what happened here, but an order ID would be very helpful in this case. Would you mind posting the order ID here? Or the X-Request-Id header from the response you received?

 

It could also be because it appears you're sending 'tracking_urls' (with a s) but with only one tracking number. What happens if you rename that field to just be 'tracking_url'? 

0 Likes
Highlighted
New Member
9 0 0

Hey Josh,

 

order number - G32028

order id - 1139793395827

 

successfully fulfilled the same order using tracking urls(json payload) in postman. below is the req

 

{
"fulfillment": {
"location_id": 421426,
"tracking_number": "1Z47434103638XXXXX",
"tracking_urls": [
"http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber1=1Z47434103638XXXXX&TypeOfInquiryNumber=..."
],
"notify_customer": true
}
}

 

Thanks,

Lakshmana.

 

0 Likes