Skip to main content
POST
Add a COG line to a variant

Authorizations

x-api-key
string
header
required

Your Upstack API key. Starts with upstack_.

x-pixel-id
string
header
required

The pixel id the request targets.

Path Parameters

productId
string
required
variantId
string
required

Body

application/json
cost
number
required

Per-unit cost in the account's reporting currency.

effectiveStartDate
string
required

ISO-8601 date the new line begins applying.

effectiveEndDate
string | null

ISO-8601 date the line stops applying — omit / null for open-ended.

description
string

Response

The updated variant (with the new line added to history).

variant
object
required

A stored product variant, synced from Shopify. Each variant record also carries its parent product's details, so one call gives you both.

The fields below are the ones worth relying on; the record also includes internal index keys (lowercased titles, composite ids) that you should ignore.