Internal Order Statuses

Define a private fulfilment-status pipeline and assign it to orders

GET /admin/api/internal-order-statuses

List every internal order status ordered by sort_order ascending, then id. Each entry is annotated with assigned_order_count, the number of orders currently assigned to it.

Response 200

[
  {
    "id": 1,
    "name": "Awaiting stock",
    "color": "warning",
    "sort_order": 0,
    "created_at": "2026-04-15T09:00:00Z",
    "updated_at": "2026-04-15T09:00:00Z",
    "assigned_order_count": 12
  },
  {
    "id": 2,
    "name": "Packed",
    "color": "success",
    "sort_order": 10,
    "created_at": "2026-04-15T09:05:00Z",
    "updated_at": "2026-04-15T09:05:00Z",
    "assigned_order_count": 3
  }
]

Example

curl "https://yourshop.zeroshop.io/admin/api/internal-order-statuses" \
  -H "Authorization: Bearer zspat_..."
POST /admin/api/internal-order-statuses

Create a new internal order status. color must be one of the badge palette values and defaults to neutral; sort_order defaults to 0.

Request Body

{
  "name": "Packed",
  "color": "success",
  "sort_order": 10
}

Response 201

{
  "id": 2,
  "name": "Packed",
  "color": "success",
  "sort_order": 10,
  "created_at": "2026-05-03T10:00:00Z",
  "updated_at": "2026-05-03T10:00:00Z",
  "assigned_order_count": 0
}

Example

curl -X POST "https://yourshop.zeroshop.io/admin/api/internal-order-statuses" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Packed",
    "color": "success",
    "sort_order": 10
  }'
PATCH /admin/api/internal-order-statuses/{id}

Partial update of an internal order status. Any field may be omitted; omitted fields are left unchanged.

Request Body

{
  "name": "Packed & labeled"
}

Response 200

{
  "id": 2,
  "name": "Packed & labeled",
  "color": "success",
  "sort_order": 10,
  "created_at": "2026-04-15T09:05:00Z",
  "updated_at": "2026-05-03T10:05:00Z",
  "assigned_order_count": 3
}

Example

curl -X PATCH "https://yourshop.zeroshop.io/admin/api/internal-order-statuses/2" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Packed & labeled"}'
DELETE /admin/api/internal-order-statuses/{id}

Delete an internal order status. Any orders assigned to it have their internal_status_id cleared; the response reports how many were affected.

Response 200

{
  "deleted": true,
  "affected_orders": 3
}

Example

curl -X DELETE "https://yourshop.zeroshop.io/admin/api/internal-order-statuses/2" \
  -H "Authorization: Bearer zspat_..."
POST /admin/api/internal-order-statuses/reorder

Bulk reorder statuses. Accepts a list of {id, sort_order} pairs and updates each row's sort_order atomically. IDs not mentioned are left unchanged.

Request Body

{
  "items": [
    {
      "id": 2,
      "sort_order": 0
    },
    {
      "id": 1,
      "sort_order": 10
    }
  ]
}

Response 204

Example

curl -X POST "https://yourshop.zeroshop.io/admin/api/internal-order-statuses/reorder" \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {"id": 2, "sort_order": 0},
      {"id": 1, "sort_order": 10}
    ]
  }'

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.