# List customer group settings

URL: https://docs.sparklayer.io/developers/api/core/list-customer-group-settings
Operation: `GET /api/v1/settings/{slug}` (operationId `listSettings`)
OpenAPI spec: https://docs.sparklayer.io/openapi/core.yaml

Lists Customer Group settings by Customer Group

`GET /api/v1/settings/{slug}`

**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/settings/eu_gbp" \
  -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 |
| --- | --- | --- | --- |
| `slug` | string | Yes | The customer group's slug, as returned by **List customer groups** (for example `eu_gbp`). Example: `eu_gbp` |

### 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 customer group's settings, as `key`/`value` pairs.

An array. Each item is one of these:

**Settings.orderTotalsValidation**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "orderTotalsValidation" | Yes | |
| `[].value` | object[] \| null | Yes | |
| `[].value[].currency_code` | string | Yes | [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code. Length: min 3, max 3. |
| `[].value[].minimum_value` | number | Yes | Min 0. |
| `[].value[].maximum_value` | number \| null | | Min 0. |
| `[].value[].compare_type` | "gross" \| "net" | Yes | |

**Settings.orderItemQuantityValidation**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "orderItemQuantityValidation" | Yes | |
| `[].value` | object \| null | Yes | |
| `[].value.minimum_quantity` | number \| null | | Min 1. |
| `[].value.maximum_quantity` | number \| null | | Min 1. |

**Settings.priceListSelection**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "priceListSelection" | Yes | |
| `[].value` | object[] \| null | Yes | |
| `[].value[].price_list_slug` | string | Yes | Price List Slug |

**Settings.allowedPaymentMethods**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "allowedPaymentMethods" | Yes | |
| `[].value` | object \| null | Yes | |
| `[].value.payment_by_invoice` | boolean | | |
| `[].value.payment_on_account` | boolean | | |
| `[].value.upfront_payment` | boolean | | |
| `[].value.quote` | boolean | | |

**Settings.paymentRules**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "paymentRules" | Yes | |
| `[].value` | object \| null | Yes | The customer group's own payment rules, or null when it has none and inherits its nearest ancestor's. Send null through PATCH to drop an override and inherit again. At most 5 rules per method. |
| `[].value.payment_by_invoice` | object[] | | Items: max 5. |
| `[].value.payment_by_invoice[].conditions` | object | Yes | Conditions the rule narrows itself by, keyed by what each one matches on so a rule cannot carry two of the same. All present conditions must match. A rule with no conditions applies to every order. Money bounds are in the currency of the price list the cart is priced in. |
| `[].value.payment_by_invoice[].conditions.order_total` | object | | The net order total must fall within these bounds |
| `[].value.payment_by_invoice[].conditions.order_total.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_by_invoice[].conditions.order_total.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_by_invoice[].conditions.order_quantity` | object | | The size of the order must fall within these bounds |
| `[].value.payment_by_invoice[].conditions.order_quantity.type` | "total_quantity" \| "line_items" | Yes | What is counted: `total_quantity` sums the units across every line, `line_items` counts the lines themselves. |
| `[].value.payment_by_invoice[].conditions.order_quantity.minimum` | integer \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_by_invoice[].conditions.order_quantity.maximum` | integer \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_by_invoice[].conditions.available_credit` | object | | The credit the customer has left to spend must fall within these bounds. This is credit remaining, not the total credit limit. A customer with no credit limit set has unlimited credit and satisfies any minimum. |
| `[].value.payment_by_invoice[].conditions.available_credit.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_by_invoice[].conditions.available_credit.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_by_invoice[].conditions.products` | object | | Matches when a product in the cart satisfies any one of the filters. Filters are OR'd, and may mix SKU and metadata. |
| `[].value.payment_by_invoice[].conditions.products.filters` | (PaymentRule.Products.Sku \| PaymentRule.Products.Metadata)[] | Yes | Items: min 1, max 25. |
| `[].value.payment_by_invoice[].conditions.products.filters[].type` | "sku" | | |
| `[].value.payment_by_invoice[].conditions.products.filters[].value` | string | | Length: min 1. |
| `[].value.payment_by_invoice[].conditions.products.filters[].metadata_namespace` | string | | Length: min 1, max 256. |
| `[].value.payment_by_invoice[].conditions.products.filters[].metadata_key` | string | | Length: min 1, max 128. |
| `[].value.payment_by_invoice[].outcome` | PaymentRule.Outcome.Surcharge \| PaymentRule.Outcome.Discount \| PaymentRule.Outcome.Hide | Yes | What happens to the payment method when every condition matches |
| `[].value.payment_on_account` | object[] | | Items: max 5. |
| `[].value.payment_on_account[].conditions` | object | Yes | Conditions the rule narrows itself by, keyed by what each one matches on so a rule cannot carry two of the same. All present conditions must match. A rule with no conditions applies to every order. Money bounds are in the currency of the price list the cart is priced in. |
| `[].value.payment_on_account[].conditions.order_total` | object | | The net order total must fall within these bounds |
| `[].value.payment_on_account[].conditions.order_total.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_on_account[].conditions.order_total.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_on_account[].conditions.order_quantity` | object | | The size of the order must fall within these bounds |
| `[].value.payment_on_account[].conditions.order_quantity.type` | "total_quantity" \| "line_items" | Yes | What is counted: `total_quantity` sums the units across every line, `line_items` counts the lines themselves. |
| `[].value.payment_on_account[].conditions.order_quantity.minimum` | integer \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_on_account[].conditions.order_quantity.maximum` | integer \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_on_account[].conditions.available_credit` | object | | The credit the customer has left to spend must fall within these bounds. This is credit remaining, not the total credit limit. A customer with no credit limit set has unlimited credit and satisfies any minimum. |
| `[].value.payment_on_account[].conditions.available_credit.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_on_account[].conditions.available_credit.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.payment_on_account[].conditions.products` | object | | Matches when a product in the cart satisfies any one of the filters. Filters are OR'd, and may mix SKU and metadata. |
| `[].value.payment_on_account[].conditions.products.filters` | (PaymentRule.Products.Sku \| PaymentRule.Products.Metadata)[] | Yes | Items: min 1, max 25. |
| `[].value.payment_on_account[].conditions.products.filters[].type` | "sku" | | |
| `[].value.payment_on_account[].conditions.products.filters[].value` | string | | Length: min 1. |
| `[].value.payment_on_account[].conditions.products.filters[].metadata_namespace` | string | | Length: min 1, max 256. |
| `[].value.payment_on_account[].conditions.products.filters[].metadata_key` | string | | Length: min 1, max 128. |
| `[].value.payment_on_account[].outcome` | PaymentRule.Outcome.Surcharge \| PaymentRule.Outcome.Discount \| PaymentRule.Outcome.Hide | Yes | What happens to the payment method when every condition matches |
| `[].value.upfront_payment` | object[] | | Items: max 5. |
| `[].value.upfront_payment[].conditions` | object | Yes | Conditions the rule narrows itself by, keyed by what each one matches on so a rule cannot carry two of the same. All present conditions must match. A rule with no conditions applies to every order. Money bounds are in the currency of the price list the cart is priced in. |
| `[].value.upfront_payment[].conditions.order_total` | object | | The net order total must fall within these bounds |
| `[].value.upfront_payment[].conditions.order_total.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.upfront_payment[].conditions.order_total.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.upfront_payment[].conditions.order_quantity` | object | | The size of the order must fall within these bounds |
| `[].value.upfront_payment[].conditions.order_quantity.type` | "total_quantity" \| "line_items" | Yes | What is counted: `total_quantity` sums the units across every line, `line_items` counts the lines themselves. |
| `[].value.upfront_payment[].conditions.order_quantity.minimum` | integer \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.upfront_payment[].conditions.order_quantity.maximum` | integer \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.upfront_payment[].conditions.available_credit` | object | | The credit the customer has left to spend must fall within these bounds. This is credit remaining, not the total credit limit. A customer with no credit limit set has unlimited credit and satisfies any minimum. |
| `[].value.upfront_payment[].conditions.available_credit.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.upfront_payment[].conditions.available_credit.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.upfront_payment[].conditions.products` | object | | Matches when a product in the cart satisfies any one of the filters. Filters are OR'd, and may mix SKU and metadata. |
| `[].value.upfront_payment[].conditions.products.filters` | (PaymentRule.Products.Sku \| PaymentRule.Products.Metadata)[] | Yes | Items: min 1, max 25. |
| `[].value.upfront_payment[].conditions.products.filters[].type` | "sku" | | |
| `[].value.upfront_payment[].conditions.products.filters[].value` | string | | Length: min 1. |
| `[].value.upfront_payment[].conditions.products.filters[].metadata_namespace` | string | | Length: min 1, max 256. |
| `[].value.upfront_payment[].conditions.products.filters[].metadata_key` | string | | Length: min 1, max 128. |
| `[].value.upfront_payment[].outcome` | PaymentRule.Outcome.Surcharge \| PaymentRule.Outcome.Discount \| PaymentRule.Outcome.Hide | Yes | What happens to the payment method when every condition matches |
| `[].value.quote` | object[] | | Rules for the legacy request-for-quote payment method. The newer quoting system is a purchase type rather than a payment method, so it carries no rules. Items: max 5. |
| `[].value.quote[].conditions` | object | Yes | Conditions the rule narrows itself by, keyed by what each one matches on so a rule cannot carry two of the same. All present conditions must match. A rule with no conditions applies to every order. Money bounds are in the currency of the price list the cart is priced in. |
| `[].value.quote[].conditions.order_total` | object | | The net order total must fall within these bounds |
| `[].value.quote[].conditions.order_total.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.quote[].conditions.order_total.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.quote[].conditions.order_quantity` | object | | The size of the order must fall within these bounds |
| `[].value.quote[].conditions.order_quantity.type` | "total_quantity" \| "line_items" | Yes | What is counted: `total_quantity` sums the units across every line, `line_items` counts the lines themselves. |
| `[].value.quote[].conditions.order_quantity.minimum` | integer \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.quote[].conditions.order_quantity.maximum` | integer \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.quote[].conditions.available_credit` | object | | The credit the customer has left to spend must fall within these bounds. This is credit remaining, not the total credit limit. A customer with no credit limit set has unlimited credit and satisfies any minimum. |
| `[].value.quote[].conditions.available_credit.minimum` | number (double) \| null | | Inclusive lower bound. Absent or null is unbounded. Min 0. |
| `[].value.quote[].conditions.available_credit.maximum` | number (double) \| null | | Exclusive upper bound. Absent or null is unbounded. Min 0. |
| `[].value.quote[].conditions.products` | object | | Matches when a product in the cart satisfies any one of the filters. Filters are OR'd, and may mix SKU and metadata. |
| `[].value.quote[].conditions.products.filters` | (PaymentRule.Products.Sku \| PaymentRule.Products.Metadata)[] | Yes | Items: min 1, max 25. |
| `[].value.quote[].conditions.products.filters[].type` | "sku" | | |
| `[].value.quote[].conditions.products.filters[].value` | string | | Length: min 1. |
| `[].value.quote[].conditions.products.filters[].metadata_namespace` | string | | Length: min 1, max 256. |
| `[].value.quote[].conditions.products.filters[].metadata_key` | string | | Length: min 1, max 128. |
| `[].value.quote[].outcome` | PaymentRule.Outcome.Surcharge \| PaymentRule.Outcome.Discount \| PaymentRule.Outcome.Hide | Yes | What happens to the payment method when every condition matches |

**Settings.allowAddressEditing**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "allowAddressEditing" | Yes | |
| `[].value` | boolean \| null | Yes | |

**Settings.allowDefaultBillingModification**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "allowDefaultBillingModification" | Yes | |
| `[].value` | boolean \| null | Yes | |

**Settings.paymentOnAccountEnforceCreditLimit**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "paymentOnAccountEnforceCreditLimit" | Yes | |
| `[].value` | boolean \| null | Yes | |

**Settings.useMultiLocationStock**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "useMultiLocationStock" | Yes | |
| `[].value` | boolean \| null | Yes | |

**Settings.multiLocationStockConfig**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "multiLocationStockConfig" | Yes | |
| `[].value` | object \| null | Yes | |
| `[].value.useDefault` | boolean | | |
| `[].value.allowedStockLocationIds` | (string (uuid))[] | | |

**Settings.stockDisplay**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "stockDisplay" | Yes | |
| `[].value` | object \| null | Yes | |
| `[].value.show_status` | boolean | | |
| `[].value.show_units` | boolean | | |
| `[].value.max` | integer | | |
| `[].value.low` | integer | | |
| `[].value.last` | integer | | |

**Settings.quotingEngine**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "quotingEngine" | Yes | |
| `[].value` | object \| null | Yes | |
| `[].value.customer_create_quote` | boolean | | |

**Settings.allowCheckout**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "allowCheckout" | Yes | |
| `[].value` | boolean \| null | Yes | |

**Settings.recurringOrdersEngine**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `[].key` | "recurringOrdersEngine" | Yes | |
| `[].value` | object \| null | Yes | |
| `[].value.customer_create_recurring_orders` | boolean | | |

```json
[
  {
    "key": "orderTotalsValidation",
    "value": [
      {
        "currency_code": "gbp",
        "minimum_value": 0,
        "maximum_value": 0,
        "compare_type": "gross"
      }
    ]
  }
]
```

#### 404: Customer group not found

#### 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 \| null | | |
| `errors` | object[] \| null | | A list of errors related to the call |
| `errors[].code` | string | | Machine-readable error code |
| `errors[].property` | string | | The property the error relates to |
| `errors[].message` | string | | Human readable summary of the error |

```json
{
  "detail": "Data Validation Failed",
  "status": 400,
  "title": "invalid-api-request-contents",
  "type": "https://docs.sparklayer.io/api/errors#invalid-api-request-contents",
  "errors": [
    {
      "code": "resource-not-found",
      "property": "stock_location_id",
      "message": "stock_location_id not found"
    }
  ]
}
```
