Update Demand Override

Beta
PATCH/v1/operations/demand-overrides/{id}

Idempotent with Idempotency-Key header. Learn more

Updates a demand override.

Only the fields sent are changed. The adjustment and value are validated as a pair against the resulting override, so switching a stored unit adjustment to delta_percent is checked as a percentage even when only the adjustment is sent; the period is checked the same way.

What an override targets cannot be changed — create a new override to adjust a different item, product line, or the account as a whole. Schedules that have already been generated are unaffected; the change is picked up by the next one.

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

ID of the demand override.

include[]optional arrayenumValues:scope

Sub-objects to expand in the response. When omitted, sub-objects are returned as null.

period_starts_atoptional string (date-time)

First day of the demand period the override applies to.

Overrides are applied month by month, so every calendar month the period touches is adjusted and any time of day is ignored.

period_ends_atoptional string (date-time)

Last day of the demand period the override applies to.

Must fall on or after the override's start, whether that is sent here or already stored.

adjustmentoptional stringenumValues:absolutedelta_unitsdelta_percent

How the value adjusts the forecast.

  • absolute: replaces the forecast for each month in the period.
  • delta_units: adds the value to each month in the period.
  • delta_percent: scales each month in the period by the value as a percentage.
valueoptional number

The amount of the adjustment, interpreted according to adjustment.

It is validated against the adjustment the override ends up with, so switching a stored unit delta to delta_percent without sending a new value requires the existing value to be a legal percentage.

unit_idoptional stringnullable

ID of the unit the value is expressed in.

Recorded for context only: the value is applied to the planned demand without unit conversion. Send null to clear.

reasonoptional stringnullableenumValues:new_customerlost_accountpromotion

Why the adjustment was made.

The reason is carried into each schedule the override changes, so a plan can explain why a month departs from history. Send null to clear.

noteoptional stringnullable

Free-form notes about the adjustment. Send null to clear.

expires_atoptional string (date-time)nullable

When the override stops being applied to newly generated schedules.

Clear it to keep the override applying until it is deactivated or deleted. Send null to clear.

activeoptional boolean

Whether the override is taken into account when a schedule is generated.

Deactivating parks the override without losing it; it is skipped whatever its effective window says, and can be reactivated later.

idstring

Demand override ID.

objectstringenumValues:demand_override

Resource type identifier.

scope_typestringenumValues:itemproduct_lineaccount

What the override targets.

  • item: a single item.
  • product_line: every item sold under one product line.
  • account: every item in the plan, which is how a blanket assumption such as "plan for double demand" is expressed.
scopeentityExpandablenullable

The item or product line the override targets.

An account-wide override has no scope resource, because it targets every planned item rather than one thing.

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

period_starts_atstring (date-time)

First day of the demand period the override applies to.

Overrides are applied month by month, so every calendar month the period touches is adjusted and any time of day is ignored.

period_ends_atstring (date-time)

Last day of the demand period the override applies to.

adjustmentstringenumValues:absolutedelta_unitsdelta_percent

How the value adjusts the forecast.

  • absolute: replaces the forecast for each month in the period.
  • delta_units: adds the value to each month in the period.
  • delta_percent: scales each month in the period by the value as a percentage.

When several overrides land on the same month they are applied in that order, so a percentage always acts on the already-adjusted number. An adjusted month is never taken below zero.

valuenumber

The amount of the adjustment, interpreted according to adjustment.

A delta_percent value is a number of percent, so -25 plans a quarter less than the forecast.

unitunitnullable

The unit the value is expressed in.

Recorded for context only: the value is applied to the planned demand without unit conversion, so a unit adjustment should be stated in the unit the item is planned in.

reasonstringnullableenumValues:new_customerlost_accountpromotion

Why the adjustment was made.

The reason is carried into each schedule the override changes, so a plan can explain why a month departs from history.

notestringnullable

Free-form notes about the adjustment.

created_byactornullable

The actor that created the override.

May be a user, an API key, or an agent.

effective_atstring (date-time)

When the override starts being applied to newly generated schedules.

expires_atstring (date-time)nullable

When the override stops being applied to newly generated schedules.

An override with no expiry keeps applying until it is deactivated or deleted.

statusstringenumValues:activeinactive

Whether the override is taken into account when a schedule is generated.

An inactive override is skipped whatever its effective window says, which is how a prepared adjustment is parked without losing it.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

200

Successful response for Update Demand Override