Characteristics


API documentation for working with characteristics

Table with field descriptions:

Field Type Required? Description
id int No Unique identifier of the characteristic (required when updating).
sp_key string No (generated automatically) A unique characteristic key (for example: “rear speaker power”).
name_ro string Yes The name of the characteristic is in Romanian.
name_ru string Yes The name of the characteristic is in Russian.
name_en string No Name of the characteristic in English (if required).
name_uk string No Name of the characteristic in Ukrainian (if required).

1. Getting all the characteristics

Method: GET
URL: {domain}/external/specification/

Description:
Returns a list of all site characteristics.

Query example:

GET {domain}/external/specification/

Example answer:

[
    {
        "id": 97,
        "sp_key": "rear speaker power",
        "name_ro": "Puterea difuzoarelor din spate",
        "name_ru": "Power of rear speakers",
        "name_en": null,
        "name_uk": null
    },
    {
        "id": 22,
        "sp_key": "charging time",
        "name_ro": "TIMP DE ÎNCĂRCARE",
        "name_ru": "CHARGING TIME",
        "name_en": null,
        "name_uk": null
    }
]

2. Getting one characteristic

Method: GET
URL: {domain}/external/specification/{id}/

Description:
Returns data for one characteristic.

Query example:

GET {domain}/external/specification/97/

Example answer:

{
    "id": 97,
    "sp_key": "rear speaker power",
    "name_ro": "Puterea difuzoarelor din spate",
    "name_ru": "Power of rear speakers",
    "name_en": null,
    "name_uk": null
}

3. Update one characteristic

Method: PUT
URL: {domain}/external/specification/{id}/

Description:
Updates information about one characteristic.

Query example:

PUT {domain}/external/specification/97/
Content-Type: application/json

Request body:

{
    "sp_key": "rear_speaker_power",
    "name_ro": "Puterea difuzoarelor spate",
    "name_ru": "The power of the rear speakers has been updated",
    "name_en": "Rear speaker power",
    "name_uk": "Tightness of the water columns"
}

Example answer:

{
    "id": 97,
    "sp_key": "rear_speaker_power",
    "name_ro": "Puterea difuzoarelor spate",
    "name_ru": "The power of the rear speakers has been updated",
    "name_en": "Rear speaker power",
    "name_uk": "Tightness of the water columns"
}

4. Creating multiple characteristics

Method: POST
URL: {domain}/external/specification/bulk-create/

Description:
Creates several characteristics at the same time.

Query example:

POST {domain}/external/specification/bulk-create/
Content-Type: application/json

Request body:

[
    {
        "sp_key": "new_characteristic_1",
        "name_ro": "Caracteristică nouă 1",
        "name_ru": "New characteristic 1",
        "name_en": "New specification 1",
        "name_uk": "New feature 1"
    },
    {
        "sp_key": "new_characteristic_2",
        "name_ro": "Caracteristică nouă 2",
        "name_ru": "New characteristic 2",
        "name_en": "New specification 2",
        "name_uk": "New feature 2"
    }
]

Example answer:

[
    {
        "id": 101,
        "sp_key": "new_characteristic_1",
        "name_ro": "Caracteristică nouă 1",
        "name_ru": "New characteristic 1",
        "name_en": "New specification 1",
        "name_uk": "New feature 1"
    },
    {
        "id": 102,
        "sp_key": "new_characteristic_2",
        "name_ro": "Caracteristică nouă 2",
        "name_ru": "New characteristic 2",
        "name_en": "New specification 2",
        "name_uk": "New feature 2"
    }
]

5. Multiple Feature Updates

Method: PUT
URL: {domain}/external/specification/bulk-update/ Description:
Updates several characteristics at the same time.

Query example:

PUT {domain}/external/specification/bulk-update/
Content-Type: application/json

Request body:

[
    {
        "id": 97,
        "sp_key": "rear speaker power_updated",
        "name_ro": "Puterea difuzoarelor spate actualizat",
        "name_ru": "The power of the rear speakers has been updated",
        "name_en": "Rear speaker power updated",
        "name_uk": "Tightness of the water columns has been updated"
    },
    {
        "id": 22,
        "sp_key": "charging_time_updated",
        "name_ro": "TIMP DE ÎNCĂRCARE ACTUALIZAT",
        "name_ru": "CHARGING TIME UPDATED",
        "name_en": "CHARGE TIME UPDATED",
        "name_uk": "CHARGING HOUR UPDATED"
    }
]

Example answer:

[
    {
        "id": 97,
        "sp_key": "rear speaker power_updated",
        "name_ro": "Puterea difuzoarelor spate actualizat",
        "name_ru": "The power of the rear speakers has been updated",
        "name_en": "Rear speaker power updated",
        "name_uk": "Tightness of the water columns has been updated"
    },
    {
        "id": 22,
        "sp_key": "charging_time_updated",
        "name_ro": "TIMP DE ÎNCĂRCARE ACTUALIZAT",
        "name_ru": "CHARGING TIME UPDATED",
        "name_en": "CHARGE TIME UPDATED",
        "name_uk": "CHARGING HOUR UPDATED"
    }
]

Notes:

  • The id field is required to update characteristics.
  • To create a characteristic, the id field is omitted.
  • Fields with the name of the characteristic (name_*) can only be filled in for those languages ​​that are needed on your system. Blank values ​​are allowed.
  • The sp_key field can be omitted and the system will generate them automatically.

Was the article helpful?

Yes, thank you! Unfortunately no

article.helpfulQuestion