Skip to content

Read the production control calendar

Open .md

POST/v1/api/store/{team_slug}/production_control/filter

v1Operation ID v1_public_production_control_filter

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_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team

Request body

application/json, required.

  • end_datestring (date-time)required

    The last day of the range (ISO 8601). Counted to the end of that day, in UTC like start_date.

  • start_datestring (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.

  • filtersarray of objects
    Fields of each item (3)
    • keystringrequired

      A dotted key from the table.

    • operatorstringrequired
      • One of: "eq", "neq", "gt", "gte", "lt", "lte", "in", "nin"
    • valuestring | number | boolean | array
  • show_quoteboolean

    Include quotes.

    • Default false

Response

200Successful response.

  • dataarray of objectsrequired
    Fields of each item (36)
    • approval_statusstring | null

      requested, need-changes, approved, or null.

    • assigned_usersarray of objects

      People on the order.

      Fields of each item (3)
    • calc_deposit_totalinteger | number | string | null

      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.

    • calc_discountinteger | number | string | null

      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.

    • calc_subtotalinteger | number | string | null

      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.

    • calc_taxinteger | number | string | null

      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.

    • calc_totalinteger | number | string | null

      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.

    • created_atstring (date-time) | null

      Created. ISO 8601 with offset, or null.

    • created_bystring | null

      Who created it.

    • cust_due_datestring (date-time) | null

      Customer due date. ISO 8601 with offset, or null.

    • customerobject | null

      The customer, as in Get a customer.

      Child fields (2)
      • idstring

        The customer.

      • namestring | null
    • customer_idstring | null

      The customer.

    • customer_po_numberstring | null
    • deposit_duestring (date-time) | null

      Deposit due. ISO 8601 with offset, or null.

    • deposit_totalinteger | number | string | null

      The deposit percentage ×1000: 50000 is 50%. Not an amount.

    • due_datestring (date-time) | null

      Production due date. ISO 8601 with offset, or null.

    • full_amount_duestring (date-time) | null

      Full amount due. ISO 8601 with offset, or null.

    • idstring

      The order.

    • is_quoteboolean
    • is_rushboolean
    • issue_datestring (date-time) | null

      Issue date. ISO 8601 with offset, or null.

    • jobsarray of objects

      The order's jobs that match the job.* filters.

      Fields of each item (10)
      • assigned_usersarray of objects
      • due_datestring (date-time) | null

        Job due date. ISO 8601 with offset, or null.

      • idstring

        The job.

      • item_countnumber | null
      • namestring | null
      • pipelinesarray of objects

        Its tasks that match the task.* filters.

        Fields of each item (8)
        • assigned_usersarray of objects
        • due_datestring (date-time) | null

          Task due date. ISO 8601 with offset, or null.

        • idstring

          The task.

        • namestring
        • The task preset.

        • start_datestring (date-time) | null

          Task start. ISO 8601 with offset, or null.

        • statusobject

          A status: label, kind and place in the list.

          Child fields (9)
          • colorstring | null

            Hex color.

          • idstring

            The status.

          • labelstring
          • Only on the statuses of a task preset (role pipeline): the task preset. Absent on other statuses.

          • positioninteger

            Its place in the team's list: sort by it to find the next status.

          • rolestring

            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"
          • trashedboolean

            The status was deleted.

          • typestring

            The kind of status: start (Pending), pre_production and in_progress (In Progress), end (Completed).

            • One of: "start", "pre_production", "in_progress", "end"
        • status_idstring

          The task status.

      • scoped_idstring
      • start_datestring (date-time) | null

        Job start. ISO 8601 with offset, or null.

      • statusobject

        A status: label, kind and place in the list.

      • status_idstring

        The job status.

    • namestring | null
    • object_typestring | null

      sales_order or quote.

    • paid_amountinteger | number | string | null

      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.

    • payment_term_idstring | null

      Payment term.

    • scoped_idstring | null

      The order number.

    • ship_due_datestring (date-time) | null

      Ship-by date. ISO 8601 with offset, or null.

    • start_datestring (date-time) | null

      Production start. ISO 8601 with offset, or null.

    • statusobject

      A status: label, kind and place in the list.

    • status_idstring | null

      The order status.

    • unique_keystring | null
    • warehouse_idstring | null

      Warehouse.

  • statusintegerrequired
  • successbooleanrequired

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You 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.

  • 404Not 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.

  • 422The 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.