TrellisDevelopers

Order Fulfillment

POST
/order/{id}/fulfillment/all

Commerce7 Fulfillment parity: creates an order fulfillment record and automatically marks every order line as fulfilled.

Path Parameters

id*string
Length1 <= length

Header Parameters

x-tenant-id?string

Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.

x-tenant-slug?string

Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.

x-location-id?string

Adds a location scope to the request for location-aware reads, writes, and audit entries.

x-auth-provider?"hexclave"

Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.

Value in

  • "hexclave"
x-auth-user-id?string

Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/order/string/fulfillment/all" \  -H "x-tenant-id: tenant-local" \  -H "x-tenant-slug: trellis-local" \  -H "x-location-id: loc-tasting-room" \  -H "x-auth-provider: hexclave" \  -H "x-auth-user-id: user_abc123" \  -H "Content-Type: application/json" \  -d '{    "type": "Shipped",    "fulfillmentDate": "2019-08-24T14:15:22Z",    "packageCount": 0,    "sendTransactionEmail": true  }'
{  "id": "string",  "orderNumber": 0,  "customerId": "string",  "locationId": "string",  "status": "draft",  "source": "pos",  "fulfillmentMode": "dine_in",  "tableLabel": "string",  "seatCount": 0,  "note": "string",  "lineItems": [    {      "id": "string",      "productId": "string",      "title": "string",      "quantity": 1,      "unitPrice": 0,      "taxRateBps": 0,      "modifiers": [        {          "productId": "string",          "title": "string",          "priceDelta": 0        }      ]    }  ],  "subtotal": 0,  "discountTotal": 0,  "taxTotal": 0,  "tipTotal": 0,  "total": 0,  "balanceDue": 0,  "paymentIntentIds": [    "string"  ],  "submittedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "fulfillments": [    {      "id": "string",      "type": "Shipped",      "fulfillmentDate": "2019-08-24T14:15:22Z",      "packageCount": 0,      "items": [        {          "sku": "string",          "quantityFulfilled": 1        }      ],      "shipped": {        "trackingNumbers": [          "string"        ],        "carrier": "string"      },      "pickedUp": {        "pickedUpBy": "string"      }    }  ]}
POST
/order/{id}/fulfillment

Commerce7 Fulfillment parity: create the documented fulfillment variant on the order and return the updated order object.

Path Parameters

id*string
Length1 <= length

Header Parameters

x-tenant-id?string

Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.

x-tenant-slug?string

Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.

x-location-id?string

Adds a location scope to the request for location-aware reads, writes, and audit entries.

x-auth-provider?"hexclave"

Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.

Value in

  • "hexclave"
x-auth-user-id?string

Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/order/string/fulfillment" \  -H "x-tenant-id: tenant-local" \  -H "x-tenant-slug: trellis-local" \  -H "x-location-id: loc-tasting-room" \  -H "x-auth-provider: hexclave" \  -H "x-auth-user-id: user_abc123" \  -H "Content-Type: application/json" \  -d '{    "fulfillmentDate": "2019-08-24T14:15:22Z",    "packageCount": 0,    "sendTransactionEmail": true,    "type": "Shipped",    "items": [      {        "sku": "string",        "quantityFulfilled": 1      }    ],    "shipped": {      "trackingNumbers": [        "string"      ]    }  }'
{  "id": "string",  "orderNumber": 0,  "customerId": "string",  "locationId": "string",  "status": "draft",  "source": "pos",  "fulfillmentMode": "dine_in",  "tableLabel": "string",  "seatCount": 0,  "note": "string",  "lineItems": [    {      "id": "string",      "productId": "string",      "title": "string",      "quantity": 1,      "unitPrice": 0,      "taxRateBps": 0,      "modifiers": [        {          "productId": "string",          "title": "string",          "priceDelta": 0        }      ]    }  ],  "subtotal": 0,  "discountTotal": 0,  "taxTotal": 0,  "tipTotal": 0,  "total": 0,  "balanceDue": 0,  "paymentIntentIds": [    "string"  ],  "submittedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "fulfillments": [    {      "id": "string",      "type": "Shipped",      "fulfillmentDate": "2019-08-24T14:15:22Z",      "packageCount": 0,      "items": [        {          "sku": "string",          "quantityFulfilled": 1        }      ],      "shipped": {        "trackingNumbers": [          "string"        ],        "carrier": "string"      },      "pickedUp": {        "pickedUpBy": "string"      }    }  ]}
DELETE
/order/{id}/fulfillment/{id}

Commerce7 Fulfillment parity: removes the fulfillment record from the order and returns a 204 response.

Path Parameters

id*string

Fulfillment id

Length1 <= length

Header Parameters

x-tenant-id?string

Selects the tenant by id. When both tenant headers are omitted, the server falls back to the configured default tenant slug.

x-tenant-slug?string

Selects the tenant by slug. Use this when you know the tenant slug instead of the tenant id.

x-location-id?string

Adds a location scope to the request for location-aware reads, writes, and audit entries.

x-auth-provider?"hexclave"

Test-only Hexclave provider identifier used with x-auth-user-id when trusted identity headers are explicitly enabled. Production clients must use a Hexclave bearer token.

Value in

  • "hexclave"
x-auth-user-id?string

Temporary auth subject used to resolve the acting staff user through the staff auth identity mapping.

Response Body

curl -X DELETE "https://example.com/order/string/fulfillment/{id}" \  -H "x-tenant-id: tenant-local" \  -H "x-tenant-slug: trellis-local" \  -H "x-location-id: loc-tasting-room" \  -H "x-auth-provider: hexclave" \  -H "x-auth-user-id: user_abc123"
Empty