Skip to main content
POST
/
v1
/
subscriptions
/
filter
Filter
curl --request POST \
  --url https://{defaultHost}/v1/subscriptions/filter \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filter": {
    "type": "condition",
    "attribute_name": "status",
    "operator_label": "is",
    "comparison_value": "active"
  }
}
'
{
  "object": "list",
  "pagination": {
    "count": 1,
    "limit": 20,
    "page": 1,
    "url": "/v1/subscriptions/filter"
  },
  "data": [
    {
      "id": "f8825888-5b03-4007-96d8-4d060cd332b6",
      "object": "subscription",
      "ad_hoc_amount": null,
      "affiliation_expires_at": null,
      "cancel_at_period_end": false,
      "currency": "usd",
      "current_period_end_at": 1785077907,
      "current_period_start_at": 1782485907,
      "ended_at": null,
      "finite": false,
      "last_renewal_reminder_sent_at": null,
      "live_mode": true,
      "manual_payment": false,
      "metadata": {},
      "pending_update": {},
      "price_readonly": false,
      "portal_url": "http://app.example.com/portal_redirect/subscriptions/f8825888-5b03-4007-96d8-4d060cd332b6",
      "quantity": 1,
      "remaining_period_count": null,
      "restart_on_completed": false,
      "restore_at": null,
      "subtotal_amount": 2900,
      "status": "active",
      "tax_enabled": false,
      "trial_end_at": null,
      "trial_start_at": null,
      "variant_options": null,
      "affiliation": null,
      "current_cancellation_act": null,
      "current_period": "44a97d1f-b748-4bc1-9b8a-7454d44620a0",
      "customer": "b04fbd01-7e4f-485e-8369-0758ec001e6a",
      "discount": null,
      "manual_payment_method": null,
      "payment_method": "ee673583-7b19-4e29-b101-37a56f3237ce",
      "price": "43154265-e09d-4f44-8910-b144aefa7521",
      "purchase": "4498f167-c329-4304-8961-cee380a1b9c6",
      "shipping_method": null,
      "variant": null,
      "created_at": 1782485907,
      "updated_at": 1782485907
    }
  ]
}

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" }

Response

200 - application/json

Success

object
string

A string describing the object type returned.

pagination
object
data
array

An array of objects.