API documentation for working with product groups
Table with field descriptions
| Field | Type | Required? | Description |
|---|---|---|---|
id| int |
No | Unique group identifier (required when updating). | |
code| string |
No | Group code (optional). | |
name| string |
Yes | Group name. | |
select_specifications| array[int] |
No | List of ID characteristics available for selection (select). | |
block_specifications| array[int] |
No | List of ID characteristics available for selection (blocks). | |
images_specifications| array[int] |
No | List of [feature]IDs(/developers/kharakteristiki) associated with the images. | |
multi_select_specifications| array[int] |
No | List of [feature]IDs(/developers/kharakteristiki) associated with the images. |
Base URL : /external/product-group/
This API is designed to manage product groups. The available endpoints and their functionality are described below:
Endpoints
1. Receiving all product groups
Description : Returns a list of all product groups.
Endpoint :
[GET] /external/product-group/
Response : Returns an array of product group objects:
[ { "id": 421, "code": null, "name": "testingparameterlink", "specifications": [ { "id": 347, "order": 0, "displaytype": "selects", "spkey": "test1", "namero": "test1", "nameru": "test1", "nameen": null, "nameuk": "" }, { "id": 344, "order": 0, "displaytype": "selects", "spkey": "manufacturer", "namero": "ROManufacturer", "nameru": "RUManufacturer", "nameen": "ENManufacturer", "nameuk": null }, { "id": 396, "order": 0, "displaytype": "selects", "spkey": "caracteristicanoua", "namero": "Caracteristica noua", "nameru": "Characteristic new", "nameen": null, "nameuk": null } ] } ]
Fields :
id(int) : Unique group identifier.code(string | null) : Group code (optional).name(string) : Group name.select_specifications(array[int]) : ID of the specifications available for selection.
block_specifications(array[int]) : IDs of the specifications available for selection (blocks).images_specifications(array[int]) : IDs of the characteristics associated with the images.multi_select_specifications(array[int]) : IDs of the characteristics associated with the images.
2. Receiving one group of goods
Description : Returns detailed information about one product group.
Endpoint :
[GET] /external/product-group/{service_id}/
URL parameter :
service_id: ID of the product group to retrieve.
Answer :
{ "id": 421, "code": null, "name": "testingparameterlink", "specifications": [ { "id": 347, "order": 0, "displaytype": "selects", "spkey": "test1", "namero": "test1", "nameru": "test1", "nameen": null, "nameuk": "" }, { "id": 344, "order": 0, "displaytype": "selects", "spkey": "manufacturer", "namero": "ROManufacturer", "nameru": "RUManufacturer", "nameen": "ENManufacturer", "nameuk": null }, { "id": 396, "order": 0, "displaytype": "selects", "spkey": "caracteristicanoua", "namero": "Caracteristica noua", "nameru": "Characteristic new", "nameen": null, "nameuk": null } ] }
Notes : Returns the same fields as Get all product groups, but for a specific group.
3. Mass update of product groups
Description : Updates multiple product groups in one request.
Endpoint :
[PUT] /external/product-group/bulk-update/
Request format :
[ { "id": 134, "code": "newcode", "name": "New Test Name", "selectspecifications": [42, 43, 44], "imagesspecifications": [45, 46], "multiselectspecifications": [45, 46], }, { "id": 135, "code": "anothercode", "name": "Another Name", "selectspecifications": [], "imagesspecifications": [] } ]
Response Format : Returns an array of updated product groups:
[ { "id": 134, "code": "newcode", "name": "New Test Name", "selectspecifications": [42, 43, 44], "imagesspecifications": [45, 46], "multiselectspecifications": [45, 46], }, { "id": 135, "code": "anothercode", "name": "Another Name", "selectspecifications": [], "imagesspecifications": [] } ]
Notes : *All fields are optional. Enter only the information that needs to be updated.
- Each object in the request array corresponds to one object to update.
4. Mass creation of product groups
Description : Creates multiple product groups in one request.
Endpoint :
[POST] /external/product-group/bulk-create/
Request format :
[ { "code": "groupcode1", "name": "Group 1", "selectspecifications": [42, 43], "imagesspecifications": [45, 46], "multiselectspecifications": [45, 46], }, { "code": "groupcode2", "name": "Group 2", "selectspecifications": [], "imagesspecifications": [], "multiselectspecifications": [], } ]
Response Format : Returns an array of created groups:
[ { "id": 136, "code": "groupcode1", "name": "Group 1", "selectspecifications": [42, 43], "imagesspecifications": [45, 46] }, { "id": 137, "code": "groupcode2", "name": "Group 2", "selectspecifications": [], "imagesspecifications": [] } ]
Notes :
- New groups receive unique IDs, which are returned in the response.
- All fields specified in the request must be completed for each group created.
Was the article helpful?
Yes, thank you! Unfortunately no