Create Identifier Entity
Create Identifier Entity. You can create identifiers with the next types:
- card
- ukey
- input_code
- license_plate
- application/json
Request Body required
- name string required
Possible values:
<= 100 charactersName of the identifier
- affiliation string required
Possible values: [
owner,guest]Identifier affiliation type
- type string required
Possible values: [
card,ukey,input_code,license_plate]Identifier type used for access
- number string required
Possible values:
<= 256 characters-
hex if identifier type is card or ukey - max length is 32 bytes
-
binary if identifier type is card or ukey - min length is 16 symbols, max length is 256 symbols
-
dec if identifier type is input_сode - max length is 10 symbols
-
string if identifier type is license_plate - max length is 100 symbols
-
pattern for hex ([0-9A-Fa-f]{2}[:-]){1,31}([0-9A-Fa-f]{2})
-
pattern for dec - [0-9]{1,10}
-
pattern for bin - [01]{16,256}
-
valid object required
Describes identifier restriction by time, passes
time object required
Describes identifier restriction by time
is_permanent boolean requiredDetermines if enabled identifier restriction by time
from int64Unix Timestamp Date
to int64Unix Timestamp Date
passes object required
Describes identifier passes restriction settings
is_permanent boolean requiredDetermines if passes restriction enabled
max_passes integerPossible values:
>= 1and<= 99999Identifier restriction by max allowed passes
- 200
- 400
- 401
The id value returned in the response can be used as the identifier-id parameter in next requests:
GET/PATCH/DELETE /access/identifiers/{identifier-id}- to get info about identifier, update or delete itPOST /access/identifiers/{identifier-id}/passes/reset- to reset left passes tomaxvaluePOST/DELETE /access/identifiers/{identifier-id}/time-profiles/{time-profile-id}
- to attach/detach a time profile to/from identifier
POST /apartments/{apartment-id}/identifiers/{identifier-id}- to attach an identifier to apartmentPOST /apartments/unbind/identifiers/{identifier-id}- to detach and identifier from apartment
- application/json
- Schema
- Example (from schema)
Schema
- id integer
Possible values:
>= -1UID for entities references. If value is
-1, then it means that is no entity reference for this structure
{
"id": 3
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Example
Schema
error object
Error object, contains error details
code stringPossible values: [
invalid_authentication,permission_denied,not_valid,system_error,bad_request,connection_timeout]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringContains validation error details
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be an string"
}
}
}
{
"error": {
"code": "bad_request",
"message": "Bad request sent"
}
}
Unauthorized request. Log In
- application/json
- Schema
- Example (from schema)
- Example
Schema
error object
Error object, contains error details
code stringPossible values: [
invalid_authentication,permission_denied,not_valid,system_error,bad_request,connection_timeout]Error code
message stringError message
data object
Did not pass validation parameters. Can be represented as an object, which can include field names, arrays, query parameters etc.
param stringContains validation error details
{
"error": {
"code": "not_valid",
"message": "Data validation error",
"data": {
"param": "must be an string"
}
}
}
{
"error": {
"code": "invalid_authentication",
"message": "Invalid authentication"
}
}