Add a new cost line for one of the five line-typed cost surfaces
— order, gateway, shipping (profile rule), variable, or
fixed. The server assigns a ULID for the new line.
The line body is discriminated by costType — see the
per-type schemas (OrderCostLine, GatewayCostLine,
ShippingProfileCostLine, VariableCostLine, FixedCostLine)
for the shape required by each.
Triggers a per-order COGS recalculation downstream — except for
variable and fixed, which apply at aggregate report time and
do not require per-order recalc.
Required scope: costs:write.
Documentation Index
Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
Use this file to discover all available pages before exploring further.
Your Upstack API key. Starts with upstack_.
The pixel id the request targets.
line shape is discriminated by costType — the listed schemas
for each cost type are validated server-side. Sending an
OrderCostLine shape with costType=variable is rejected with 400.
The five cost-line surfaces. Each value selects the corresponding
line shape in the line (POST) or updates (PUT) field of the
request body.
order, gateway, shipping, variable, fixed One of the per-type line shapes, selected by costType.
The updated cost config (with the new line appended).