[POST] .../v1/partner/add
Adds new partner. Use this method to create a partner before linking it to purchases, sales, payments, contracts, CRM records or settlement documents. The method validates group_id, legal_status, name, database string limits and required custom fields when additional fields are enabled, then stores the partner, writes an action log record, invalidates partner cache, sends the PartnerAdded webhook and returns new_id. The request body is required; group_id, legal_status and name are mandatory and optional contact, tax, bank and custom-field values follow the limits documented in the schema. The current request user must have partner add permission and additional fields can be submitted only when the tariff option is enabled. Missing body, missing required fields, invalid group_id, length violations, denied access, disabled additional fields, required custom-field failures, transaction failures and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| address | String | Optional | Partner address. |
| bank_name | String | Optional | Bank name. |
| boss_name | String | Optional | Partner manager name. |
| description | String | Optional | Partner description. |
| String | Optional | Partner email. | |
| fields | Array of FieldValueAdd | Optional | Custom field values. |
| fullname | String | Optional | Full partner name. |
| group_id | Int64 | Required | Partner group ID in the system. |
| inn | String | Optional | Partner TIN. |
| legal_status | String | Required | Partner legal status. Allowed values: Default, Legal, Natural. |
| mfo | String | Optional | Bank MFO code. |
| name | String | Required | Partner name. |
| oked | String | Optional | OKED code. |
| phones | String | Optional | Partner phone numbers. |
| rs | String | Optional | Bank account number. |
| vat_index | String | Optional | VAT payer registration code. |
Request Example
{
"group_id": 2,
"legal_status": "Legal",
"name": "Coca-Cola Bottlers",
"fullname": "Coca-Cola Bottlers Uzbekistan LLC",
"inn": "123456789",
"phones": "\u002B998901234567",
"email": "billing@example.test",
"description": "Beverage supplier",
"fields": []
}
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": 15
}
}