Cancel an enrollment
cancel_enrollmentCancels a trainee’s session enrollment after confirmation and reports why cancellation fails if the enrollment is already cancelled or the session is completed or cancelled.
Instructions
Cancel one enrollment of a trainee in a session, after the user confirms it. The server asks the user itself: do not ask for a confirmation in the conversation.
An enrollment already cancelled, or in a session completed or cancelled, cannot be cancelled: the result then says why.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | Yes | Today's date, as an ISO date: it becomes the cancellation date. | |
| reason | Yes | Why the enrollment is cancelled. | |
| enrollment_id | Yes | Id of the enrollment to cancel. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | ||
| cancelled | Yes | ||
| enrollment_id | Yes |