curl --request PUT \
--url https://api.upstackdata.com/accounts/api/account/settings/order \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>' \
--data '
{
"countPendingOrders": false,
"countVoidedOrders": false,
"refundDateAttribution": "refund_date",
"exclusionFilters": [
{
"name": "Exclude POS",
"enabled": true,
"conditionGroups": [
{
"logic": "and",
"conditions": [
{
"field": "sourceName",
"operator": "equals",
"value": "pos"
}
]
}
]
}
]
}
'{
"orderSettings": {
"countPendingOrders": false,
"countVoidedOrders": false,
"refundDateAttribution": "refund_date",
"exclusionFilters": [
{
"id": "3f6c1e2a-8b4d-4c7e-9f10-2a5b6c7d8e90",
"name": "Exclude POS",
"enabled": true,
"conditionGroups": [
{
"id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"logic": "and",
"conditions": [
{
"id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
"field": "sourceName",
"operator": "equals",
"value": "pos"
}
]
}
],
"createdAt": "2026-10-12T16:10:37.902Z",
"updatedAt": "2026-10-12T16:10:37.902Z"
}
]
}
}{
"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>"
]
}
]
}Replace order settings and order exclusion filters
Replace the account’s order settings in one call, covering pending and voided orders, refund dating, and the complete list of order exclusion filters.
curl --request PUT \
--url https://api.upstackdata.com/accounts/api/account/settings/order \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>' \
--data '
{
"countPendingOrders": false,
"countVoidedOrders": false,
"refundDateAttribution": "refund_date",
"exclusionFilters": [
{
"name": "Exclude POS",
"enabled": true,
"conditionGroups": [
{
"logic": "and",
"conditions": [
{
"field": "sourceName",
"operator": "equals",
"value": "pos"
}
]
}
]
}
]
}
'{
"orderSettings": {
"countPendingOrders": false,
"countVoidedOrders": false,
"refundDateAttribution": "refund_date",
"exclusionFilters": [
{
"id": "3f6c1e2a-8b4d-4c7e-9f10-2a5b6c7d8e90",
"name": "Exclude POS",
"enabled": true,
"conditionGroups": [
{
"id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"logic": "and",
"conditions": [
{
"id": "c2d3e4f5-a6b7-4c8d-9e0f-1a2b3c4d5e6f",
"field": "sourceName",
"operator": "equals",
"value": "pos"
}
]
}
],
"createdAt": "2026-10-12T16:10:37.902Z",
"updatedAt": "2026-10-12T16:10:37.902Z"
}
]
}
}{
"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>"
]
}
]
}account:write
Use this to change which orders count in reporting, for example to leave POS sales
or wholesale-tagged orders out of revenue and attribution.
It replaces, it doesn’t merge
- All four fields are required, and the body becomes the complete settings.
- The
exclusionFiltersyou send become the whole list. A filter you leave out is deleted, and[]deletes them all. - To add one filter, read the current settings with Get order settings, append the new filter, and send the full list back.
- Send
idandcreatedAtback on existing filters to keep them. New filters, groups, and conditions without anidget a UUID. Every filter’supdatedAtis set to the time of the request, changed or not.
Validation
Unknown fields are rejected at every level with400. Booleans must be JSON
booleans, so "true" fails. Each condition’s operator has to be one its field
supports:
field | Operators | value |
|---|---|---|
sourceName | equals, not_equals, in, not_in, contains | string, or a list of strings for in and not_in |
tags | array_includes, array_includes_any | string or list of strings |
value | equals, not_equals, greater_than, less_than, greater_than_or_equals, less_than_or_equals | number |
paymentGateway | equals, not_equals, in, not_in | string, or a list of strings for in and not_in |
name of 1 to 100 characters.
After you save
The web app uses the new settings in its reports. API queries still need them passed asorderSettings, as described on
Get order settings.
Related
- Get order settings to read the current settings first.
upstack account settings order setreplaces them from the CLI.
Authorizations
Your Upstack API key. Starts with upstack_.
The pixel id the request targets.
Body
Which orders count, how refunds are dated, and which orders are excluded. The web
app applies these to every revenue, attribution, and cohort figure it shows. The
API query endpoints don't read them, so pass them in each query's orderSettings.
Include pending orders in revenue and attribution measures. Must be a JSON boolean.
Include voided orders in revenue and attribution measures. Must be a JSON boolean.
Which date a refund is counted on.
refund_date: the day the refund was processed, matching Shopify. The default.order_date: the date of the original order.
refund_date, order_date The complete list of exclusion filters. An empty array removes them all.
50Show child attributes
Show child attributes
Response
The updated order settings (with server-assigned ids and timestamps).
Which orders count, how refunds are dated, and which orders are excluded. The web
app applies these to every revenue, attribution, and cohort figure it shows. The
API query endpoints don't read them, so pass them in each query's orderSettings.
Show child attributes
Show child attributes
Was this page helpful?