Preview Production Schedule Regenerate

Beta
PUT/v1/operations/production-schedules/{id}/actions/preview-regenerate

This endpoint is idempotent. Learn more

Returns what regenerating this draft would change, without changing it.

Every campaign either plan holds is listed, including the ones both agree on, so the caller can render a full side-by-side rather than a list of surprises. discarded_manual_count is what replace_all would destroy — a regenerate that silently eats hand-work is abandoned within two cycles, so the destructive mode has to be able to state its cost before it runs.

Planning inputs default to the ones the version was generated with, so a plain preview answers "what would the solver say now" rather than answering a different question with a different horizon.

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.

planning_as_ofoptional string (date-time)

Date to plan from. Defaults to the date the version was generated for.

horizon_weeksoptional integer

Weeks the plan should cover. Defaults to the version's own horizon.

demand_basisoptional stringenumValues:trailing_12seasonal_ema

How demand is derived. Defaults to the version's own basis.

objectstringenumValues:production_schedule_regenerate_preview

Resource type identifier.

production_scheduleentitynullable

The draft this would act 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).

solver_versionstring

Which solver produced the proposal.

planning_as_of_atstring (date-time)

The instant the fresh solve planned from.

lineslistnullable

Every campaign either plan holds, including the ones both agree on.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

null when the last page has been reached.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

null while on the first page.

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.

changestringenumValues:addedremovedchanged

What the regenerate would do to this campaign.

itementitynullable

The item the campaign 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

SKU of that item.

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

week_indexinteger

Zero-based horizon week.

current_quantitynumber

Units the current plan asks for. Zero when the campaign is being added.

proposed_quantitynumber

Units the fresh solve asks for. Zero when the campaign is being removed.

current_is_manualboolean

Whether the current campaign was created or edited by a person.

added_countinteger

Campaigns the fresh solve wants that the current plan does not have.

removed_countinteger

Campaigns the current plan has that the fresh solve does not want.

changed_countinteger

Campaigns both hold, in different quantities.

manual_line_countinteger

Hand-edited campaigns currently on the draft.

discarded_manual_countinteger

Hand-edited campaigns replace_all would destroy.

Responses

200

Successful response for Preview Production Schedule Regenerate