# List the history of a sales order or quote

```http
GET https://secure.yoprint.com/v2/api/store/{team_slug}/v2/sales_order/{order_unique_key}/history
```

- API version: v2
- Operation ID: `v2_public_order_history`
- Section: Sales › [Sales orders](https://developer.yoprint.com/reference/sales-orders.md)
- Web page: https://developer.yoprint.com/reference/sales-orders/v2-order-history/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Returns the order's activity history: who changed what and when.

The answer is paginated, newest first: rows are in `data`, and pagination metadata is in `pagination` (`total`, `count`, `perPage`, `currentPage`, and `totalPages`). A page holds the team's page size (50 unless the team changed it); request the next page with `?page=2`.

`{order_unique_key}` is the sales order or quote `id` (for example `V4keXwwxMQyXw7`) or its `unique_key` (it starts with `ord_`). The order number people see, such as SO1001, is not accepted here. Works on deleted orders too. Use this, not the retired v1 history.

## Permission

Any member of the team.

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.
- `order_unique_key` (string, required): The sales order's or quote's `id` (a hash id), or its `unique_key` (`ord_…`). The order number (`scoped_id`) does not work. Example `V4keXwwxMQyXw7`.

## Query parameters

- `page` (integer, optional): The page to return, from 1. Minimum 1.

## Request body

This operation takes no request body.

### Example request

```bash
curl 'https://secure.yoprint.com/v2/api/store/your-team/v2/sales_order/V4keXwwxMQyXw7/history' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1'
```

## Response

`200` Successful response.

Fields:

- `data` (array of objects, required)
  - Each item:
    - `action` (string, required): What happened, for example `status_change`, `order_changes_in_view_mode`, `order_deleted`, `order_restored`, `new_comment` or `received_user_payment`.
    - `id` (string, required)
    - `type` (string, required): What kind of record changed: `order`, `job`, `shipment` and so on.
    - `created_at` (string (date-time) | null, optional): When. ISO 8601 with offset, or null.
    - `message_key` (string | null, optional): `type.action`, for example `order.status_change`: the key of the sentence the web app shows.
    - `object` (object | array, optional): The details: usually `team`, `order` (`id`, `scoped_id`, `object_type`, `quote`), the changed values (a status change has `from_status` and `to_status`) and `user` (`id`, `name`, `avatar_url`). `[]` (an empty array) when an entry has no details.
    - `team` (object, optional): Your team.
      - `id` (string, optional)
      - `name` (string, optional)
      - `slug` (string, optional)
- `status` (integer, required)
- `success` (boolean, required)
- `pagination` (object, optional)
  - `count` (integer, required)
  - `currentPage` (integer, required)
  - `links` (object | array of any, required): Links to the neighbouring pages: `previous` and `next`, each present only when that page exists. An empty list, `[]`, when there is only one page.
    - `next` (string (uri), optional): The next page.
    - `previous` (string (uri), optional): The previous page.
  - `perPage` (integer, required)
  - `total` (integer, required)
  - `totalPages` (integer, required)

Example response:

```json
{
  "data": [
    {
      "action": "status_change",
      "created_at": "2026-11-03T09:00:00+00:00",
      "id": "K1J40XmWy4eDJQ",
      "message_key": "order.status_change",
      "object": {
        "from_status": {
          "id": "HqXxdtvY4icbzQ",
          "label": "New",
          "type": "start"
        },
        "order": {
          "id": "V4keXwwxMQyXw7",
          "object_type": "sales_order",
          "quote": false,
          "scoped_id": "SO1001"
        },
        "to_status": {
          "id": "52CuV8sWcDZLPm",
          "label": "In production",
          "type": "in_progress"
        },
        "user": {
          "avatar_url": null,
          "id": "PydH0WtBhSeiNU",
          "name": "Alex Rivera"
        }
      },
      "team": {
        "id": "MwFS4szpsdJJDt",
        "name": "Your Team",
        "slug": "your-team"
      },
      "type": "order"
    }
  ],
  "pagination": {
    "count": 1,
    "currentPage": 1,
    "links": [],
    "perPage": 50,
    "total": 1,
    "totalPages": 1
  },
  "status": 200,
  "success": true
}
```

## Errors

- `401` The API key is missing or wrong (`unauthenticated`).
- `403` You are not allowed to do this. `api_access_not_in_plan`: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only `{"message": "Insufficient Permission"}`. Other refusals use the error envelope, with `unauthorized` or `user_is_not_authorized`.
- `404` Not found. `page_not_found`: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. `code: null`, with a message that starts "No query results for": there is no record with that id.

## Related

- [Get a sales order or quote](https://developer.yoprint.com/reference/sales-orders/v2-order-show.md): `GET /v2/api/store/{team_slug}/v2/sales_order/{order_unique_key}`
