# Read the production control calendar

```http
POST https://secure.yoprint.com/v1/api/store/{team_slug}/production_control/filter
```

- API version: v1
- Operation ID: `v1_public_production_control_filter`
- Section: Production › [Production control](https://developer.yoprint.com/reference/production-control.md)
- Web page: https://developer.yoprint.com/reference/production-control/v1-production-control-filter/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Returns the orders scheduled in a date range, each with its jobs and their tasks: the data behind the Production Control page.

An order is included when its own production dates, or one of its jobs' dates, fall in the range or span it. Quotes are left out unless `show_quote` is true. Drafts are always left out. The whole range comes back at once, without paging.

Filters use dotted keys, one level each. Order filters choose orders; job and task filters also choose which jobs and tasks are listed inside each order.

| `key` | `operator` | `value` |
| --- | --- | --- |
| `order.status_id`, `job.status_id`, `task.status_id` | `in`, `nin` | Status hash ids |
| `order.status_type`, `job.status_type`, `task.status_type` | `in`, `nin` | `start`, `pre_production`, `in_progress`, `end` |
| `order.customer_id` | `in`, `nin` | Customer hash ids |
| `order.assigned_users`, `job.assigned_users`, `task.assigned_users` | `in`, `nin` | User hash ids |
| `order.tag` | `in`, `nin` | Tag hash ids |
| `task.pipeline_id` | `in`, `nin`, `eq` | Task preset hash ids |
| `order.is_rush`, `job.is_rush` | `eq`, `neq` | `true` or `false` |
| `order.due_date`, `order.created_date`, `job.start_date`, `job.due_date`, `task.start_date`, `task.due_date` | `eq`, `neq`, `gt`, `gte`, `lt`, `lte` | Days from today (UTC): 0 today, 7 a week ahead, -7 a week ago. Compared by date. |

`order.due_date` compares the order's customer due (in-hand) date; `order.created_date` compares when it was created.

For non-rush jobs send `job.is_rush` `neq` `true`: `eq` `false` returns the orders with empty `jobs`. Unknown `order.*` keys are ignored. Unknown `job.*` and `task.*` keys don't change which orders come back, but still filter the listed jobs or tasks (a field that doesn't exist empties the list unless the operator is `neq` or `nin`). Send real user hash ids: `system-current-user` is not understood when the listed jobs and tasks are filtered.

## Permission

Any member of the team. No sales order permission is checked.

## Business rules

- `start_date` and `end_date` are required ISO 8601 dates; every filter needs a `key` and an `operator`.

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.

## Request body

Content type `application/json`, required.

Fields:

- `end_date` (string (date-time), required): The last day of the range (ISO 8601). Counted to the end of that day, in UTC like `start_date`.
- `start_date` (string (date-time), required): The first day of the range (ISO 8601). Counted from the start of that day. Send UTC (`Z`): the day is taken from the date as written and any offset is dropped.
- `filters` (array of objects, optional)
  - Each item:
    - `key` (string, required): A dotted key from the table.
    - `operator` (string, required): One of: `"eq"`, `"neq"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"in"`, `"nin"`.
    - `value` (string | number | boolean | array, optional)
- `show_quote` (boolean, optional): Include quotes. Default `false`.

### Example request

```bash
curl -X POST 'https://secure.yoprint.com/v1/api/store/your-team/production_control/filter' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1' \
  -H 'Content-Type: application/json' \
  -d '{
    "end_date": "2026-11-30T00:00:00Z",
    "filters": [
      {
        "key": "job.status_type",
        "operator": "in",
        "value": [
          "start",
          "in_progress"
        ]
      },
      {
        "key": "task.pipeline_id",
        "operator": "in",
        "value": [
          "SE3SfXjt6dPfnH"
        ]
      }
    ],
    "show_quote": false,
    "start_date": "2026-11-01T00:00:00Z"
  }'
```

## Response

`200` Successful response.

Fields:

