Covers all questions related to inventory management, order fulfillment, and shipping.
Hi,
I am trying to create a new fulfillment service for an existing location using admin/api/2024-01/fulfillment_services.json REST end-point.
The request body I use is:
{ "fulfillment_service": { "name": "<Name>", "admin_graphql_api_id":"gid://shopify/FulfillmentService/1", "inventory_management": false, "permits_sku_sharing": false, "fulfillment_orders_opt_in": false, "tracking_support": false, "format": "json", "location_id": "<Id>" } }
I get no errors, but the response body simply says:
{ "fulfillment_services": [] }
Any advice?
Thank you
Solved! Go to the solution
This is an accepted solution.
Hi @mlundqvi ,
Based on the response you received `fulfillment_services` sounds like that you are sending a GET request rather than a POST. So I would suggest to review the code and make sure that it's actually sending a POST request.
Also please refer to this document for the necessary fields that needs to be sent. Dields like `id` or `location_id` are not permitted as input when creating a fulfillment service.
Hi, could you resolve the issue? I have the same problem. Neither via REST nor via GraphQL I can create a fulfillment service.
All the best,
Michael
Hi @Michael841 , please refer to this reply for more information.
In case you still have the problem, can you please create a new post with example for the sent request and response received from the API?
Best,
Hi @Soroosh,
thank you for your reply.
I am doing a POST:
POST: https://shop.myshopify.com/admin/api/2024-01/fulfillment_services.json
{
"callback_url": "https://myservice.com/callback",
"format": "json",
"inventory_management": false,
"name": "my_name",
"tracking_support": true
}
{
"fulfillment_services": []
}
mutation fulfillmentServiceCreate($name: String!, $callbackUrl: URL!) {
fulfillmentServiceCreate(name: $name, callbackUrl: $callbackUrl) {
fulfillmentService {
id
serviceName
callbackUrl
}
userErrors {
field
message
}
}
}
and setting the variables name and callbackUrl accordingly, I get the following response:
{
"errors": "Not Found"
}
This is strange, as I did this with other shops without any problems before.
My App hast write access to all fulfillment-related values, also.
I tested it on one of my test stores, and it worked perfectly. Given the error message you received ("errors": "Not Found"), I recommend reviewing your setup again. This error suggests that the request did not reach the correct endpoint. If the issue persists, please contact the Shopify support team. And please provide them with additional details such as request_id
and shop_id
so they can assist you in resolving the problem.
This is an accepted solution.
Hi @mlundqvi ,
Based on the response you received `fulfillment_services` sounds like that you are sending a GET request rather than a POST. So I would suggest to review the code and make sure that it's actually sending a POST request.
Also please refer to this document for the necessary fields that needs to be sent. Dields like `id` or `location_id` are not permitted as input when creating a fulfillment service.