---
agentTools:
  projectIndex: https://commercehq.readme.io/llms.txt
---

# Manage fulfilments

**Create a new fulfilment**
*POST* /orders/ID/fulfilments

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"items\": [\n    {\n      \"id\": \"<Int>\", // ID of the line item from the order\n      \"quantity\": \"<Int>\",\n      \"warehouse\": \"<Int>\" // required when product is track_inventory\n    }\n  ]\n}",
      "language": "json"
    }
  ]
}
[/block]

**Edit all fulfilments**
*PATCH* /orders/ID/fulfilments

[block:code]
{
  "codes": [
    {
      "code": "[\n  {\n    \"id\": 1, // ID of the fulfilment you want to edit\n    \"items\": [\n      {\n        \"id\": 11,\n        \"quantity\": 1\n      },\n      {\n        \"id\": 12,\n        \"quantity\": 1\n      }\n    ]\n  },\n  {\n    \"id\": 2,\n    \"items\": [\n      {\n        \"id\": 11,\n        \"quantity\": 2\n      },\n      {\n        \"id\": 12,\n        \"quantity\": 3\n      }\n    ]\n  }\n]",
      "language": "json"
    }
  ]
}
[/block]

**Edit a single fulfilment**
*PATCH* /orders/ID/fulfilments/ID

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"items\": [\n    {\n      \"id\": 11,\n      \"quantity\": 1\n    },\n    {\n      \"id\": 12,\n      \"quantity\": 1\n    }\n  ],\n  \"warehouse\": \"<Int>\"\n}",
      "language": "json"
    }
  ]
}
[/block]

**Unmark fulfilled**
Use this if you wish to delete a fulfilment and set the products back to not fulfilled.
*DELETE* /orders/ID/fulfilments/ID