Update Contact
You can update contact with the next types:
- regular- for monitors, intercom SIP numbers, etc.
- individual- for individual panels
- multi- for multiapartment panels
Contact number can take two formats:
- inner protocol
- SIP
For inner protocol contact numbers with different type must match different pattern:
- regularlike [building]-[unit]-[floor]-[apartment], for example '0001-01-11-11'
- individuallike [building]-[unit]-[floor]-[apartment]-[device number], for example '001-01-11-11-1'
- multilike [building]-[unit]-[device number], for example '0001-01-01'
| regular | individual | multi | |
|---|---|---|---|
| building | 0001 - 9999 | 001 - 999 | 0001 - 9999 | 
| unit | 00 - 99 | 00 - 99 | 00 - 99 | 
| floor | 00 - 98 | 00 - 98 | |
| apartment | 00 - 99 | 00 - 99 | |
| device | 1 - 9 | 01 - 99 | 
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 receive all calls from some numbers without sound, you can add it to the blacklist using the in_black_list property. The call will be displayed in the Records.
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.
Maximum number of contacts - 300
Path Parameters
- entityUid integer requiredPossible values: >= 1Unique Identifier for Item 
- application/json
Request Body required
- name string requiredPossible values: non-emptyand<= 30 charactersContact name 
- type string requiredPossible values: [ regular,individual,multi,p2p]Contact number type 
- number string requiredThere is two format: inner number and SIP number Inner number for different devices: - regularlike [building]-[unit]-[floor]-[apartment], for example '0001-01-11-11'
- individuallike [building]-[unit]-[floor]-[apartment]-[device number], for example '001-01-11-11-1'
- multilike [building]-[unit]-[device number], for example '0001-01-01'
 regular individual multi building 0001 - 9999 001 - 999 0001 - 9999 unit 00 - 99 00 - 99 00 - 99 floor 00 - 98 00 - 98 apartment 00 - 99 00 - 99 device 1 - 9 01 - 99 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 requiredFavorite contacts will be displayed at the top of the list 
- auto_answer boolean requiredIf true device will answer immediatelly when received call from this contact. auto_answerandin_black_listcannot be true at the same time
- in_black_list boolean requiredIf true device will skip incoming call from this contact. auto_answerandin_black_listcannot be true at the same time
- ringtone stringDefault value: ring1.wavName of the ringtone file that will be played on incoming call from this contact. 
- is_p2p booleanDefault value: falseIndicates that the SIP number is for peer2peer calls 
- 200
- 400
- 401
The uid value returned in the response can be used as the entityUid parameter in next requests:
- GET/PUT/DELETE /contacts/{entityUid}- to get info about contact, update or delete it
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
- error object- Describes the base error user might get code string- Possible values: [ - invalid_authentication,- permission_denied,- not_valid,- system_error]- Error code message string- Error message - data object- Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc. param string- Describes the parameter that did not pass a validation 
{
  "error": {
    "code": "not_valid",
    "message": "Data validation error",
    "data": {
      "param": "must be a string"
    }
  }
}
Please log in
- application/json
- Schema
- Example (from schema)
- Example
Schema
- error object- Describes the base error user might get code string- Possible values: [ - invalid_authentication,- permission_denied,- not_valid,- system_error]- Error code message string- Error message - data object- Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc. param string- Describes the parameter that did not pass a validation 
{
  "error": {
    "code": "not_valid",
    "message": "Data validation error",
    "data": {
      "param": "must be a string"
    }
  }
}
{
  "error": {
    "code": "invalid_authentication",
    "message": "Log In"
  }
}