Skip to main content
POST
/
v1
/
orders
/
filter
Filter
curl --request POST \
  --url https://{defaultHost}/v1/orders/filter \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filter": {
    "type": "condition",
    "attribute_name": "order_type",
    "operator_label": "is",
    "comparison_value": "checkout"
  }
}
'
{
  "object": "list",
  "pagination": {
    "count": 1,
    "limit": 20,
    "page": 1,
    "url": "/v1/orders/filter"
  },
  "data": [
    {
      "id": "5ea5e5f3-0390-4e2a-b255-22231ab39cc9",
      "object": "order",
      "fulfillment_status": "unfulfilled",
      "live_mode": true,
      "number": "0000",
      "order_type": "checkout",
      "return_status": "not_returned",
      "shipment_status": "unshippable",
      "portal_url": "http://app.example.com/portal_redirect/orders/5ea5e5f3-0390-4e2a-b255-22231ab39cc9",
      "statement_url": "http://app.example.com/statements/orders/5ea5e5f3-0390-4e2a-b255-22231ab39cc9",
      "status": "paid",
      "checkout": "95bef006-29a2-4d20-9d1d-74827dbfd903",
      "created_at": 1778010895,
      "updated_at": 1778010895
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developer.surecart.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filter
object

A rule tree describing how to filter records. May be a single rule_condition or a rule_group combining multiple conditions and nested groups with and / or. The valid attribute_name and operator_label values for each resource come from the corresponding GET /v1/<resource>/filter_schema endpoint.

Example:
{
  "type": "group",
  "combinator": "and",
  "conditions": [
    {
      "type": "condition",
      "attribute_name": "order_type",
      "operator_label": "is",
      "comparison_value": "checkout"
    },
    {
      "type": "condition",
      "attribute_name": "products.name",
      "operator_label": "contains",
      "comparison_value": "shirt"
    }
  ]
}

Response

200 - application/json

Success

object
string

A string describing the object type returned.

pagination
object
data
array

An array of objects.