App reviews, troubleshooting, and recommendations
Hi all,
A developer is helping us out with creating the API for our fulfillment center in Europe. They can receive all new incoming orders. However when they send out the following input to Shopify, nothing happens in our backoffice (no orders are fulfilled, no tracking codes are added automatically etc.):
{ "fulfillment" :
{ "id" : "U230000141",
"order_id" : "5073130488061",
"notify_customer" : "true",
"location_id" : "LocationId",
"shipment_status" : "ready_for_pickup",
"status" : "success",
"tracking_company" : "FOXGLOBAL",
"tracking_numbers" :
[ "05212061882145" ],
"tracking_urls" :
[ ],
"Line_items" :
[
{ "id" : "12793786728701" } ] } }
Is there someone who knows what we are doing wrong and what we should change to make this work automatically for us? Hopefully someone can help us out!
*btw, this is the address we are sending the above input to:
{ "fulfillment" :
{ "id" : "U230000141",
"order_id" : "5073130488061",
"notify_customer" : "true",
"location_id" : "LocationId",
"shipment_status" : "ready_for_pickup",
"status" : "success",
"tracking_company" : "FOXGLOBAL",
"tracking_numbers" :
[ "05212061882145" ],
"tracking_urls" :
[ ],
"Line_items" :
[
{ "id" : "12793786728701" } ] } }
Hey @Steambox,
It seems that the issue might be with the specific order_id and location_id values that you are sending. Make sure that the order_id and location_id values match with the existing data in your Shopify store. Also check if the tracking_company and tracking_numbers you're providing are correct.
Additionally, it's worth double-checking that the API endpoint you are sending the request to is correct and that the API is properly configured to handle the request.
You can also check the Shopify admin panel to see if there are any error messages or notifications related to the fulfillment update request you are sending.
It's also possible that you need to authenticate your API requests with a valid token or API key. You should check the Shopify API documentation to see if this is required and if you have provided the correct credentials.
Moira | Social Care @ 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
The recommended API endpoint for updating a fulfillment in Shopify is the /admin/orders/{order_id}/fulfillments/{id}.json
endpoint, where {order_id}
is the id of the order that the fulfillment is associated with and {id}
is the id of the fulfillment. This endpoint should be used to update the status of a fulfillment as well as to add tracking information.
In terms of the rights to give your partner, the permissions you have listed should be sufficient for them to update fulfillments on your behalf:
The write_assigned_fulfillment_orders
permission allows them to create and update fulfillments on orders that are assigned to them.
write_fulfillments
permission allows them to create and update any fulfillment. write_locations
, read_locations
permission allows them to access and manage the locations for the fulfillment.
write_orders
read_orders
permission allows them to access and manage the order. read_products
, read_inventory
, write_inventory
permission allows them to read products and inventory information.
write_third_party_fulfillment_orders
, read_third_party_fulfillment_orders
permission allow them to create, update and read third-party fulfillments. write_merchant_managed_fulfillment_orders
, read_merchant_managed_fulfillment_orders
permission allows them to create, update and read merchant-managed fulfillments.
It's important to be mindful of the rights you give to third parties and to ensure that the access they have is only for the purpose of fulfilling the order and not for any other actions.
Moira | Social Care @ 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
The example you provided is mostly correct, but there are a few points to note:
id
field in the input refers to the id of the fulfillment, not the order id. This id should be unique and generated by your fulfillment center system. It should be alphanumeric and can be 10 characters as you said.order_id
field should be the id of the order that the fulfillment is associated with. This id is generated by Shopify and is 13 characters as you mentioned.location_id
field should be the id of the location where the fulfillment is being shipped from. This id should match an existing location id in your Shopify store.notify_customer
field should be a boolean value (either "true" or "false"). If set to "true", Shopify will notify the customer that their order has been fulfilled.shipment_status
field should be one of the following values: "pending", "success", "failure", "error".tracking_urls
field should be an array of URLs that provide tracking information for the fulfillment. If no URLs are provided, this field should be an empty array.Line_items
field should be an array of line items that are included in the fulfillment. Each line item should have an id
field that corresponds to the id of the line item in the order.
Here is an example of what the input might look like:
{
"fulfillment": {
"id": "U230000141",
"order_id": "5073130488061",
"notify_customer": true,
"location_id": "gid://shopify/Location/12345678",
"shipment_status": "success",
"tracking_company": "FOXGLOBAL",
"tracking_numbers": [
"05212061882145"
],
"tracking_urls": [
"https://foxglobal.com/tracking/05212061882145"
],
"line_items": [
{
"id": "12793786728701"
}
]
}
}
It's important to note that the above input is an example, and the exact format and fields may vary depending on your specific use case. It's always recommended to check the Shopify API documentation for the most up-to-date information. Also, make sure that you are sending the request to the correct endpoint and that you have the proper authentication in place.
Moira | Social Care @ 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
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024