Change/Cancel Auto-renewal of Guest Membership
This API allows you to change or cancel the membership renewal of a guest.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
PUT /v1/guests/{guest_id}/memberships/{user_membership_id}/renewal
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| guest_id | string | Yes | Mandatory Unique 32-character identifier of the guest. |
| user_membership_id | string | Yes | Mandatory Unique identifier of the user membership |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| renewal_membership_id | string | No | Unique identifier of the user membership that requires a renewal. Note: Can be null. |
| is_list_price | boolean | No | True: If the membership price is the list price. False: If the membership price is not the list price. |
| discount_price | number (float) | No | Discount price of the membership. |
Response
Success (200 OK)
{}
Example
curl --request PUT \
--url 'https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/renewal' \
--header 'Authorization: bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"renewal_membership_id": "string",
"is_list_price": true,
"discount_price": 0
}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/renewal', {
method: 'PUT',
headers: {
'Authorization': 'bearer {{access_token}}',
'Content-Type': 'application/json'
},
body: JSON.stringify({ renewal_membership_id: 'string', is_list_price: true, discount_price: 0 })
});
const data = await response.json();
import requests
response = requests.put(
'https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/renewal',
headers={
'Authorization': 'bearer {{access_token}}',
},
json={'renewal_membership_id': 'string', 'is_list_price': True, 'discount_price': 0}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var content = new StringContent(
JsonSerializer.Serialize(new { renewal_membership_id = "string", is_list_price = true, discount_price = 0 }),
Encoding.UTF8, "application/json");
var response = await client.PutAsync(
"https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/renewal", content);
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/renewal')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Put.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
request['Content-Type'] = 'application/json'
request.body = { renewal_membership_id: 'string', is_list_price: true, discount_price: 0 }.to_json
response = http.request(request)
data = JSON.parse(response.body)
Error codes
| Status | Description |
|---|---|
| 400 | 400 |
| 401 | Unauthorized -- invalid or expired access token |
| 429 | Too many requests -- rate limit exceeded |