Get calendar resource by ID
http
GET https://services.leadconnectorhq.com/calendars/resources/{resourceType}/{id}Authorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Path parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
resourceType | string | Yes | Calendar Resource Type | |
id | string | Yes | Calendar Resource ID |
Responses
200 - Calendar resource fetched
locationId(string, required): Account ID of the resourcename(string, required): Name of the resource Example:yoga roomresourceType(string, required): Possible values: 'equipments', 'rooms'isActive(boolean, required): Whether the resource is activedescription(string): Description of the resourcequantity(number): Quantity of the resourceoutOfService(number): Indicates if the resource is out of service Example:0capacity(number): Capacity of the resource Example:85calendarIds(string[], required): Calendar IDs
json
{
"locationId": "string",
"name": "yoga room",
"resourceType": "equipments",
"isActive": true,
"description": "string",
"quantity": 0,
"outOfService": 0,
"capacity": 85,
"calendarIds": [
"Jsj0xnlDDjw0SuvX1J13",
"oCM5feFC86FAAbcO7lJK"
]
}400 - Bad Request
json
{}Example
curl -X GET 'https://services.leadconnectorhq.com/calendars/resources/YOUR_resourceType/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/calendars/resources/YOUR_resourceType/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/calendars/resources/YOUR_resourceType/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/calendars/resources/YOUR_resourceType/YOUR_id');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);