# List price lists

URL: https://docs.sparklayer.io/developers/api/pricing/get-price-lists
Operation: `GET /api/v1/price-lists` (operationId `getPriceListsLegacy`)
OpenAPI spec: https://docs.sparklayer.io/openapi/pricing.yaml

Returns every price list for the site as a single, unpaginated array (up to 25,000 price lists from all sources, ordered by name).

This is the legacy version of this endpoint. For new integrations, use `GET /api/v2/price-lists`, which supports pagination, ordering and filtering by source.

`GET /api/v1/price-lists`

> **Deprecated.** See the description for what to use instead.

**Base URLs:** `https://app.sparklayer.io` (Live), `https://test.app.sparklayer.io` (Test)

**Authentication:** send `Authorization: Bearer <access_token>` and `Site-Id: <site id>` with every request. Get the token from [Get an access token](https://docs.sparklayer.io/developers/api/core/get-an-access-token.md); see [Authentication](https://docs.sparklayer.io/developers/authentication.md).

### Example request

```bash
curl "https://app.sparklayer.io/api/v1/price-lists" \
  -H "Authorization: Bearer $SPARKLAYER_TOKEN" \
  -H "Site-Id: $SPARKLAYER_SITE_ID"
```

Set `SPARKLAYER_TOKEN` to an access token and `SPARKLAYER_SITE_ID` to your Site ID. For the test environment, use `https://test.app.sparklayer.io`.

### Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Site-Id` | string | Yes | Your SparkLayer Site ID, from Settings > API in the SparkLayer Dashboard. Example: `jones-climbing` |

### Responses

#### 200: Every price list, in one unpaginated array.

An array. Each item:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].slug` | string | | Slug. Length: min 1, max 64. |
| `[].name` | string | | Name. Length: min 1, max 128. |
| `[].currency_code` | string | | ISO 4217 currency code. Length: min 3, max 3. |
| `[].source` | "custom" \| "platform" \| "integration" | | Integration should be used by external parties, custom is provided to any price lists setup in the dashboard and platform is reserved for the eCommerce platform. Default: `custom`. |
| `[].tax_inclusive_display` | boolean | | When true, storefronts display prices on this price list inclusive of the per-SKU display_tax_rate, labelled as tax inclusive. This changes presentation only - prices are still stored and transacted net. SKUs on the list with no rate, or a rate of 0, display their net price and are still labelled tax inclusive. Default: `false`. |
| `[].rules` | object[] | | Length: max 5. |
| `[].rules[].source_price_list_slug` | string | | Source PriceList slug. Length: min 1, max 64. |
| `[].rules[].adjustment_percentage` | number | | Adjustment percent expressed as a decimal fraction between 0 and 1 - E.g. 15% should be set as 0.15. Min 0, max 1. |
| `[].rules[].adjustment_direction` | "plus" \| "minus" | | Adjustment direction (plus, minus) |
| `[].rules[].currency_exchange_rate` | number \| null | | Exchange rate between the currency of the source price list and the price list to which this rule belongs. If null, the rate will be determined automatically based on current market rates. Min 0.000001. |

```json
[
  {
    "slug": "base-list",
    "name": "Base Price List",
    "currency_code": "GBP",
    "source": "custom",
    "tax_inclusive_display": false,
    "rules": [
      {
        "source_price_list_slug": "base-list",
        "adjustment_percentage": 0.103333,
        "adjustment_direction": "plus",
        "currency_exchange_rate": 1.254324
      }
    ]
  }
]
```

#### Other statuses: An error. The body describes the problem: see [Errors](https://docs.sparklayer.io/developers/errors.md).

`application/problem+json`: the standard error body (below).

### Error body

Error responses with a body use this RFC 7807 problem details object. See [Errors](https://docs.sparklayer.io/developers/errors.md) for every status code and which errors to retry.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `detail` | string | | Human-readable summary of the error |
| `status` | integer | | HTTP Status code returned from API |
| `title` | string | | Machine-readable error code |
| `type` | string | | |

```json
{
  "detail": "Data Validation Failed",
  "status": 400,
  "title": "invalid-api-request-contents",
  "type": "https://docs.sparklayer.io/tech-docs"
}
```
