Fetch the pending membership collection amount of a guest
This API helps you to fetch the pending membership collection amount that a guest needs to pay. This membership collection amount gets accumulated after a guest’s membership has been frozen on multiple occasions. Guests must pay that membership fee amount to reactivate their membership.
You must specify appropriate details for the guest_id and membership_id parameters in the API request.
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
GET /v1/guests/{guest_id}/memberships/{user_membership_id}/pending_dues
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. |
| membership_id | string | Yes | Mandatory Unique 32-character identifier of the guest's membership. |
Response
Success (200 OK)
{
"pending_dues": {
"total_amount": "10"
},
"error": {}
}
Response fields
| Field | Type | Description |
|---|---|---|
| pending_dues | object | |
| pending_dues.total_amount | string | |
| error | object |
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/pending_dues' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/pending_dues', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/pending_dues',
headers={
'Authorization': 'bearer {{access_token}}',
},
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
"https://api.zenoti.com/v1/guests/{guest_id}/memberships/{user_membership_id}/pending_dues");
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}/pending_dues')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
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 |