Example of Integration with External Accounting Systems
Product Groups
Product groups are divided into main groups and subgroups. To create a subgroup, specify the id_group of the parent group in id_owner_group.
GET: /api/{locale}/groupGoods
| Field | Type | Default | Comment |
|---|---|---|---|
| id_group | id_group | id_group | |
| name_group | string(128) | Group name | |
| id_owner_group | integer | null | Group owner identifier | |
| id_image | integer | null | Image identifier | |
| active | boolean | Group active status | |
| guid | string | Global unique identifier | |
| time_create | string(timestampz) | Creation time | |
| time_change | string(timestampz) | Last modification time | |
| hasChildren | boolean | Presence of child elements |
POST: /api/{locale}/groupGoods
| Field | Type | Default | Comment |
|---|---|---|---|
| name_group* | string(128) | Group name | |
| id_owner_group | integer | null | Group owner identifier | |
| id_image | integer | null | Image identifier | |
| active* | boolean | true | Group active status |
PUT: /api/{locale}/groupGoods/{guid_group}
| Field | Type | Default | Comment |
|---|---|---|---|
| name_group* | string(128) | Group name | |
| id_owner_group | integer | null | Group owner identifier | |
| id_image | integer | null | Image identifier | |
| active* | boolean | true | Group active status |
Price Levels
Each project has a fixed price level — Purchase (id_price_level = -1). All subsequently created levels follow auto-increment by 1 and correspond to the Retail price level.
GET: /api/{locale}/price-level
| Field | Type | Default | Comment |
|---|---|---|---|
| id_price_level | bigIncrement | Unique price level identifier | |
| name_price_level | string(128) | Price level name | |
| active | boolean | true | Price level active status |
| guid | string | uuid | Global unique identifier |
| time_create | string(timestampz) | Creation time | |
| time_change | string(timestampz) | Last modification time |
POST: /api/{locale}/price-level
| Field | Type | Default | Comment |
|---|---|---|---|
| name_price_level | string(128) | Price level name | |
| active | boolean | true | Price level active status |
PUT: /api/{locale}/price-level/{guid_price_level}
| Field | Type | Default | Comment |
|---|---|---|---|
| name_price_level* | string(128) | Price level name | |
| active* | boolean | true | Price level active status |
Units of Measurement
A unit of measurement is associated with a product by id_goods at the database level and guid goods at the API request level. Each product must have exactly one default unit of measurement (is_default = true) with a coefficient (rate = 1.0).
Additional units of measurement must have a compatible Type with the base unit:
- If the base is Integer type (1): only integer (1).
- If the base is Multiple of 25% (2): multiple of 0.25 (2).
- If the base is Fractional (3): any integer or fractional value.
GET: /api/{locale}/goods/{guid_good}/units
| Field | Type | Default | Comment |
|---|---|---|---|
| id_unit | integer | Unique unit of measurement identifier | |
| id_goods | integer | Unique product identifier | |
| name_unit | string(10) | Unit name | |
| full_name | string | Full unit name | |
| short_name | string | Abbreviated name | |
| code | string | Unit code | |
| type_unit | integer | Unit type: 1 — integer, 2 — multiple of 25%, 3 — fractional | |
| rate | numeric(15,3) | Coefficient | |
| is_default | boolean | Default unit flag | |
| for_ordering | boolean | Available for ordering | |
| is_storage_residues | boolean | Stock storage unit flag | |
| max_count | numeric(10,3) | Maximum quantity per single line sale | |
| percent_deviation | numeric | Deviation percentage | |
| good | object | Product information | |
| unit_sample | object | Unit sample with additional attributes | |
| brutto_weight | integer | Gross weight | |
| height | integer | Height | |
| width | integer | Width | |
| depth | integer | Depth | |
| active | boolean | Unit active status | |
| guid | string | Global unique identifier | |
| time_create | string(timestampz) | Creation time | |
| time_change | string(timestampz) | Last modification time |
POST: /api/{locale}/goods/{guid_goods}/units
| Field | Type | Default | Comment |
|---|---|---|---|
| id_unit* | integer | Unique unit of measurement identifier | |
| type_unit* | integer | Unit type: 1 — integer, 2 — multiple of 25%, 3 — fractional | |
| rate* | numeric(15,3) | Coefficient | |
| max_count | numeric(10,3) | Maximum quantity per single line sale | |
| brutto_weight | integer | 0 | Gross weight |
| percent_deviation | numeric | 0.0 | Deviation percentage |
| for_ordering | boolean | false | Available for ordering |
| is_default* | boolean | false | Default unit flag |
| is_storage_residues* | boolean | false | Stock storage unit flag |
| height | integer | Height | |
| width | integer | Width | |
| depth | integer | Depth | |
| active* | boolean | Unit active status |
PUT: /api/{locale}/goods/{guid_goods}/units/{guid_unit}
| Field | Type | Default | Comment |
|---|---|---|---|
| type_unit* | integer | Unit type: 1 — integer, 2 — multiple of 25%, 3 — fractional | |
| rate* | numeric(15,3) | Coefficient | |
| max_count | numeric(10,3) | Maximum quantity per single line sale | |
| brutto_weight | integer | 0 | Gross weight |
| percent_deviation | numeric | 0.0 | Deviation percentage |
| for_ordering | boolean | false | Available for ordering |
| is_default* | boolean | false | Default unit flag |
| is_storage_residues* | boolean | false | Stock storage unit flag |
| height | integer | Height | |
| width | integer | Width | |
| depth | integer | Depth | |
| active* | boolean | Unit active status |
Prices
A price is created for a combination of product (id_goods) + base unit of measurement (id_unit) + series (id_series) + price level (id_price_level).
A price can only be created once when the product is created. When creating, note that the minimum price must be at least 10 kopecks (0.10). The maximum price must not exceed the Price (usually equals the Price).
Price updates are made via the Revaluation document.
GET: /api/{locale}/goods/{guid_good}/goodsPrice/prices
| Field | Type | Default | Comment |
|---|---|---|---|
| id_goods | integer | Product identifier | |
| name_goods | string | Product name | |
| id_unit | integer | Unit of measurement identifier | |
| name_unit | string | Unit of measurement name | |
| id_series | string | Product series identifier | |
| name_series | string | Series name | |
| id_price_level | integer | Price level identifier | |
| name_price_level | string | Price level name | |
| min_price | numeric(15,4) | Minimum price | |
| max_price | numeric(15,4) | Maximum price | |
| active | boolean | Price active status |
POST: /api/{locale}/goods/{guid_good}/goodsPrice
| Field | Type | Default | Comment |
|---|---|---|---|
| id_goods | integer | Product identifier | |
| id_unit | integer | Unit of measurement identifier | |
| id_series | string | – | Product series identifier |
| id_price_level | integer | Price level identifier | |
| price | numeric(15,4) | Price | |
| min_price | numeric(15,4) | Minimum price | |
| max_price | numeric(15,4) | Maximum price | |
| active | boolean | Price active status |
Barcode
GET: /api/{locale}/goods/{guid_good}/barcodes
| Field | Type | Default | Comment |
|---|---|---|---|
| bar_code | numeric-string(21) | Unique barcode | |
| id_goods | integer | Product identifier | |
| id_unit | integer | Unit of measurement identifier | |
| id_series | string | Product series identifier | |
| ext_bar_code | string(5) | null | – | Extended barcode 13+2, 15+5 |
| name_series | string | Series name | |
| name_unit | string | Unit of measurement name | |
| active | boolean | Barcode active status | |
| guid | string | Global unique identifier | |
| time_create | string(timestampz) | Creation time | |
| time_change | string(timestampz) | Last modification time |
POST: /api/{locale}/goods/{guid_good}/barcodes
| Field | Type | Default | Comment |
|---|---|---|---|
| bar_code* | numeric-string(21) | Unique barcode | |
| id_unit* | integer | Unit of measurement identifier | |
| id_series* | string | Product series identifier | |
| ext_bar_code | string(5) | null | – | Extended barcode 13+2, 15+5 |
| active* | boolean | Price active status |
PUT: /api/{locale}/goods/{guid_good}/barcodes/{guid_barcode}
| Field | Type | Default | Comment |
|---|---|---|---|
| bar_code* | numeric-string(21) | Unique barcode | |
| id_unit* | integer | Unit of measurement identifier | |
| id_series* | string | Product series identifier | |
| ext_bar_code | string(5) | null | – | Extended barcode 13+2, 15+5 |
| active* | boolean | Price active status |
Product Creation Flow
- Reserve an id for the product. Execute the request:
POST: /api/{locale}/goods/id/lastIn response, receiveid_goodsandguid. - Create at least one base unit of measurement with
is_default = true. Execute the request:POST: /api/{locale}/goods/{guid_goods}/units - Create at least one base series with
id_series = '-',name_series = '-'. Execute the request:POST: /api/{locale}/goods/{guid_goods}/series - Fill in the product attributes. The request must include
id_goodsandguidobtained in step one. Execute the request:POST: /api/{locale}/goods - Optional. Create a price (purchase, retail, etc.). Execute the request:
POST: /api/{locale}/goods/{guid_good}/goodsPrice - Optional. Create a barcode. Execute the request:
POST: /api/{locale}/goods/{guid_good}/barcodes