I am trying to do a partial fulfillment of certain line items on an order. I can fulfill the whole order using the proper JSON for that but once I try to identify line items in the order I get an error {"errors":"Not Found"} Trying through an independent API tool such as insomnia I cant even get a response it just shows me the login page to Shopify. If I try any other requests I am able to execute them with out issue.
Here is the JSON and API call I am using to complete the fulfillment. One question with the product Id am i meant to use the Product ID, Variant ID, or Inventory Item ID?
https://Username:Password@twbs-d.myshopify.com/admin/api/2020-10/orders/OrderID/fulfillments.json
{
"fulfillment": {
"location_id": MyLocation,
"tracking_number": "1234",
"notify_customer": "true",
"line_items": [
{
"id": ProductID,
"quantity": 1
}
]
}
}
Hey @Akoehler,
You need to use the line_item_id
, which is the unique id representing a particular line item on a particular order. You can get this by querying the line_items object through the orders on both GraphQL and REST.
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
User | Count |
---|---|
14 | |
12 | |
10 | |
8 | |
7 |