Add
[POST] .../v1/firm/add
Adds new enterprise. Use this method to create a company before linking stocks, documents, firm settings and POS configuration to it. It returns new_id and validates group_id, required name and DB-backed string lengths for firm requisites before saving. The caller must have firm add permission; missing body, invalid required fields, denied access, tariff firm-count limits, missing firm-group relations and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| address | String | Optional | Firm address. Maximum length is 150 characters. |
| bank_name | String | Optional | Bank name. Maximum length is 100 characters. |
| boss_name | String | Optional | Firm manager name. Maximum length is 150 characters. |
| description | String | Optional | Firm description or note. Maximum length is 500 characters. |
| fullname | String | Optional | Full legal firm name. Maximum length is 250 characters. |
| group_id | Int64 | Required | Firm group ID in the system. |
| inn | String | Optional | Firm TIN. Maximum length is 50 characters. |
| mfo | String | Optional | Bank MFO code. Maximum length is 50 characters. |
| name | String | Required | Firm name. Maximum length is 150 characters. |
| oked | String | Optional | OKED code. Maximum length is 50 characters. |
| phones | String | Optional | Firm phone numbers. Maximum length is 150 characters. |
| rs | String | Optional | Bank account number. Maximum length is 50 characters. |
| vat_index | String | Optional | VAT payer registration code. Maximum length is 25 characters. |
Request Example
{
"group_id": 1,
"name": "REGOS Retail",
"fullname": "REGOS Retail LLC",
"boss_name": "Ali Karimov",
"address": "Tashkent, Buyuk Ipak Yuli 10",
"phones": "\u002B998901234567",
"description": "Retail operating company",
"inn": "123456789",
"bank_name": "REGOS Bank",
"mfo": "00444",
"rs": "20208000123456789001",
"oked": "47110",
"vat_index": "326000123456"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 2
}
}