{"fulfillment_service":"Required parameter missing or invalid"}

Hi,

when trying to create a fulfillment service, with the very json example of the doc here (https://shopify.dev/docs/api/admin-rest/2023-04/resources/fulfillmentservice#post-fulfillment-services)),
i get the following error response:

{"errors":{"fulfillment_service":"Required parameter missing or invalid"}}

The sent request details :

    [method] => POST
    [url] => https:/{mysite}.myshopify.com/admin/api/2023-04/fulfillment_services.json
    [params] => {"fulfillment_service":{"name":"Jupiter Fulfillment","callback_url":"http://{mydomain}.fr/am/testShopify","inventory_management":false,"tracking_support":false,"requires_shipping_method":false,"format":"json","permits_sku_sharing":false,"fulfillment_orders_opt_in":false}}
    [headers] => Array
        (
            [0] => X-Shopify-Access-Token: {my key}
        )

    [httpCode] => 400
    [response] => {"errors":{"fulfillment_service":"Required parameter missing or invalid"}}

I also tried with json_escaped_slashes (see differences in url):

    [method] => POST
    [url] => https://{mysite}.myshopify.com/admin/api/2023-04/fulfillment_services.json
    [params] => {"fulfillment_service":{"name":"Jupiter Fulfillment","callback_url":"http:\/\/{mydomain}.fr\/am\/testShopify","inventory_management":false,"tracking_support":false,"requires_shipping_method":false,"format":"json","permits_sku_sharing":false,"fulfillment_orders_opt_in":false}}
    [headers] => Array
        (
            [0] => X-Shopify-Access-Token: {mykey}
        )

    [httpCode] => 400
    [response] => {"errors":{"fulfillment_service":"Required parameter missing or invalid"}}

Maybe I changed som trues to falses, but I first tried with an exact copy of the doc given sample JSON.

[Edit] Just for better readibility, hereunder the sent JSON user-friendly-formatted:

{
	"fulfillment_service": {
		"name": "Jupiter Fulfillment",
		"callback_url": "http://{mydomain}.fr/am/testShopify",
		"inventory_management": false,
		"tracking_support": false,
		"requires_shipping_method": false,
		"format": "json",
		"permits_sku_sharing": false,
		"fulfillment_orders_opt_in": false
	}
}

Anyone can help please?

Thanks in advance!

Oouuuups, missing “Content-Type” header :neutral_face:

1 Like