- `data` (array of objects, required)
  - Each item:
    - `approval_status` (string | null, optional): `requested`, `need-changes`, `approved`, or null.
    - `assigned_users` (array of objects, optional): People on the order.
      - Each item:
        - `avatar_url` (string | null, optional)
        - `id` (string, optional): The user.
        - `name` (string, optional)
    - `calc_deposit_total` (integer | number | string | null, optional): Deposit amount. Thousandths, an older encoding: `12500` is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (`1234.5` is 1.2345), or as a string (`"1234.5"`) when you send `X-Yoprint-Decimal-Format: exact-v1`. See [Money and quantities](/concepts/money-and-quantities/).
    - `calc_discount` (integer | number | string | null, optional): Invoiced discount; 0 until invoiced. Thousandths, an older encoding: `12500` is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (`1234.5` is 1.2345), or as a string (`"1234.5"`) when you send `X-Yoprint-Decimal-Format: exact-v1`. See [Money and quantities](/concepts/money-and-quantities/).
    - `calc_subtotal` (integer | number | string | null, optional): Invoiced line and shipping subtotal; 0 until the order is invoiced. Thousandths, an older encoding: `12500` is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (`1234.5` is 1.2345), or as a string (`"1234.5"`) when you send `X-Yoprint-Decimal-Format: exact-v1`. See [Money and quantities](/concepts/money-and-quantities/).
    - `calc_tax` (integer | number | string | null, optional): Invoiced tax; 0 until invoiced. Thousandths, an older encoding: `12500` is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (`1234.5` is 1.2345), or as a string (`"1234.5"`) when you send `X-Yoprint-Decimal-Format: exact-v1`. See [Money and quantities](/concepts/money-and-quantities/).
    - `calc_total` (integer | number | string | null, optional): Invoiced total; 0 until the order is invoiced. Thousandths, an older encoding: `12500` is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (`1234.5` is 1.2345), or as a string (`"1234.5"`) when you send `X-Yoprint-Decimal-Format: exact-v1`. See [Money and quantities](/concepts/money-and-quantities/).
    - `created_at` (string (date-time) | null, optional): Created. ISO 8601 with offset, or null.
    - `created_by` (string | null, optional): Who created it.
    - `cust_due_date` (string (date-time) | null, optional): Customer due date. ISO 8601 with offset, or null.
    - `customer` (object | null, optional): The customer, as in Get a customer.
      - `id` (string, optional): The customer.
      - `name` (string | null, optional)
    - `customer_id` (string | null, optional): The customer.
    - `customer_po_number` (string | null, optional)
    - `customer_portal_order_link` (string | null, optional): Customer portal link. It carries the customer's portal access: don't publish it.
    - `customer_portal_payment_link` (string | null, optional): Customer portal payment page link, with the same access.
    - `deposit_due` (string (date-time) | null, optional): Deposit due. ISO 8601 with offset, or null.
    - `deposit_required` (boolean, optional)
    - `deposit_total` (integer | number | string | null, optional): The deposit **percentage** ×1000: `50000` is 50%. Not an amount.
    - `due_date` (string (date-time) | null, optional): Production due date. ISO 8601 with offset, or null.
    - `full_amount_due` (string (date-time) | null, optional): Full amount due. ISO 8601 with offset, or null.
    - `id` (string, optional): The order.
    - `is_quote` (boolean, optional)
    - `is_rush` (boolean, optional)
    - `issue_date` (string (date-time) | null, optional): Issue date. ISO 8601 with offset, or null.
    - `jobs` (array of objects, optional): The order's jobs that match the `job.*` filters.
      - Each item:
        - `assigned_users` (array of objects, optional): Same fields as `data[].assigned_users` above.
        - `due_date` (string (date-time) | null, optional): Job due date. ISO 8601 with offset, or null.
        - `id` (string, optional): The job.
        - `item_count` (number | null, optional)
        - `name` (string | null, optional)
        - `pipelines` (array of objects, optional): Its tasks that match the `task.*` filters.
          - Each item:
            - `assigned_users` (array of objects, optional): Same fields as `data[].assigned_users` above.
            - `due_date` (string (date-time) | null, optional): Task due date. ISO 8601 with offset, or null.
            - `id` (string, optional): The task.
            - `name` (string, optional)
            - `pipeline_id` (string, optional): The task preset.
            - `start_date` (string (date-time) | null, optional): Task start. ISO 8601 with offset, or null.
            - `status` (object, optional): A status: label, kind and place in the list.
              - `color` (string | null, optional): Hex color.
              - `customer_label` (string, optional)
              - `id` (string, optional): The status.
              - `label` (string, optional)
              - `pipeline_id` (string, optional): Only on the statuses of a task preset (`role` `pipeline`): the task preset. Absent on other statuses.
              - `position` (integer, optional): Its place in the team's list: sort by it to find the next status.
              - `role` (string, optional): Which list it belongs to: `job` for job statuses, `pipeline` for the statuses of a task preset. One of: `"order"`, `"quote"`, `"job"`, `"purchase_order"`, `"shipment"`, `"customer_message"`, `"pipeline"`.
              - `trashed` (boolean, optional): The status was deleted.
              - `type` (string, optional): The kind of status: `start` (Pending), `pre_production` and `in_progress` (In Progress), `end` (Completed). One of: `"start"`, `"pre_production"`, `"in_progress"`, `"end"`.
            - `status_id` (string, optional): The task status.
        - `scoped_id` (string, optional)
        - `start_date` (string (date-time) | null, optional): Job start. ISO 8601 with offset, or null.
        - `status` (object, optional): A status: label, kind and place in the list. Same fields as `data[].jobs[].pipelines[].status` above.
        - `status_id` (string, optional): The job status.
    - `name` (string | null, optional)
    - `object_type` (string | null, optional): `sales_order` or `quote`.
    - `paid_amount` (integer | number | string | null, optional): Paid so far. Thousandths, an older encoding: `12500` is 12.50. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (`1234.5` is 1.2345), or as a string (`"1234.5"`) when you send `X-Yoprint-Decimal-Format: exact-v1`. See [Money and quantities](/concepts/money-and-quantities/).
    - `payment_term_id` (string | null, optional): Payment term.
    - `scoped_id` (string | null, optional): The order number.
    - `ship_due_date` (string (date-time) | null, optional): Ship-by date. ISO 8601 with offset, or null.
    - `start_date` (string (date-time) | null, optional): Production start. ISO 8601 with offset, or null.
    - `status` (object, optional): A status: label, kind and place in the list. Same fields as `data[].jobs[].pipelines[].status` above.
    - `status_id` (string | null, optional): The order status.
    - `unique_key` (string | null, optional)
    - `warehouse_id` (string | null, optional): Warehouse.
