put https://api.zenoti.com/v1/guests//memberships//cancel
This API helps you to cancel the membership of a guest.
You must specify appropriate details for the guest_id
and membership_id
parameters in the API request.
Optionally, you can specify the necessary details for the cancellation_date
and termination_date
parameters in the API request body.
Request Body Parameters
Name | Type | Description |
---|---|---|
cancellation_date | datetime | Optional Date from which the guest's membership is to be cancelled. If you do not specify any date, the current date is considered for the parameter by default. Format: YYYY-MM-DD. Note: You must ensure that the cancellation_date value is lesser than the termination_date value. |
termination_date | datetime | Optional Date from which the guest's membership is to be terminated. If you do not specify any date, the current date is considered for the parameter by default. Format: YYYY-MM-DD. Note: You must ensure that the termination_date value is greater than the cancellation_date value. |
cancel_reason_id | int | The id of the reason for cancellation. |
comments | string | The comments added for the cancellation of the membership |
grace_period | string | The grace period for the cancellation of membership. You can activate a cancelled membership only within the grace period. |
Response Details
Name | Type | Description |
---|---|---|
error | object | Object that contains error message and error code details. For more information, refer to the error Object table. If error is null, it indicates that the guest's membership has been successfully canceled. |
error Object
code | error_message |
---|---|
4005 | Invalid guest_id. |
4076 | Membership is inactive. |
403 | Not authorized to cancel membership. |
502 | Cancel date must be greater than today's date. |
502 | Termination date must be greater than today's date. |
502 | Termination date must be greater than cancel date. |
4077 | Membership is already cancelled. |