Subscriptions

Supported Formats

json

GET /open_api/v1/subscriptions
Subscriptions index

Index of users’ subscriptions, paginated. Order by created_at descendant.

Supported Formats

json

Examples

# /open_api/v1/subscriptions?user_id=211&page=1&per_page=3
{
  "subscriptions": [
    {
      "id": 2809,
      "user_id": 211,
      "created_at": "2022-08-26T09:41:02.426+02:00",
      "expiration_date": "2022-09-26T09:41:02.427+02:00",
      "canceled_at": null,
      "plan_id": 1
    },
    {
      "id": 2783,
      "user_id": 211,
      "created_at": "2022-06-06T20:03:33.470+02:00",
      "expiration_date": "2022-07-06T20:03:33.470+02:00",
      "canceled_at": null,
      "plan_id": 1
    },
    {
      "id": 2773,
      "user_id": 211,
      "created_at": "2021-12-23T19:26:36.852+01:00",
      "expiration_date": "2022-01-23T19:26:36.852+01:00",
      "canceled_at": null,
      "plan_id": 1
    }
  ]
}

Params

Param name Description
page
optional

Page number

Validations:

  • Must be a Integer

per_page
optional

Number of objects per page. Default is 20.

Validations:

  • Must be a Integer

user_id
optional

Scope the request to one or various users.

Validations:

  • Must be one of: Integer, Array.

plan_id
optional

Scope the request to one or various plans.

Validations:

  • Must be one of: Integer, Array.