Extensions endpoints
Quick reference
Verb | Path | Method |
|---|---|---|
GET | /api/platform/extension/ | Listing extensions |
POST | /api/v1/extensions/add_extension/ | Adding an extension |
POST | /api/v1/extensions/add_values/ | Adding values to an existing extension |
Listing extensions
Description
This endpoint allows listing extensions
Example
curl --location --request GET 'https://api.pricemoov.com/api/platform/extension/' \
--header 'Authorization: jwt <your_token>' \
--header 'Content-Type: application/json' \Upon success, the response is 200 OK and returns the list of extensions
[
{
"id": 1,
"name": "extension_1",
"values": ["value_1", "value_2"]
}, ...
]Adding an extension
Description
This endpoint allows you to create Extensions Note:
Parameters
name
values
type: string, Required
The name of the extension
type: list
The values of the extensions (must be of strings)
Example
curl --location --request POST 'https://api.pricemoov.com/api/v1/extensions/add_extension/' \
--header 'Authorization: jwt <your_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Point of Sale",
"values": [
"Paris", "Amsterdam", "London"
]
}
'Upon success, the response is 201 OK and returns
{
"id": 1,
"name": "Point of Sale",
"values": ["Paris", "Amsterdam", "London"]
}Once you have started creating products, this endpoint will fail. Please contact our customer engineering team in this case.
Adding values to an existing extension
Description
This endpoint allows updating extension values.
Parameters
values
type: list
Example
Say we currently have these values for the extension "Point of Sale":
{
"name": "Point of Sale",
"values": [
"Paris", "Amsterdam", "London"
]
}Let's say we now want to add values "Lyon" and "Milan" to "Point of Sale" ; we then make the following call:
curl --location --request POST 'https://api.pricemoov.com/api/v1/extensions/add_values/' \
--header 'Authorization: jwt <your_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Point of Sale"
"values": [
"Lyon", "Milan"
]
}Upon success, the response is 201 OK and returns
{
"name": "Point Of Sale",
"values": [
"Paris", "Amsterdam", "London", "Lyon", "Milan"
]
}