# Get prices for a SKU

URL: https://docs.sparklayer.io/developers/api/pricing/get-pricing-by-sku
Operation: `GET /api/v1/pricing/{sku}` (operationId `getVariantPricing`)
OpenAPI spec: https://docs.sparklayer.io/openapi/pricing.yaml

Returns the prices stored for the SKU on every price list, grouped by price list. URL-encode the SKU if it contains reserved characters such as `/`. Returns an empty array if the SKU has no prices.

`GET /api/v1/pricing/{sku}`

**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/pricing/SKU-1" \
  -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`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `sku` | string | Yes | The variant SKU. URL-encode it if it contains reserved characters such as `/`. Example: `SKU-1` |

### 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: The SKU's prices, grouped by price list.

An array. Each item:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].price_list_slug` | string | Yes | Price List Slug |
| `[].display_tax_rate` | number (float) \| null | | Tax rate used only to display a tax-inclusive price, expressed as a whole percentage (10 means 10%). Stored prices remain net and the eCommerce platform remains authoritative for the tax actually charged at checkout. On an update the field has three states: omit it to leave any stored rate unchanged (so a price-only sync never disturbs it), send null to clear it, or send a value to set it. Min 0, max 100. |
| `[].pricing` | object[] | Yes | |
| `[].pricing[].quantity` | integer | | The quantity at which the specified price is applicable. This allows for quantity discount pricing to be set up. Default: `1`. Min 1. |
| `[].pricing[].price` | number (float) | Yes | |
| `[].pricing[].tax_type` | "net" | | **Deprecated.** Net is the only supported value here. Default: `net`. |
| `[].pricing[].unit_of_measure` | string \| null | | The unit of measure associated with this quantity. When specifying a unit of measure, it must match the pattern. To remove any value set, either omit the property or set the value as null. Pattern: `^[a-zA-Z0-9-]+$`. |

```json
[
  {
    "price_list_slug": "base-list",
    "display_tax_rate": 10,
    "pricing": [
      {
        "quantity": 1,
        "price": 10.49,
        "tax_type": "net",
        "unit_of_measure": "pallet"
      }
    ]
  }
]
```

#### 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"
}
```
