Adding fulfillmentService, getting 400 Bad Request

Solved
ejohnson
Tourist
3 1 0

When sending a POST to the following

https://storename.myshopify.com/admin/api/2020-10/fulfillment_services.json

{
"fulfillment_service": {
"name": "Amazon FBA",
"callback_url": "https://hostname/shopify/fulfillment/amazon", <---hostname exists
"inventory_management": true,
"tracking_support": true,
"requires_shipping_method": true,
"format": "json",
"handle":"amazon-fba",
"provider_id":"PROVIDER-ID",
"location_id":1234567 <----location number exist, this one is made up
}
}
 
Fails with
{
"errors": {
"fulfillment_service": "Required parameter missing or invalid"
}
}
 
Any idea what could I be doing wrong, I tested with the sample here, and doesnt work.
 
 
Thanks.
0 Likes
ejohnson
Tourist
3 1 0

This is an accepted solution.

It seems to be working now

0 Likes
_JB
Shopify Staff
Shopify Staff
750 86 163

Glad to hear you got it working @ejohnson. The call you posted looked fine, do you mind sharing what the issue was for anyone else that comes across this post?

JB | Developer Support @ 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 Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
ejohnson
Tourist
3 1 0

I am using postman to test my request, the Content-Type header checkbox was off (not sending a content-type), API responds with an error.

0 Likes
HunkyBill
Shopify Expert
4355 36 462

What would happen if you assigned a handle, and that handle already exists? Usually one does not include a handle as Shopify takes care of that from the name data. If a duplicate is found, Shopify would tack on a -1 or something to make the new handle unique allowing the code to succeed. But if you provide a handle, and it is dupe, would that not also trigger this exact same error scenario?

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes