400 bad request when trying fulfillment service

Lakshmana
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.

Replies 4 (4)
Josh
Shopify Staff
Shopify Staff
1134 82 211

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'? 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Lakshmana
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.

 

ClintVB
New Member
1 0 0

Was there a resolution to this?

Zeeshan007
Tourist
6 0 1

I was getting same error 400. After drilling down i got that one the parameter was null. in my case it was location_id that was null sending