Preview Production Schedule Week Release

Beta
GET/v1/operations/production-schedules/{id}/week-release-preview

This endpoint is idempotent. Learn more

Returns what releasing a week would create, without creating it.

The lots are resolved exactly as the release itself resolves them, so what a planner is shown and what the floor receives cannot drift apart.

is_releasable is false when the week is empty or already released, with blocked_reason saying which; existing_production_run_id names the run a released week is already tied to.

Cancelled campaigns and campaigns planned at zero are excluded here exactly as the release excludes them, so a week holding nothing but those previews as empty.

Lots the floor is already holding are named as such. A batch with carried_forward_from set is a ticket an earlier week issued and nobody worked, which the release moves into the new run rather than reissuing, so nothing has to be reprinted.

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.

week_indexoptional integer

Zero-based week offset from the start of the horizon.

skip_carry_forwardoptional boolean

Preview the week as if every batch were newly issued.

By default the preview counts tickets an earlier week issued and the floor never worked against this week's campaigns, because that is what releasing would do.

objectstringenumValues:production_schedule_week_release_preview

Resource type identifier.

week_indexinteger

Zero-based week offset from the start of the horizon.

week_starts_atstring (date-time)

First instant of the week.

line_countinteger

How many campaigns would be released.

batch_countinteger

How many batches the run would hold, created and carried forward together.

carried_forward_batch_countinteger

How many of batch_count would be moved off an earlier run rather than created.

total_quantitynumber

Total units that would be released.

lineslistnullable

The campaigns that would be released, each with its lots.

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 object

Resources in this page.

lineentitynullable

The schedule line released.

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 to produce.

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).

skustring

The item's SKU, as it stood when the plan was generated.

machineentitynullable

The machine the campaign runs on.

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).

planned_quantitynumber

Total units planned for the campaign.

lot_unitsnumber

Units in one lot.

unitstringnullable

Abbreviation of the unit the quantity and the lot are counted in.

6 × 60 is not an instruction until it says 6 × 60 of what.

batch_countinteger

How many batches the campaign broke into.

carried_forward_quantitynumber

How much of planned_quantity is covered by tickets an earlier week already issued.

batcheslistnullable

The individual lots, carried-forward tickets first and then the new ones, in run order.

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 object

Resources in this page.

itementitynullable

The item the batch produces.

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).

skustring

The item's SKU, as it stood when the plan was generated.

quantitynumber

Units in this lot.

The last lot of a campaign is short when the planned quantity is not a whole number of lots.

batchentitynullable

The batch this lot was created as.

A preview names a batch only when the lot is one that already exists and is being moved.

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).

carried_forward_fromstringnullable

The number of the run this ticket came off, when the batch already existed.

Present on a lot carried forward from an earlier week that the floor never worked. The ticket is already printed and on the floor, so the release moves it into the new run rather than issuing a replacement.

is_releasableboolean

Whether the week can be released.

blocked_reasonstringnullable

Why the week cannot be released, phrased for display.

A week is blocked when it has already been released to the floor, or when it holds nothing to release.

existing_production_runentitynullable

The run the week was already released as.

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).

Responses

200

Successful response for Preview Production Schedule Week Release