Retrieve the collections report of a center
NOTE : This API is deprecated. Requesting not to use this API for any new integrations as the data cannot be reconciled to new collection report available in the UI. This API retrieves the list of collections of the specified center during the selected date range.You must specify appropriate details for the center_id, start_date, and end_date parameters in the API request.Note : The date range that you specify cannot be more than seven days.
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/Centers/{center_id}/collections_report
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| center_id | string | Yes | Mandatory Unique 32-character identifier of the center. |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| start_date | string (date) | Yes | — | Mandatory Format:YYYY-MM-DD Retrieve collections of the center starting from this date. Here, the start time and date refers to the starting time and date of the specified center, not of UTC. For example, if you specify 'start_date' as 2020-08-03, this API will list out all the appointments for which payments have been added beginning from Aug 3, 2020. |
| end_date | string (date) | Yes | — | Mandatory Format:YYYY-MM-DD Retrieve collections of the center until this date (inclusive). Here, the end time and date refers to the ending time and date of the specified center, not of UTC. For example, if you specify 'end_date' as 2020-08-05, this API will list out all the appointments for which payments have been added until Aug 5, 2020 (inclusive). |
| include_transactions | boolean | No | false | Optional Indicates whether transactions are to be retrieved as part of the center's collections. Default value: false. |
| include_employee_tips | boolean | No | false | Optional Indicates whether employee tips are to be retrieved as part of the center's collections. Default value: false. |
Response
Success (200 OK)
{}
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/Centers/{center_id}/collections_report?start_date={{start_date}}&end_date={{end_date}}' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/Centers/{center_id}/collections_report', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/v1/Centers/{center_id}/collections_report',
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/Centers/{center_id}/collections_report");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/Centers/{center_id}/collections_report')
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 |