- `status` (integer, required)
- `success` (boolean, required)

Example response:

```json
{
  "data": [
    {
      "approval_status": null,
      "assigned_users": [
        {
          "avatar_url": null,
          "id": "4mdDkMg3dgQOa3",
          "name": "Alex Rivera"
        }
      ],
      "calc_deposit_total": 169880,
      "calc_discount": 0,
      "calc_subtotal": 315000,
      "calc_tax": 24750,
      "calc_total": 339750,
      "created_at": "2026-11-02T15:00:00+00:00",
      "created_by": "4mdDkMg3dgQOa3",
      "cust_due_date": "2026-11-10T00:00:00+00:00",
      "customer": {
        "id": "ifAHmADekGZ6id",
        "name": "Northwind Apparel"
      },
      "customer_id": "ifAHmADekGZ6id",
      "customer_po_number": null,
      "customer_portal_order_link": "https://example.com/portal/order",
      "customer_portal_payment_link": "https://example.com/portal/pay",
      "deposit_due": "2026-11-05T00:00:00+00:00",
      "deposit_required": true,
      "deposit_total": 50000,
      "due_date": "2026-11-06T17:00:00+00:00",
      "full_amount_due": "2026-11-20T00:00:00+00:00",
      "id": "sFbALVSYD55eXe",
      "is_quote": false,
      "is_rush": false,
      "issue_date": "2026-11-02T00:00:00+00:00",
      "jobs": [
        {
          "assigned_users": [],
          "due_date": "2026-11-06T17:00:00+00:00",
          "id": "WaGvtaWsx7Kcn4",
          "item_count": 48,
          "name": "Front print",
          "pipelines": [
            {
              "assigned_users": [
                {
                  "avatar_url": null,
                  "id": "4mdDkMg3dgQOa3",
                  "name": "Alex Rivera"
                }
              ],
              "due_date": "2026-11-05T17:00:00+00:00",
              "id": "hpioY1gDBQZdbI",
              "name": "Burn screens",
              "pipeline_id": "SE3SfXjt6dPfnH",
              "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_id": "hTFITko5Q0R83y"
            }
          ],
          "scoped_id": "JOB-2419",
          "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_id": "scaWHQnPLtqMPT"
        }
      ],
      "name": "Team shirts",
      "object_type": "sales_order",
      "paid_amount": 100000,
      "payment_term_id": null,
      "scoped_id": "SO1001",
      "ship_due_date": "2026-11-08T00:00:00+00:00",
      "start_date": "2026-11-04T09:00:00+00:00",
      "status": {
        "color": "#2196f3",
        "customer_label": "In Progress",
        "id": "wgbOT87gGZvhgy",
        "label": "In production",
        "position": 2,
        "role": "order",
        "trashed": false,
        "type": "in_progress"
      },
      "status_id": "wgbOT87gGZvhgy",
      "unique_key": "ord_EXAMPLEuniqueKey",
      "warehouse_id": null
    }
  ],
  "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.
- `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: A date is missing or not ISO 8601, `show_quote` isn't a boolean, or a filter lacks `key` or `operator`. Fix: Send both dates and complete filters.

## Notes

- A wide range returns every matching order with all its jobs and tasks in one response. Keep ranges to a few weeks.

## Related

- [List jobs in a date range](https://developer.yoprint.com/reference/jobs/v1-job-calendar.md): `POST /v1/api/store/{team_slug}/job/calendar`
- [List tasks in a date range](https://developer.yoprint.com/reference/tasks/v1-work-pipeline-calendar.md): `POST /v1/api/store/{team_slug}/work_pipeline/calendar`
