> ## Documentation Index
> Fetch the complete documentation index at: https://doc-neteven.mylectra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Helpers and constants

## Definition

Helpers are a set of endpoints used to retrieve constants expected and returned by the merchant API. They each are a list of values for a specific field or type of data.

The content of the call may be expended over time, especially currencies or languages. However, existing values will never be altered.

> [!TIP]
>
> Helper endpoints are not meant to be called programatically: there rarely ever change and are there to provide an easy access-point to retrieve Neteven constants.

## Endpoints

#### Get the list of available languages

| `GET` | `/languages` |
| - | - |
| **Description** | returns the list of language codes that the API accepts and returns. |
| **Required scope** | *basic authentication (no additional scope)* |
| **Returns** | a list of Language objects with the code and its corresponding human readable label. |

**Example:**

```bash Get languages theme={null}
curl --request GET \
  --url https://api-neteven.mylectra.com/v1/languages \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer $MYTOKEN' \
  --header 'Content-Type: application/json'
```

```json 200 OK Response theme={null}
{
  "data": {
    "currencies": [
      {
        "language_id": "cs",
        "language_label": "Czech"
      },
      {
        "language_id": "da",
        "language_label": "Danish"
      },
      {
        "language_id": "de",
        "language_label": "German"
      },
      {
        "language_id": "en",
        "language_label": "English"
      }
    ]
  },
  "metadata": {
    "number_of_results": 4,
    "api_version": 1,
    "api_version_expiration_date": "2022-12-31"
  }
}
```

***

#### Get the list of available currencies

| `GET` | `/currencies` |
| - | - |
| **Description** | returns the list of currencies codes that the API accepts and returns. |
| **Required scope** | *basic authentication (no additional scope)* |
| **Returns** | a list of currency objects with the code and its corresponding human readable label. |

**Example:**

```bash Get currencies theme={null}
curl --request GET \
  --url https://api-neteven.mylectra.com/v1/currencies \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer $MYTOKEN' \
  --header 'Content-Type: application/json'
```

```json 200 OK Response theme={null}
{
  "data": {
    "currencies": [
      {
        "currency_id": "PLN",
        "currency_label": "Polish złoty"
      },
      {
        "currency_id": "KES",
        "currency_label": "Kenyan shilling"
      },
      {
        "currency_id": "MYR",
        "currency_label": "Malaysian ringgit"
      }
    ]
  },
  "metadata": {
    "number_of_results": 3,
    "api_version": 1,
    "api_version_expiration_date": "2022-12-31"
  }
}
```

***

#### Get the list of available price fields

| `GET` | `/price-fields` |
| - | - |
| **Description** | returns the list of price fields that the API accepts and returns. |
| **Required scope** | *basic authentication (no additional scope)* |
| **Returns** | a list of `PriceField` objects to use in price update endpoints. |

**Example:**

```bash Get price fields theme={null}
curl --request GET \
  --url https://api-neteven.mylectra.com/v1/price-fields \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer $MYTOKEN' \
  --header 'Content-Type: application/json'
```

```json 200 OK Response theme={null}
{
  "data": {
    "prices": [
      {
        "name": "price_fixed"
      },
      {
        "name": "price_buying"
      },
      {
        "name": "price_market"
      },
      {
        "name": "price_floor"
      },
      {
        "name": "price_starting"
      },
      {
        "name": "price_additional_1"
      },
      {
        "name": "price_additional_2"
      },
      {
        "name": "price_additional_3"
      },
      {
        "name": "price_additional_4"
      },
      {
        "name": "price_additional_5"
      },
      {
        "name": "price_shipping_local_1"
      },
      {
        "name": "price_shipping_local_2"
      },
      {
        "name": "price_shipping_local_3"
      },
      {
        "name": "price_shipping_supp_local_1"
      },
      {
        "name": "price_shipping_supp_local_2"
      },
      {
        "name": "price_shipping_supp_local_3"
      },
      {
        "name": "price_shipping_int_1"
      },
      {
        "name": "price_shipping_int_2"
      },
      {
        "name": "price_shipping_int_3"
      },
      {
        "name": "price_shipping_supp_int_1"
      },
      {
        "name": "price_shipping_supp_int_2"
      },
      {
        "name": "price_shipping_supp_int_3"
      },
      {
        "name": "ecotaxe"
      },
      {
        "name": "ecoparticipation"
      },
      {
        "name": "price_additional_6"
      },
      {
        "name": "price_additional_7"
      },
      {
        "name": "price_additional_8"
      },
      {
        "name": "price_additional_9"
      },
      {
        "name": "price_additional_10"
      }
    ]
  },
  "metadata": {
    "number_of_results": 338,
    "api_version": 1,
    "api_version_expiration_date": "2022-12-31"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.