Skip to main content
PUT
Required scope: 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 exclusionFilters you 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 id and createdAt back on existing filters to keep them. New filters, groups, and conditions without an id get a UUID. Every filter’s updatedAt is set to the time of the request, changed or not.

Validation

Unknown fields are rejected at every level with 400. Booleans must be JSON booleans, so "true" fails. Each condition’s operator has to be one its field supports: Limits: 50 filters, 20 condition groups per filter, 20 conditions per group, and a filter 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 as orderSettings, as described on Get order settings.

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.

Body

application/json

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.

countPendingOrders
boolean
required

Include pending orders in revenue and attribution measures. Must be a JSON boolean.

countVoidedOrders
boolean
required

Include voided orders in revenue and attribution measures. Must be a JSON boolean.

refundDateAttribution
enum<string>
required

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.
Available options:
refund_date,
order_date
exclusionFilters
object[]
required

The complete list of exclusion filters. An empty array removes them all.

Maximum array length: 50

Response

The updated order settings (with server-assigned ids and timestamps).

orderSettings
object
required

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.