curl --request PUT \
--url https://api.upstackdata.com/accounts/api/costs/shipping-settings \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>' \
--data '
{
"method": "fixed_rate",
"fixedRateAmount": 7.5,
"currency": "USD"
}
'
{
"config": {}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}COSTS
Update shipping cost settings
Switch the shipping cost attribution method. Pass fixedRateAmount
when switching to fixed_rate; it is not validated as required, and
without it no fixed charge applies.
Triggers a per-order COGS recalculation downstream.
Required scope: costs:write.
PUT
/
accounts
/
api
/
costs
/
shipping-settings
curl --request PUT \
--url https://api.upstackdata.com/accounts/api/costs/shipping-settings \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>' \
--data '
{
"method": "fixed_rate",
"fixedRateAmount": 7.5,
"currency": "USD"
}
'
{
"config": {}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}Authorizations
Your Upstack API key. Starts with upstack_.
The pixel id the request targets.
Body
application/json
Shipping cost attribution method.
shopify_charges— use the shipping charge captured on each order.fixed_rate— apply a flat per-order amount (setfixedRateAmount; without it no fixed charge applies).shipping_profiles— match shipping zones / weights configured in Shopify.
Available options:
shopify_charges, fixed_rate, shipping_profiles Applied as the per-order shipping cost when method=fixed_rate. Optional — without it no fixed charge applies.
Required range:
x >= 0ISO currency code (e.g. USD).
Response
The updated shipping configuration.
Was this page helpful?