Skip to main content
PUT
/
accounts
/
api
/
costs
/
lines
/
{lineId}
Update a cost line
curl --request PUT \
  --url https://api.upstackdata.com/accounts/api/costs/lines/{lineId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-pixel-id: <api-key>' \
  --data '
{
  "costType": "variable",
  "updates": {
    "percentRate": 2.5
  }
}
'
{
  "config": {}
}

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.

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

lineId
string
required

Body

application/json

Partial update — every field of the corresponding line shape is optional in updates. Only the supplied fields are written; omitted fields stay as-is.

costType
enum<string>
required

The five cost-line surfaces. Each value selects the corresponding line shape in the line (POST) or updates (PUT) field of the request body.

Available options:
order,
gateway,
shipping,
variable,
fixed
updates
object
required

Subset of fields from the line shape selected by costType.

Response

The updated cost config.

config
object
required