subscriptions

Gets a list of subscriptions

Changed on

Lists subscriptions.

get/api/v1/subscriptions

Request

Query parameters

includestring
Example:first_load

Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes

per_pageinteger
Example:20

The number of records to return for each request, default is 20

pageinteger
Example:1

The page number to return for this request (when performing pagination), default is 1

sortstring[]

Order the list by choosing a column and direction. Each value uses the form column|asc or column|desc.

Single sort — for example sort=created_at|desc.

Multiple sorts — for example
sort[]=id|desc&sort[]=created_at|asc.

Only subscriptions table columns are recognized. Unsupported keys are ignored.

[
  "created_at|desc"
]

Headers

X-API-TOKENstring required
Example:TOKEN

The API token to be used for authentication

X-Requested-Withstring required
Example:XMLHttpRequest

Used to send the XMLHttpRequest header

Response

A list of subscriptions

Example response

{
  "data": [
    {
      "id": "Opnel5aKBz",
      "user_id": "Ua6Rw4pVbS",
      "product_id": "Pr5Ft7yBmC",
      "recurring_invoice_id": "Ri2Yt8zJkP",
      "is_recurring": true,
      "frequency_id": "1",
      "auto_bill": "always",
      "promo_code": "PROMOCODE4U",
      "promo_discount": 10,
      "is_amount_discount": true,
      "allow_cancellation": true,
      "per_seat_enabled": true,
      "currency_id": 1,
      "max_seats_limit": 100,
      "trial_enabled": true,
      "trial_duration": 14,
      "allow_query_overrides": true,
      "allow_plan_changes": true,
      "refund_period": 30,
      "webhook_configuration": "expand reference for this",
      "archived_at": 1434342123,
      "created_at": 134341234234,
      "updated_at": 134341234234
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 1,
      "current_page": 1,
      "total_pages": 1
    }
  }
}

Changes

    • info

      added the new optional query request parameter sort

    • info

      added the new optional query request parameter page

    • info

      added the new optional query request parameter per_page

    • info

      the response optional property // became read-only for the status