Create Company Entity
Creates Company Entity. The item_uid
value returned in the response can be used as the company-uid
parameter in next requests:
GET/PUT/DELETE /companies/{company-uid}
to get detailed company information, edit or remove itPOST/DELETE /companies/{company-uid}/apartment/{apartment-uid}
to attach/detach apartment to/from companyPOST/DELETE /companies/{company-uid}/logo
to add/remove company's logo. It can be displayed in favorites contacts on main screenPOST/DELETE /companies/{company-uid}/background
to add/remove company's background. It will be displayed during call as a background profile photo
- This feature is available only in AA-14FBIS panel
- application/json
Request Body required
- name string required
Possible values:
non-empty
and<= 200 characters
Company name. Should be unique
- info string
Possible values:
<= 1000 characters
Additional Company info
- text_color string required
Possible values: [
auto
,black
,white
]Additional option to customize text color in Company screen. auto - system will try to calculate proper text color according to background image white - white text color will be used black - black text color will be used
- 200
- 400
- 401
- 403
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
- item_uid integer
Possible values:
>= -1
UID for entities references. If value is
-1
, then it means that is no entity reference for this structure
{
"item_uid": 3
}
{
"item_uid": 3
}
Validation error or required fields are not provided
- Missed json body or wrong param. Response sample:
"error": "Wrong JSON body"
- auth_factors must contain at least one item 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)
- Wrong name
- Wrong info
- Wrong text color
- Company exists
- Missed
Schema
- error string
Error message
{
"error": true
}
{
"error": "Wrong name"
}
{
"error": "Wrong info"
}
{
"error": "Wrong text color red, available values are [auto, white, black]"
}
{
"error": "Company with the same name already exists"
}
{
"error": "Wrong JSON body: no value for name"
}
Unauthorized request. Log In
- application/json
- Schema
- Example (from schema)
- Log In
Schema
- error string
Error message
{
"error": "Log In"
}
{
"error": "Log In"
}
Administrator rights required. You are currently logged in with different user account. Log In with administrator rights
- application/json
- Schema
- Example (from schema)
- Admin Rights Required
Schema
- error string
Error message
{
"error": "Administrator rights required"
}
{
"error": "Administrator rights required"
}