# Change a job's status

```http
PUT https://secure.yoprint.com/v2/api/store/{team_slug}/v2/job/{hash_id}/status
```

- API version: v2
- Operation ID: `v2_public_job_change_status`
- Section: Production › [Jobs](https://developer.yoprint.com/reference/jobs.md)
- Web page: https://developer.yoprint.com/reference/jobs/v2-job-change-status/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

**Check `success`, not only the HTTP status:** when the job's order isn't published (a draft), this call answers **HTTP 200** with `{ "status": 500, "success": false, "error": { "code": "action_not_allowed", "message": null } }` and changes nothing.

Moves a job to another of your team's job statuses. Returns the job with `previous_status_id`, `previous_status` and `participant_emails` (the order's message participants who receive email).

A job's production stage is its status. The job's current status is `status_id` (and the `status` object, with its `label`, `type` and `position`) on the job, as Get one job of an order and the job lists return it. Statuses are set up per team (List job statuses); each has a type: Pending (`start`), In Progress (`pre_production` or `in_progress`) or Completed (`end`).

To move a job to the next stage: read the job's `status_id`, list the job statuses, sort them by `position`, send the id of the one after the current one here, and check `success` in the reply. Tasks are separate: they track the steps inside a job, and finishing them doesn't move the job.

Sending the status the job already has is accepted and changes nothing.

## Permission

Any member of the team; this route checks no sales order permission.

## Business rules

- The job's order must be published. On a draft the reply is HTTP 200 with `success: false` and `error.code` `action_not_allowed`, and nothing changes.
- The status must be a job status of your team; a task preset status is a 404.

## Side effects

- Sends the `job.status_changed` webhook, only when the status really changed.
- Records the change in the status history and the order's activity log, and updates `status_last_change_date` (and `status_completion_date` for a Completed status).
- Moving to a Completed status rechecks the order's shipments: a shipment whose jobs are all Completed is marked ready to ship.

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.
- `hash_id` (string, required): The job's hash id (`id`). Hash ids only: a unique key or a document number gives 404. Example `WaGvtaWsx7Kcn4`.

## Query parameters

- `omit_media_approval_items` (string, optional): Optional. `1` (or `true`, `yes`, `on`) makes the answer smaller: each mockup and production file's `current_approval` leaves out its `items` list, and every other key stays as it is. The job's `pending_approval` and webhook payloads keep their items. Every file repeats its approval with all of its items, so a job with many files on one approval answers with far less data this way; read approval items from the approvals operations instead. Left out (or any other value), the answer is unchanged. Only the query string is read: a body field with this name is ignored. Example `1`.

## Request body

Content type `application/json`, required.

Fields:

- `status_id` (string, required): A job status of your team (from List job statuses).
- `notify_customer` (boolean | null, optional): Accepted and ignored: this route sends the customer nothing.

### Example request

```bash
curl -X PUT 'https://secure.yoprint.com/v2/api/store/your-team/v2/job/WaGvtaWsx7Kcn4/status' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1' \
  -H 'Content-Type: application/json' \
  -d '{
    "status_id": "scaWHQnPLtqMPT"
  }'
```

## Response

`200` Successful response.

> **Warning: a 200 answer can still be a refusal.** Check `success` (and the fields named below) as well as the HTTP status.
> - The order isn't published (`success: false`, `action_not_allowed`). Fix: Publish the order first. Always check `success`.

Refusal example (Refused with HTTP 200: `success` is false):

```json
{
  "error": {
    "code": "action_not_allowed",
    "message": null
  },
  "status": 500,
  "success": false
}
```

Example response:

