Update Contact
You can update contact with the next types:
regular
- for monitors, intercom SIP numbers, etc.individual
- for individual panelsmulti
- for multiapartment panels
Contact number can take two formats:
inner protocol
SIP
For inner protocol
contact numbers with different type must match different pattern:
regular
regex is^\d{3}[1-9]-\d{2}-\d[0-8]-\d{2}$
, like [builing]-[unit]-[floor]-[apartment], for example '0001-01-11-11'individual
regex is^\d{2}[1-9]-\d{2}-\d[0-8]-\d{2}-[1-9]$
, like [builing]-[unit]-[floor]-[apartment]-[device number], for example '001-01-11-11-1'multi
regex is^\d{3}[1-9]-\d{2}-\d[1-9]$
, like [builing]-[unit]-[device number], for example '0001-01-01'
In general, building must be in range [1-999] for individual panel and [1-9999] - for other devices, unit: [00-99], floor: [00-98] (99 is reserved for multi- panel), apartment: [00-99], device: [0-8]
For SIP
contact numbers regex is sip:[0-9A-Za-z+\-_.]+@((((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?(?:\:\d{1,5})?)(\.|$)){4}\b)|([0-9]*[A-Za-z+\-_]+[0-9]*)(\.([0-9]*[A-Za-z+\-_]+[0-9]*))+)
, for example sip:[email protected]
or sip:[email protected]
If you want the device to skip all calls from some numbers you can add it to black list, using property in_black_list
. Call will be added to recent calls with proper icon.
If you want the device to immediately receive a call from the specified number use property auto_answer
.
Two parameters: auto_answer
and in_black_list
cannot be true
at the same time. If auto_answer
it true then in_black_list
will be set to false.
is_default
parameter can be true
only for panel-like contacts. Default panel will be played when panel viewer app will be opened. Only one contact on the device can be default panel.
Maximum number of contacts - 1000
Path Parameters
- entityUid integer required
Possible values:
>= 1
Unique Identifier for Item
- application/json
Request Body required
- name string required
- type string required
Possible values: [
regular
,individual
,multi
] - number string required
There is two format: inner number and SIP number
Inner number regexes for differen devices:
- ^\d{3}[1-9]-\d{2}-\d[0-8]-\d{2}$ - for regular device - monitor
- ^\d{3}[1-9]-\d{2}-\d[1-9]$ - for multiapartment panel
- ^\d{2}[1-9]-\d{2}-\d[0-8]-\d{2}-[1-9]$ - for individual panel
SIP number format: sip:[0-9A-Za-z+-.]+@((((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?(?::\d{1,5})?)(.|$)){4}\b)|([0-9]*[A-Za-z+-]+[0-9])(.([0-9][A-Za-z+-_]+[0-9]*))+), for example
sip:[email protected]
orsip:[email protected]
- is_favorite boolean required
Favorite contacts will be displayed at the top of the list
- is_default boolean required
This flag can be true only for panel-like contacts. Default panel will be played when panel viewer app will be opened
- auto_answer boolean required
If true device will answer immediatelly when received call from this contact.
auto_answer
andin_black_list
cannot be true at the same time - in_black_list boolean required
If true device will skip incoming call from this contact.
auto_answer
andin_black_list
cannot be true at the same time
- 200
- 400
- 401
OK
- invalid name
- invalid type
- invalid number
- Two parameters: auto_answer and in_black_list cannot be true at the same time
- A contact already exists with the same type and number
- You cannot add more than 10000 contacts
- Validation error. Required fields are not provided.
- Missed json body or wrong param.
- Wrong contact uid Response sample:
"error": "Wrong JSON body"
- Required field is not provided. Response sample:
"error": "Wrong JSON body: no value for `param`"
where param
- is a required field that was not provided
- Field was of the wrong type. Response sample:
"error": "Wrong JSON body: value `param` was of the wrong type"
where param
- is a field of the wrong type
- application/json
- Schema
- Example (from schema)
- Base
- No value
- Wrong param type
- Contact already exists
- Invalid name
- Invalid type
- Invalid number
- Invalid contact
- Cannot create new contact
- Wrong uid
- Contact exists
Schema
- error string
{
"error": true
}
{
"error": "Wrong JSON body"
}
{
"error": "Wrong JSON body: no value for `param`"
}
{
"error": "Wrong JSON body: value `param` was of the wrong type"
}
{
"error": "Contact with that type and number already exist"
}
{
"error": "Invalid name"
}
{
"error": "Invalid type"
}
{
"error": "Invalid number"
}
{
"error": "Two parameters: auto_answer and in_black_list cannot be true at the same time"
}
{
"error": "You cannot add more than 10000 contacts"
}
{
"error": "Wrong contact uid"
}
{
"error": "A contact already exists with the same type and number"
}
Unauthorized request. Log In
- application/json
- Schema
- Example (from schema)
- Log In
Schema
- error string
{
"error": "Log In"
}
{
"error": "Log In"
}