Within this request, you can edit the intercom's name, schedule, and enable/disable call processing.
The schedule and call processing settings are applied to the device. You can have different schedules for different devices under the same account. It is possible that one device receives calls while another device does not.
The intercom's name is applied to the account and remains the same across devices.
PATCH /api/v1/intercom/{intercom} Headers
Authorization
Bearer token
Accept
application/json
X-Client
ios-cctv|android-cctv|thick-legal|web
X-UUID
unique device id
Body
json
JSON
{
"title": "My intercom",
"is_enabled": "true",
"timetable": {
"days": [
{
"type": "monday|tuesday|wednesday|thursday|friday|saturday|sunday|same_every_day",
"from": "10:00+01:00",
"to": "18:00+01:00"
}
],
"intervals": [
{
"from": "2000-02-12T10:00:00+01:00",
"to": "2000-12-01T09:00:00+01:00"
},
{
"from": "2001-02-12T10:00:00:00+01:00",
"to": "2001-12-01T09:00:00:00+01:00"
}
]
}
}
intercomoptional
int
Identifier of the intercom to be updated
titlerequired
string
Intercom name
is_enabledrequired
bool
Enable/disable call processing on the current device
timetablerequired
array
Configure the call schedule on the current device. Calls will only be received during the specified time intervals
Response
200
Successful response
JSON
{
"id": 180,
"title": "House",
"is_online": true,
"is_enabled": true,
"timetable": {
"days": [
{
"to": "23:59:59+05:00",
"from": "00:00:00+05:00",
"type": "tuesday"
},
{
"to": "23:59:59+05:00",
"from": "00:00:00+05:00",
"type": "wednesday"
},
{
"to": "23:59:59+05:00",
"from": "00:00:00+05:00",
"type": "saturday"
}
],
"intervals": []
},
"department": 100,
"address": "Cameras",
"camera": {
"id": 833,
"group_id": 124,
"status": "active",
"type": "media_server_v2",
"start_at": "2022-04-19 16:43:15",
"created_at": "2022-02-18 15:05:53",
"billing_id": null,
"pretty_name": "Intercom",
"lat": null,
"lng": null,
"azimuth": null,
"is_archive_recording": true,
"is_bridge": false,
"is_favorite": false,
"user_status": "active",
"name": "Intercom"
},
"status": "confirmed",
"created_at": null,
"updated_at": "2022-04-20T12:34:32.000000Z"
}
401
Authorization token not provided or invalid, see Obtaining a token
404
If the intercom does not belong to the user or does not exist
422
Returns a JSON object with an error, see Validation
JSON
{
"message": "There won't be any informative message here",
"errors": {
"any_key": [
"Here the error cause will be described"
]
}
}
Example
JSON
curl -k --location --request PATCH 'https://vms.local/api/v1/intercom/{intercom}' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id' \
--header 'Content-Type: application/json \
--data-raw '{
"title": "My intercom",
"is_enabled": "true",
"timetable": {
"days": [
{
"type": "monday|tuesday|wednesday|thursday|friday|saturday|sunday|same_every_day",
"from": "10:00+01:00",
"to": "18:00+01:00"
}
],
"intervals": [
{
"from": "2000-02-12T10:00:00+01:00",
"to": "2000-12-01T09:00:00+01:00"
},
{
"from": "2001-02-12T10:00:00:00+01:00",
"to": "2001-12-01T09:00:00:00+01:00"
}
]
}
}'