put https://api.zenoti.com/v1/guests//memberships//freeze
This API helps you to freeze 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 start_date
, end_date
, fee
, type
, and changed_unfreeze_date
parameters in the API request body.
Request Body Parameters
Name | Type | Description |
---|---|---|
start_date | datetime | Optional Date from which the guest's membership is to be frozen. 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 start_date value is lesser than the end_date value. |
end_date | datetime | Optional Date until which the guest's membership is to be frozen. If you do not specify any date, the parameter's value is considered as null by default. Format: YYYY-MM-DD. Note: You must ensure that the end_date value is greater than the start_date value. |
fee | decimal | Optional Fee (in $) that the guest needs to pay for freezing the membership. The default value for this parameter is 0. Note: You cannot specify the value of this paramater as lesser than 0. |
type | enum | Optional Type of membership freeze process. Indicates one of the following: 2 - Freeze benefits and shift next payment date by freeze period. 3 - Allow guest to use benefits and skip payments in freeze period. Note: You can only specify the value of this parameter as either 2 or 3. |
changed_unfreeze_date | datetime | Optional Date that replaces the previous end_date value of the guest membership. In other words, changed_unfreeze_date is the new date until which the guest's membership is to be frozen.Format: YYYY-MM-DD. Note: You must ensure that the changed_unfreeze_date value is greater than the start_date value. |
freeze_reason_center_id | int | This is the unique freeze reason id in the center. |
freeze_fee_type | enum | The type of freeze fee. This can be any one of the following: Default = -1, Recurring = 1, OneTime = 2. |
comments | string | Comments for freezing the membership. |
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 frozen. |
error Object
code | error_message |
---|---|
4005 | membership of the user is not found. |
502 | Membership cannot be found. |
502 | Freeze date must be greater than today’s date. |
502 | Unfreeze date must be greater than today’s date. |
502 | Unfreezing date must be greater than Freezing date. |
502 | Freeze Fee cannot be less than $0. |
502 | Invalid input given for Freeze type. |
428 | Invoice For the membership is not found. |
4077 | Membership Is already in cancelled or Freeze state. |
502 | Change unfreeze date cannot be passed with Start date and End date values. |
3006 | Invalid membership details. |