# Detail of quantity discounts

Endpoint: GET /api/quantity-discounts/{id}
Version: 1.0.0
Security: shoptetAccessToken, shoptetPrivateApiToken

## Path parameters:

  - `id` (integer, required)
    discount ID
    Example: 1

## Header parameters:

  - `Content-Type` (string, required)

## Response 200 fields (application/json):

  - `data` (object, required)

  - `data.discount` (object, required)

  - `data.discount.id` (integer, required)
    discount ID

  - `data.discount.title` (string, required)
    discount title

  - `data.discount.validFrom` (string,null, required)
    date of discount validity from

  - `data.discount.validTo` (string,null, required)
    date of discount validity to

  - `data.discount.timeUnlimited` (boolean, required)
    flag whether the discount is time unlimited

  - `data.discount.customerGroups` (array,null, required)
    customer groups connected to discount

  - `data.discount.customerGroups.code` (string, required)
    customer group code

  - `data.discount.customerGroups.name` (string, required)
    customer group name

  - `data.discount.displayFlag` (boolean, required)
    whether the flag is displayed

  - `data.discount.flagColor` (string,null, required)
    color of the flag

  - `data.discount.priority` (integer,null, required)
    priority of the discount

  - `data.discount.isActive` (boolean, required)
    flag whether the discount is active

  - `data.discount.status` (string, required)
    status of the discount
    Enum: "available", "unavailable", "expired", "planned"

  - `data.discount.targetingLevel` (string, required)
    targeting level of the discount
    Enum: "eshop", "product", "category", "brand"

  - `data.discount.targeting` (object,null, required)
    definition of products needed to get discount

  - `data.discount.targeting.productGuids` (array,null, required)
    array of product guids

  - `data.discount.targeting.categoryGuids` (array,null, required)
    array of page guids (categories)

  - `data.discount.targeting.brandCodes` (array,null, required)
    array of brand codes

  - `data.discount.includeUnregisteredCustomers` (boolean, required)
    defines if discount is valid for unregistered customers, default value is false

  - `data.discount.settings` (array,null, required)
    settings of the discount

  - `data.discount.settings.amountFrom` (integer, required)
    amount from of products needed to get discount

  - `data.discount.settings.discountType` (string, required)
    type of discount

  - `data.discount.settings.discountValue` (object, required)

  - `data.discount.settings.discountValue.priceRatio` (string, required)
    price ratio of the discount. Calculate as (100 - percentage) / 100

  - `errors` (array,null, required)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object, required)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.

## Response 404 fields (application/json):

  - `data` (object,null)

  - `errors` (array,null)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.