```json
{
  "data": {
    "assigned_users": [],
    "customer": {
      "id": "ifAHmADekGZ6id",
      "name": "Northwind Apparel"
    },
    "due_date": "2026-11-06T17:00:00+00:00",
    "id": "WaGvtaWsx7Kcn4",
    "is_rush": true,
    "item_count": 48,
    "mockup": [],
    "name": "Front print",
    "note": null,
    "order_id": "sFbALVSYD55eXe",
    "order_scoped_id": "SO1001",
    "participant_emails": [
      "alex@example.com"
    ],
    "pdf": [
      {
        "description": "Job details without mockup",
        "label": "Job Details",
        "url": "https://example.com/pdf/job-details.pdf"
      }
    ],
    "pipelines": [
      {
        "assigned_users": [
          {
            "avatar_url": null,
            "id": "4mdDkMg3dgQOa3",
            "name": "Alex Rivera"
          }
        ],
        "created_at": "2026-11-03T15:00:00+00:00",
        "due_date": "2026-11-05T17:00:00+00:00",
        "id": "hpioY1gDBQZdbI",
        "job_id": "WaGvtaWsx7Kcn4",
        "job_is_rush": 1,
        "job_item_count": 48,
        "job_name": "Front print",
        "job_scoped_id": "JOB-2419",
        "job_status_id": "scaWHQnPLtqMPT",
        "name": "Burn screens",
        "note": null,
        "order_id": "sFbALVSYD55eXe",
        "order_name": "Team shirts",
        "order_scoped_id": "SO1001",
        "pipeline_id": "SE3SfXjt6dPfnH",
        "position": 1,
        "sales_order": {
          "customer_id": "ifAHmADekGZ6id",
          "customer_name": "Northwind Apparel",
          "is_quote": false,
          "object_type": "sales_order",
          "status_id": "wgbOT87gGZvhgy"
        },
        "start_date": "2026-11-04T09:00:00+00:00",
        "status": {
          "color": "#2196f3",
          "customer_label": "In Progress",
          "id": "hTFITko5Q0R83y",
          "label": "Burning",
          "pipeline_id": "SE3SfXjt6dPfnH",
          "position": 2,
          "role": "pipeline",
          "trashed": false,
          "type": "in_progress"
        },
        "status_completion_date": null,
        "status_id": "hTFITko5Q0R83y",
        "status_last_change_date": "2026-11-03T15:05:00+00:00",
        "updated_at": "2026-11-03T15:05:00+00:00"
      }
    ],
    "position": 1,
    "previous_status": {
      "color": "#9e9e9e",
      "customer_label": "Pending",
      "id": "P32Ic61q2HqUCD",
      "label": "Artwork",
      "position": 2,
      "role": "job",
      "trashed": false,
      "type": "start"
    },
    "previous_status_id": "P32Ic61q2HqUCD",
    "pricing_original_total": {
      "dp": 6,
      "value": 600000000
    },
    "pricing_rule_applied": null,
    "pricing_total": {
      "dp": 6,
      "value": 600000000
    },
    "production_file": [],
    "sales_order": {
      "is_quote": false,
      "is_rush": false,
      "name": "Team shirts",
      "object_type": "sales_order",
      "status_id": "wgbOT87gGZvhgy"
    },
    "scoped_id": "JOB-2419",
    "services": [
      {
        "id": "tCBpDSBjXaPhHN",
        "option": "2",
        "position": 1,
        "service_id": "5Sf6XRMN2Vuxvh",
        "service_name": "Screen print"
      }
    ],
    "start_date": "2026-11-04T09:00:00+00:00",
    "status": {
      "color": "#2196f3",
      "customer_label": "In Progress",
      "id": "scaWHQnPLtqMPT",
      "label": "Printing",
      "position": 3,
      "role": "job",
      "trashed": false,
      "type": "in_progress"
    },
    "status_completion_date": null,
    "status_id": "scaWHQnPLtqMPT",
    "status_last_change_date": "2026-11-03T15:05:00+00:00",
    "total_qty_need_ordering": "0.00000000",
    "unique_key": "job_EXAMPLEuniqueKey"
  },
  "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.
  - When: The job or the status isn't your team's, the job's order is an old (version 1) order, or the status isn't a job status. Fix: Use a status id from List job statuses.
- `422` The request was refused and changed nothing. `validation_failed` lists what to fix in `error.fields`; other codes name a business rule, explained in `error.message`. A few checks answer with only `{"message": "..."}`. An operation that calls another service (a payment provider, a carrier, an accounting app) can answer `connect_timeout` ("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.
  - When: `status_id` is missing or not a hash id. Fix: Send `status_id`.

## Notes

- A refusal here is HTTP 200 with `success: false` and `error.code` `action_not_allowed` (the body's `status` says 500). A client that only checks the HTTP status will treat it as done.

## Related

- [List job statuses](https://developer.yoprint.com/reference/statuses/v1-status-list-job.md): `GET /v1/api/store/{team_slug}/setting/status/job`
- [Get one job of an order](https://developer.yoprint.com/reference/jobs/v2-job-show.md): `GET /v2/api/store/{team_slug}/v2/sales_order/{hash_id}/job/{job_id}`
- [Change a task's status](https://developer.yoprint.com/reference/tasks/v2-job-work-pipeline-change-status.md): `PUT /v2/api/store/{team_slug}/v2/work_pipeline/{hash_id}/status`
