---
title: "Change status and tracking"
method: PATCH
path: "/orders/{id}"
tags: ["Orders"]
---

# Change status and tracking

`PATCH /orders/{id}`

## Request

- Base URL: `https://sitesplaced.com/api/v1`
- URL: `https://sitesplaced.com/api/v1/orders/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

Secret key. Permission `orders:write`. Send any of `status`, `tracking` and `comment`. Cancelling an order copied in from another platform with a key that is not that order's own connection key gives 409: cancel it on the other platform.

## Request body

- OrderPatch: Any of the three.
  - `status` 'pending' | 'confirmed' | 'shipped' | 'out_for_delivery' | 'completed' | 'cancelled': `completed` means delivered.
  - `tracking` object
    - `number` string
    - `courier` string
    - `url` string, uri
  - `comment` string

## Response `200`

The updated order.

- OrderEnvelope
  - `order` Order, required
    - `id` string, uuid, required
    - `object` 'order', required
    - `order_number` string, nullable
    - `source` 'native' | 'woocommerce' | 'shopify' | 'api', required: `native` is the SitesPlaced checkout.
    - `external_id` string, nullable
    - `external_number` string, nullable
    - `external_status` string, nullable: The raw status on the other platform.
    - `external_url` string, nullable: The order's admin address on the other platform.
    - `status` 'pending' | 'confirmed' | 'shipped' | 'out_for_delivery' | 'completed' | 'cancelled', required: `completed` means delivered.
    - `payment` object, required
      - `method` string, required: For orders copied in from another platform this is only `cod` or `manual`; the real method is in `external_method`.
      - `status` 'unpaid' | 'pending' | 'paid' | 'failed' | 'refunded', required
      - `external_method` string, nullable
      - `external_method_title` string, nullable
    - `totals` object, required
      - `total` number, required
      - `discount` number, required
      - `shipping` number, required
      - `cod_fee` number, required
    - `currency` string, required
    - `customer` object, required
      - `name` string, required
      - `email` string, nullable
      - `phone` string, nullable
      - `address` string, nullable
      - `city` string, nullable
      - `state` string, nullable
      - `postcode` string, nullable
      - `country` string, nullable
    - `items` OrderItem[], required
      - `name` string, required
      - `variant` string, nullable
      - `quantity` number, required
      - `unit_price` number, required
      - `sku` string, nullable
      - `product_id` string, nullable: The SitesPlaced product id. Null on an order copied in from another platform.
      - `external_product_id` string, nullable
      - `image_url` string, nullable
    - `tracking` OrderTracking, required
      - `number` string, nullable
      - `courier` string, nullable
      - `url` string, nullable
      - `status_text` string, nullable
      - `page_url` string, uri, required: The public tracking page for this order.
    - `note` string, nullable
    - `risk` OrderRisk, nullable: Cash-on-delivery orders only.
      - `level` 'medium' | 'high'
      - `flags` object[]
        - `code` string, required
        - `label` string, required
    - `archived` boolean, required
    - `created_at` string, date-time, required: ISO 8601, in UTC.
    - `updated_at` string, date-time, required: ISO 8601, in UTC.

## Other responses

- `400`: `invalid_request`. The request is malformed or a field has a bad value; `param` names the field.
- `401`: `unauthorized`. The key is missing, wrong or revoked.
- `403`: `forbidden`. The key may not do this: a secret key sent from a browser, a publishable key from a website not on its list, the wrong kind of key, or a missing permission.
- `404`: `not_found`.
- `409`: `conflict`.
- `413`: `payload_too_large`. Bodies can be up to 1 MB.
- `429`: `rate_limited`. Wait for `Retry-After` seconds.
- `500`: `internal_error`.
- `503`: `unavailable`.

---

[API](https://skmtc.dev/sitesplaced/apis/sitesplaced-developer-api.md) · [All operations](https://skmtc.dev/sitesplaced/apis/sitesplaced-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sitesplaced/apis/sitesplaced-developer-api/revisions/66fbfbbaad1a?raw)
