List Production Schedule Deviations

Beta
GET/v1/operations/production-schedules/{id}/deviations

This endpoint is idempotent. Learn more

Returns the append-only log of hand changes made to a schedule, most recent first.

This is what frozen-week adherence is measured from. A change recorded as frozen was inside the freeze window at the moment it was made, and stays that way regardless of what is published later.

Permissions requiredValues:production_schedules:read
The role behind your API key or agent must grant every one of these permissions.
idstring

ID of the production schedule.

cursoroptional string

Opaque cursor token identifying where the page of results starts.

Use the cursor value embedded in a previous response's next_page_url or previous_page_url to fetch the adjacent page. Omit to start from the first page.

limitoptional integer

Maximum number of results to return in a single page.

qoptional string

Free-text search term used to filter results.

Which fields are matched against the term varies by endpoint.

frozenoptional boolean

Whether the change fell inside the frozen window.

Judged against the freeze as it stood when the change was made, not as it stands now, so a later publish cannot reclassify history.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of production_schedule_deviation

Resources in this page.

idstring

Deviation ID.

objectstringenumValues:production_schedule_deviation

Resource type identifier.

production_scheduleentitynullable

The schedule version the change was made to.

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

lineentitynullable

The line that was changed.

A removal leaves no line to point at, so before is the only record of what was there.

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

deviation_typestringenumValues:line_addedline_removedquantity_changed

What kind of change this was.

Derived from the change itself rather than supplied by the person making it. An edit that both moves a campaign to another machine and changes its quantity is recorded as the machine change, because that is what a planner has to react to first.

freeze_statusstringenumValues:frozenflexible

Whether the change fell inside the frozen window when it was made.

week_indexintegernullable

The horizon week the change affected, zero-based.

machineentitynullable

The machine whose campaign changed.

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

itementitynullable

The item whose campaign changed.

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

beforeobjectnullable

Snapshot of the line before the change, null when the change created it.

Encoded as a JSON value (object, array, string, number, boolean, or null), not a JSON-encoded string.

afterobjectnullable

Snapshot of the line after the change, null when the change removed it.

Encoded as a JSON value (object, array, string, number, boolean, or null), not a JSON-encoded string.

delta_quantitynumber

Signed change in planned units.

delta_run_hoursnumber

Signed change in planned run hours.

reasonstringnullableenumValues:machine_downmaterial_shortagerush_order

Why the change was made.

A change inside a frozen week has to supply one; outside it a reason is left to the planner.

  • machine_down: the machine the campaign was on stopped running.
  • material_shortage: the material the campaign needs did not arrive.
  • rush_order: demand that could not wait for the next plan.
  • quality_hold: the work was stopped over a quality problem.
  • over_run: the floor produced more than the plan asked for.
  • under_run: the floor produced less than the plan asked for.
  • capacity_change: the available machine time changed, such as a shutdown or an added shift.
  • other: something outside the list, which should be spelled out in reason_note.
reason_notestringnullable

Free-form explanation of the change.

actoractornullable

The actor that made the change.

idstring

Unique identifier of the actor.

objectstringenumValues:actor

Resource type identifier.

typestringenumValues:userapi_keyagent

Actor type.

  • user: a human user account.
  • api_key: a programmatic caller authenticating with an API key.
  • agent: an automated agent acting on the account's behalf.
  • group: a shared group identity, such as a "Customer Service" persona, rather than a single individual.
namestringnullable

The actor's display name.

handlestringnullable

Human-readable handle identifying the actor.

  • For user actors: the user's email address.
  • For api_key actors: the redacted key value.

Other actor types carry no handle.

avatar_urlstringnullable

URL of the actor's profile photo, if one is set.

Only populated for user actors.

rolerolenullable

The role the actor holds in the account, which determines what it is permitted to do.

idstring

Role ID.

objectstringenumValues:role

Resource type identifier.

namestring

Display name of the role.

Unique within the account.

typestringenumValues:adminuserscanner

The kind of role.

The type gates behavior that individual permissions do not cover, and some actions are reserved for a single role type.

  • admin: full administrative access. Sensitive areas such as API keys, billing, and third-party integrations are restricted to admins no matter what permissions another role holds.
  • user: a custom role tailored to a specific need, with its permissions defined explicitly. Roles created through the API always have this type.
  • scanner: the role used by shop-floor scanning stations, assigned automatically when a scanning-station user is created.
  • sales_rep: a role for sales representatives. Order analytics are scoped to the rep's own orders.
  • agent: a role assigned to an automated agent rather than a person.
ownerownernullable

Provenance of this role.

System-owned roles are platform-provided defaults shared across all accounts and cannot be updated or deleted; account-owned roles are custom to your account.

objectstringenumValues:owner

Resource type identifier.

typestringenumValues:systemaccount

Where this resource came from.

  • system: a platform-provided default shared across all accounts; not editable.
  • account: created and owned by a specific account; the account field identifies which.
accountaccountnullable

The account that owns this resource.

Present only when type is account; system-owned resources have no owning account.

idstring

Account ID.

objectstringenumValues:account

Resource type identifier.

namestring

The account's display name.

default_billing_addressaddressnullable

The address billed by default on orders for this account.

default_shipping_addressaddressnullable

The address shipped to by default on orders for this account.

brandingaccount_brandingnullable

Customer-facing branding for the account, such as the logo, support contacts, and social links.

portalaccount_portalnullable

The account's customer portal settings, including the portal URL slug.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

permissionsarray of stringnullable

Permissions granted by this role, in {permission}:{action} format, such as customers:read.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

created_atstring (date-time)

When the change was made.

Responses

200

Successful response for List Production Schedule Deviations