# Retrieve an enrollment

`GET https://api.cademi.com.br/api/v3/users/{user_id}/enrollments/{enrollment_id}`

Operation ID: `users.enrollments.get` · API v3

Retrieves an enrollment of the user by its public ID.

The response includes an `ETag` representing the current revision. Send this value in the `If-Match` header when updating the enrollment to avoid overwriting a newer version.

Required permissions: `enrollments.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `user_id` | path | string | yes |  |
| `enrollment_id` | path | string | yes |  |

## Responses

### 200

Returns the requested enrollment.

Body: `data`: Enrollment.

Fields of Enrollment:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | no |  |
| `deleted` | boolean | yes |  |
| `delivery_id` | string | yes |  |
| `ends_at` | string or null (date-time) | no |  |
| `id` | string | yes |  |
| `object` | string, one of `enrollment` | yes |  |
| `origin` | object | yes |  |
| `product_ids` | array of string | yes |  |
| `revision` | string | yes |  |
| `status` | string, one of `active`, `suspended`, `revoked` | yes |  |
| `subscription_ends_at` | string or null (date-time) | no |  |
| `updated_at` | string (date-time) | no |  |
| `user_id` | string | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The enrollment was not found, does not belong to the user, has been revoked, or is not accessible with the current credentials.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
