Skip to main content
PUT
/
accounts
/
api
/
account
/
settings
/
order
Replace order settings
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": "not_equals",
              "value": "pos"
            }
          ]
        }
      ]
    }
  ]
}
'
{
  "orderSettings": {
    "countPendingOrders": true,
    "countVoidedOrders": true,
    "exclusionFilters": [
      {
        "name": "Exclude POS",
        "enabled": true,
        "conditionGroups": [
          {
            "conditions": [
              {
                "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                "value": "<string>"
              }
            ],
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        ],
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

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.

Body

application/json

Account-wide order analytics config. Drives every revenue, attribution, and cohort number across the dashboard and the public query API. Defaults when unset: countPendingOrders=false, countVoidedOrders=false, refundDateAttribution=refund_date, exclusionFilters=[].

PUT semantics are whole-object replace — any existing filter not present in the PUT body is deleted. Max 50 filters per account.

countPendingOrders
boolean
required

Include pending orders in revenue / attribution metrics.

countVoidedOrders
boolean
required

Include voided orders in revenue / attribution metrics.

refundDateAttribution
enum<string>
required

How refunds are dated for revenue attribution.

  • refund_date — matches Shopify, defaults to this.
  • order_date — attribute the refund to the original order date.
Available options:
refund_date,
order_date
exclusionFilters
object[]
required
Maximum array length: 50

Response

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

orderSettings
object
required

Account-wide order analytics config. Drives every revenue, attribution, and cohort number across the dashboard and the public query API. Defaults when unset: countPendingOrders=false, countVoidedOrders=false, refundDateAttribution=refund_date, exclusionFilters=[].

PUT semantics are whole-object replace — any existing filter not present in the PUT body is deleted. Max 50 filters per account.