Skip to main content
GET
/
api
/
v1
/
subscriptions
Get All Subscriptions
curl --request GET \
  --url http://localhost:8000/api/v1/subscriptions/ \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "google_ads_customer_id": 123,
      "subscription_plan_id": 123,
      "starts_at": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z",
      "subscription_type": "auto_renew",
      "id": 123,
      "date_added": "2023-11-07T05:31:56Z",
      "date_updated": "2023-11-07T05:31:56Z",
      "subscription_plan": {
        "name": "<string>",
        "price": "<string>",
        "id": 123,
        "date_added": "2023-11-07T05:31:56Z",
        "date_updated": "2023-11-07T05:31:56Z",
        "image_url": "<string>",
        "modules": [
          {
            "analysis_type": "keyword_pause",
            "constraint": 123,
            "analysis_frequency_hours": 123,
            "id": 123,
            "date_added": "2023-11-07T05:31:56Z",
            "date_updated": "2023-11-07T05:31:56Z",
            "is_autopilot_enabled": false
          }
        ]
      },
      "cancelled_at": "2023-11-07T05:31:56Z"
    }
  ],
  "total": 123,
  "limit": 123,
  "offset": 123
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

customer_id
integer | null
plan_id
integer | null
status
string | null
Pattern: ^(active|cancelled|expired|all)$
limit
integer
default:20
Required range: 1 <= x <= 100
offset
integer
default:0
Required range: x >= 0

Response

Successful Response

Schema for paginated subscriptions list response.

items
SubscriptionWithDetailsSchema · object[]
required
total
integer
required
limit
integer
required
offset
integer
required