List a user's enrollments
/users/{user_id}/enrollmentsLists 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.
Autonomous mode: the API credential secret, sent as a bearer token. Credential secrets are identified by a fixed prefix.
In: header
Path Parameters
Query Parameters
1 <= value <= 200Value in
- "active"
- "suspended"
- "revoked"
Value in
- "manual"
- "sale"
- "subscription"
date-timeResponse Body
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" } ]}List enrollments GET
Lists enrollments across all users in the account. At least one of `user_id`, `product_id`, `delivery_id`, or `updated_after` must be supplied; requests without any of these filters are rejected with a validation error. Revoked enrollments are excluded unless `status=revoked` or `deleted=true` is supplied. Each item includes a `links.self` URL pointing to the enrollment under its user.
Create an enrollment POST
Grants the user access to a delivery. The `Idempotency-Key` header is required. If the user already has an enrollment for the same delivery, the existing enrollment is reactivated and returned with `200 OK` instead of creating a new one. The credentials must have access to every product included in the delivery. A delivery that does not exist or is archived is rejected with a validation error on `delivery_id`.