List a user's enrollments

GET/users/{user_id}/enrollments

Lists the user's enrollments, one per delivery.

When the credentials are restricted to specific products, only enrollments for deliveries that include at least one of those products are returned. Revoked enrollments are excluded unless status=revoked or deleted=true is supplied.

AuthorizationBearer <token>

Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.

In: header

Path Parameters

user_id*string

Query Parameters

limit?integer
Range1 <= value <= 200
cursor?string
product_id?string
delivery_id?string
status?string

Value in

  • "active"
  • "suspended"
  • "revoked"
origin?string

Value in

  • "manual"
  • "sale"
  • "subscription"
deleted?boolean
updated_after?string
Formatdate-time

Header Parameters

X-Client-Request-Id?string

Optional client-generated identifier of the request, up to 64 characters from [A-Za-z0-9._-]. Echoed back in the response and recorded in the request log; it never replaces the server-generated X-Request-Id.

Lengthlength <= 64

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/users/string/enrollments"
{  "data": [    {      "created_at": "2019-08-24T14:15:22Z",      "deleted": true,      "delivery_id": "string",      "ends_at": "2019-08-24T14:15:22Z",      "id": "string",      "object": "enrollment",      "origin": {        "kind": "manual",        "sale_id": "string",        "subscription_id": "string"      },      "product_ids": [        "string"      ],      "revision": "string",      "status": "active",      "subscription_ends_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "user_id": "string"    }  ]}