Preview Production Schedule Regenerate
Beta/v1/operations/production-schedules/{id}/actions/preview-regenerateThis 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. Only a draft can be previewed, for the same reason only a draft can be regenerated.
The comparison is run the way a regenerate runs by default — hand-edited campaigns are kept, and the fresh solve plans around them — so they read as unchanged rather than as work the solver wants to take away. manual_line_count is how many campaigns on the draft were placed or edited by hand, which is the work a replace_all regenerate is putting at risk.
The horizon and demand basis default to the ones this version already has, so a plain call changes only how current the plan is, not what question is being asked.
idstringID of the production schedule.
planning_as_ofoptional string (date-time)The instant to plan against, which is what stock, demand history and active demand overrides are read as of.
Defaults to now rather than to the instant the version was first generated, so a plain call answers "what would the solver say today". Because the horizon re-anchors to the week containing this instant, a campaign can appear under a different week_index than the one stored on the draft.
horizon_weeksoptional integerNumber of weeks the re-solve should cover, defaulting to the horizon this version already has.
demand_basisoptional stringenumValues:trailing_12seasonal_emaHow future demand is derived, defaulting to the basis this version was solved with.
trailing_12: demand is the trailing twelve months of orders.seasonal_ema: demand is a seasonal exponential moving average, which follows a season arriving early or late rather than flattening it.
objectstringenumValues:production_schedule_regenerate_previewResource type identifier.
production_scheduleentitynullableThe draft this would act on.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe 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.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
solver_versionstringWhich solver produced the proposal.
planning_as_of_atstring (date-time)The instant the fresh solve planned from.
Unless the caller names an instant, a regenerate plans from now rather than replaying the one the draft was first generated against, so demand overrides added since then are taken into account and the horizon re-anchors to today.
Every campaign either plan holds, including the ones both agree on.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of objectResources in this page.
changestringenumValues:addedremovedchangedWhat the regenerate would do to this campaign.
added: the fresh solve wants a campaign the current plan does not have.removed: the current plan holds a campaign the fresh solve does not want.changed: both hold the campaign, in different quantities.unchanged: both agree on it.
itementitynullableThe item the campaign produces.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe 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.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
skustringSKU of that item.
machineentitynullableThe machine the campaign runs on.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe 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.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
week_indexintegerZero-based horizon week.
current_quantitynumberUnits the current plan asks for.
Zero when the campaign is being added.
proposed_quantitynumberUnits the fresh solve asks for.
Zero when the campaign is being removed.
current_is_manualbooleanWhether the current campaign was created or edited by a person.
added_countintegerCampaigns the fresh solve wants that the current plan does not have.
removed_countintegerCampaigns the current plan has that the fresh solve does not want.
changed_countintegerCampaigns both hold, in different quantities.
manual_line_countintegerHand-edited campaigns currently on the draft.
discarded_manual_countintegerHand-edited campaigns replace_all would destroy.
Responses
Successful response for Preview Production Schedule Regenerate