Skip to main content
DELETE
Delete a COG line
Required scope: costs:write Use this to remove a line added by mistake, or one you no longer want to override the Shopify cost. Upstack recalculates the past orders the deleted line covered, using the next cost in line as described on Add a COG line.
  • Send no body. The response is the variant without the line.
  • Only lines in manualCostHistory can be deleted. Lines synced from Shopify return 404 (COG line not found).
  • There’s no undo. Adding the same values back creates a line with a new id.
  • Deleting a line that’s already gone returns 404. If a delete times out and you retry, a 404 usually means the first attempt worked; check Get a product variant to confirm.

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

Shopify product id.

variantId
string
required

Shopify variant id.

cogId
string
required

The line's id from the variant's manualCostHistory.

Response

The updated variant (with the line removed).

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.