---
title: Extensions endpoints
slug: extensions-endpoints
description: This document serves as a quick reference guide for three API endpoints pertaining to extensions. Learn how to list extensions, add new extensions, and add values to existing extensions using example API call syntax. Be aware that the second endpoint may 
createdAt: 2023-03-16T14:53:28.000Z
---

# 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

```shell
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

```json
[
  {
    "id": 1,
    "name": "extension_1",
    "values": ["value_1", "value_2"]
  }, ...
]
```

# Adding an extension

## Description

This endpoint allows you to create Extensions

Note:&#x20;

## Parameters

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
name



values
:::

:::VerticalSplitItem
`type: string`, `Required`

The name of the extension

`type: list`

The values of the extensions (must be of strings)
:::
::::

## Example

```shell
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

```json
{
  "id": 1,
  "name": "Point of Sale",
  "values": ["Paris", "Amsterdam", "London"]
}
```

:::hint{type="info"}
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

::::VerticalSplit{layout="left"}
:::VerticalSplitItem
values
:::

:::VerticalSplitItem
`type: list`
:::
::::

## Example

Say we currently have these values for the extension `"Point of Sale"`:

```json
{
  "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:

```shell
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

```json
{
  "name": "Point Of Sale",
  "values": [
    "Paris", "Amsterdam", "London", "Lyon", "Milan"
  ]
}
```



