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

# Get customer coupons

> Returns a customer's coupons that are not expired, have been assigned, and have not yet been picked up in store.


<b>Filtering by store and chain</b>

By default, all of the customer's available coupons are returned, regardless of store or chain. The following
optional filters narrow the results to a specific location:



storeId - Returns only coupons for offers that include this store. Coupons already assigned to the customer
are included if they are not tied to a specific store, or if they are tied to this one.

chainId - Returns only coupons for offers that include this chain.

preferredStore - Filters the same way as storeId. Additionally returns the preferredStore-type coupons.



Notes:

- storeId and chainId can be combined to narrow results to a specific store and chain at once.

- preferredStore cannot be combined with storeId or chainId; sending them together returns an error (400 Bad Request).

- preferredStore-type coupons are returned only when preferredStore is provided. Without it, no preferredStore-type
coupons are returned. When provided, only the coupons available at that store are returned.


<b>Selecting additional details</b>

includedRelations requests extra information for each coupon. It is optional and more than one value can be
provided at a time. Anything not requested is returned empty.

- StoresAndChains - When included, each coupon lists the IDs of the stores and chains its offer applies to; when omitted, returns empty arrays.

- Discount - When included, each coupon includes the discount details of its offer; when omitted, returns null.


<b>Including already used coupons</b>

By default, coupons already picked up in store are excluded. Setting queryRedeemed to true includes those as well,
only if they are not expired.



## OpenAPI

````yaml openapi/promotion-v3.json GET /v3/customers/{customerId}/coupons
openapi: 3.0.4
info:
  title: Offer Api
  version: v3
servers:
  - url: https://{host}/promotion
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v3/customers/{customerId}/coupons:
    get:
      tags:
        - Coupons
      summary: Get customer coupons
      description: >-
        Returns a customer's coupons that are not expired, have been assigned,
        and have not yet been picked up in store.



        <b>Filtering by store and chain</b>


        By default, all of the customer's available coupons are returned,
        regardless of store or chain. The following

        optional filters narrow the results to a specific location:




        storeId - Returns only coupons for offers that include this store.
        Coupons already assigned to the customer

        are included if they are not tied to a specific store, or if they are
        tied to this one.


        chainId - Returns only coupons for offers that include this chain.


        preferredStore - Filters the same way as storeId. Additionally returns
        the preferredStore-type coupons.




        Notes:


        - storeId and chainId can be combined to narrow results to a specific
        store and chain at once.


        - preferredStore cannot be combined with storeId or chainId; sending
        them together returns an error (400 Bad Request).


        - preferredStore-type coupons are returned only when preferredStore is
        provided. Without it, no preferredStore-type

        coupons are returned. When provided, only the coupons available at that
        store are returned.



        <b>Selecting additional details</b>


        includedRelations requests extra information for each coupon. It is
        optional and more than one value can be

        provided at a time. Anything not requested is returned empty.


        - StoresAndChains - When included, each coupon lists the IDs of the
        stores and chains its offer applies to; when omitted, returns empty
        arrays.


        - Discount - When included, each coupon includes the discount details of
        its offer; when omitted, returns null.



        <b>Including already used coupons</b>


        By default, coupons already picked up in store are excluded. Setting
        queryRedeemed to true includes those as well,

        only if they are not expired.
      parameters:
        - name: customerId
          in: path
          description: The id of the customer.
          required: true
          schema:
            type: string
        - name: includedRelations
          in: query
          description: List of relations that should be included.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/CouponIncludedRelations'
        - name: queryRedeemed
          in: query
          description: Specifies if the redeemed coupons are included.
          schema:
            type: boolean
            default: false
        - name: preferredStore
          in: query
          description: The preferred store of the customer.
          schema:
            type: string
        - name: storeId
          in: query
          description: The selected store to retrieve related available coupons.
          schema:
            type: string
        - name: chainId
          in: query
          description: The selected chain to retrieve related available coupons.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCouponsResponse'
              examples:
                10% off of Coca-Cola with all relations included:
                  value:
                    coupons:
                      - offerId: 82548f61-aa41-4f43-be23-b5156cc67e0b
                        couponId: 8dacb059-13aa-4215-b1ec-9a4ff43da345
                        posCouponId: null
                        offerType: appCoupon
                        offerContent:
                          title: 10% Off Coca-Cola & Fanta – Chain 1 Deal
                          description: >-
                            Refresh your day with a cool discount! For a limited
                            time, get 10% off Coca-Cola or Fanta when purchased
                            without any other offers. This exclusive deal for
                            Chain 1 is your ticket to crisp, bubbly savings—no
                            stacking needed.
                          brand: Coca-Cola Refreshments
                          imageUrl: https://example.com/assets/coke_fanta_discount.jpg
                          discountLabel: 10% Off Coca-Cola & Fanta
                          normalPriceLabel: null
                          pricePerUnitLabelEnabled: true
                          unitOfMeasure: L
                          conditionLabel: Buy 1 Coca-Cola or Fanta
                          receiptDisplayText: 10% off Coca-Cola or Fanta
                          tags: []
                          icons: []
                          autogenerateDiscountLabel: null
                        validFrom: '2026-08-09T00:00:00Z'
                        validTo: '2026-08-15T00:00:00Z'
                        activationTime: null
                        storeIds: []
                        chainIds:
                          - '1'
                        isRedeemed: false
                        prices:
                          currency: EUR
                          normalPrice: 5
                          price: 4.5
                          normalPricePerUnit: 10
                          pricePerUnit: 9
                        discount:
                          priority: 5
                          allowOtherDiscountsOnTop: false
                          itemsApplicationType: NonDiscountedItems
                          impactLevel: Line
                          maxDiscountAmount: 5
                          maxDiscountAmountPerCoupon: 0
                          maxNumberApplyPerReceipt: 1
                          applyOnHighestPrice: false
                          applicationType: OnThreshold
                          discountType: SimpleLine
                          checkoutTypes: null
                          rewardRedemptionSettings: null
                          rules:
                            - type: Percentage
                              value: 0.1
                              thresholdType: Quantity
                              thresholdValue: 1
                              affiliations:
                                - type: Product
                                  id: null
                                  identifiers:
                                    - coca-cola
                                    - fanta
                                  applicationType: Include
                        redemptionLimit: 1
                        redeemedCount: 0
                        displayPriority: 5
                        deletedAt: null
                        assignedBy: null
                10% off of Coca-Cola with no relations included:
                  value:
                    coupons:
                      - offerId: 21657172-1bc0-446d-9eb9-7fe7e4eb99c7
                        couponId: 3feb1108-e8da-4d6d-831f-f254c6fc2f03
                        posCouponId: null
                        offerType: appCoupon
                        offerContent:
                          title: 10% Off Coca-Cola & Fanta – Chain 1 Deal
                          description: >-
                            Refresh your day with a cool discount! For a limited
                            time, get 10% off Coca-Cola or Fanta when purchased
                            without any other offers. This exclusive deal for
                            Chain 1 is your ticket to crisp, bubbly savings—no
                            stacking needed.
                          brand: Coca-Cola Refreshments
                          imageUrl: https://example.com/assets/coke_fanta_discount.jpg
                          discountLabel: 10% Off Coca-Cola & Fanta
                          normalPriceLabel: null
                          pricePerUnitLabelEnabled: true
                          unitOfMeasure: L
                          conditionLabel: Buy 1 Coca-Cola or Fanta
                          receiptDisplayText: 10% off Coca-Cola or Fanta
                          tags: []
                          icons: []
                          autogenerateDiscountLabel: null
                        validFrom: '2026-08-09T00:00:00Z'
                        validTo: '2026-08-15T00:00:00Z'
                        activationTime: null
                        storeIds: []
                        chainIds: []
                        isRedeemed: false
                        prices:
                          currency: EUR
                          normalPrice: 5
                          price: 4.5
                          normalPricePerUnit: 10
                          pricePerUnit: 9
                        discount: null
                        redemptionLimit: 1
                        redeemedCount: 0
                        displayPriority: 5
                        deletedAt: null
                        assignedBy: null
                Personal Offer for 10EUR off basket of 15 EUR, that was used once:
                  value:
                    coupons:
                      - offerId: 750e807f-6937-40ba-bb3d-a6d72eb50b62
                        couponId: f772f387-8ed1-4ffc-9278-5d4bf6a97318
                        posCouponId: 86954bc5-24f6-41ef-9671-bc16b16d17ae
                        offerType: personalOffer
                        offerContent:
                          title: 'Personal Deal: Save 10€ on Your 15€ Basket'
                          description: >-
                            Enjoy this personalized discount on your next
                            grocery run! Spend at least 15€ and instantly save
                            10€ at checkout. This exclusive offer is tailored
                            just for you and valid for select chains.
                          brand: Smart Basket Deals
                          imageUrl: https://example.com/assets/personal_offer_10_off.jpg
                          discountLabel: Save 10€ Today
                          normalPriceLabel: null
                          pricePerUnitLabelEnabled: true
                          unitOfMeasure: null
                          conditionLabel: Spend 15€ or more
                          receiptDisplayText: 10€ off personal basket deal
                          tags: []
                          icons: []
                          autogenerateDiscountLabel: null
                        validFrom: '2026-08-09T00:00:00Z'
                        validTo: '2026-08-15T00:00:00Z'
                        activationTime: '2026-08-10T05:58:02.5192946Z'
                        storeIds: []
                        chainIds:
                          - '1'
                          - '2'
                        isRedeemed: false
                        prices: null
                        discount:
                          priority: 5
                          allowOtherDiscountsOnTop: false
                          itemsApplicationType: NonDiscountedItems
                          impactLevel: Total
                          maxDiscountAmount: 10
                          maxDiscountAmountPerCoupon: 0
                          maxNumberApplyPerReceipt: 1
                          applyOnHighestPrice: false
                          applicationType: OnThreshold
                          discountType: SimpleLine
                          checkoutTypes: null
                          rewardRedemptionSettings: null
                          rules:
                            - type: Percentage
                              value: 0.05
                              thresholdType: Amount
                              thresholdValue: 10
                              affiliations: []
                        redemptionLimit: 3
                        redeemedCount: 1
                        displayPriority: 3
                        deletedAt: null
                        assignedBy: null
                Fully-used Mix & Match coupon:
                  value:
                    coupons:
                      - offerId: 7d669c58-3800-474e-8e74-4a66cace14c5
                        couponId: 48afccf3-63c6-48dc-99d1-bb83ed083afc
                        posCouponId: 0de1c5a7-7d84-4cf7-a4aa-cedcb0d418f4
                        offerType: appCoupon
                        offerContent:
                          title: Save Big on Chips & Coca-Cola Combo
                          description: >-
                            Unlock exclusive savings when you combine your
                            favorite snacks and drinks! With this limited-time
                            offer, buy any pack of chips and get an automatic
                            discount on Coca-Cola multipacks. Perfect for
                            parties or movie nights, this combo delivers both
                            taste and value in one easy deal.
                          brand: Crispy & Refreshing
                          imageUrl: https://example.com/assets/combo_chips_coke.jpg
                          discountLabel: Save up to 30%
                          normalPriceLabel: null
                          pricePerUnitLabelEnabled: false
                          unitOfMeasure: null
                          conditionLabel: Buy 1 Chips + 2 Coca-Cola
                          receiptDisplayText: 'Combo deal: Chips & Coca-Cola'
                          tags: []
                          icons: []
                          autogenerateDiscountLabel: null
                        validFrom: '2026-08-09T00:00:00Z'
                        validTo: '2026-08-15T00:00:00Z'
                        activationTime: '2026-08-10T05:58:02.5193433Z'
                        storeIds:
                          - '3'
                          - '4'
                          - '5'
                        chainIds: []
                        isRedeemed: true
                        prices: null
                        discount:
                          priority: 5
                          allowOtherDiscountsOnTop: false
                          itemsApplicationType: NonDiscountedItems
                          impactLevel: Line
                          maxDiscountAmount: 0
                          maxDiscountAmountPerCoupon: 0
                          maxNumberApplyPerReceipt: 1
                          applyOnHighestPrice: false
                          applicationType: Multiple
                          discountType: MixAndMatch
                          checkoutTypes: null
                          rewardRedemptionSettings: null
                          rules:
                            - type: Percentage
                              value: 0.3
                              thresholdType: Quantity
                              thresholdValue: 1
                              affiliations:
                                - type: Product
                                  id: null
                                  identifiers:
                                    - Chips
                                  applicationType: Include
                            - type: Percentage
                              value: 0.2
                              thresholdType: Quantity
                              thresholdValue: 2
                              affiliations:
                                - type: Product
                                  id: null
                                  identifiers:
                                    - Coca-Cola
                                  applicationType: Include
                        redemptionLimit: 2
                        redeemedCount: 2
                        displayPriority: 1
                        deletedAt: null
                        assignedBy: null
                Activated Mix & Match Total coupon:
                  value:
                    coupons:
                      - offerId: 162a2cb7-6164-472b-a28e-f3a8233e5b0e
                        couponId: e1e688a0-2cb1-4e63-8048-04ace00da5c8
                        posCouponId: 01e81092-ad7d-433f-91ad-32afd8d0bfb3
                        offerType: appCoupon
                        offerContent:
                          title: Mix&Match Meal Deal for 4.99
                          description: >-
                            Enjoy a satisfying and balanced meal on the go! With
                            this combo offer, grab a sandwich, two refreshing
                            drinks, and a fresh salad—all for just 4.99. It’s
                            the perfect pick for lunch breaks, quick dinners, or
                            fueling up during a busy day. Great taste and great
                            value, bundled for your convenience.
                          brand: Fresh & Tasty
                          imageUrl: https://example.com/assets/meal_deal_499.jpg
                          discountLabel: 'Meal Deal: Only 4.99'
                          normalPriceLabel: 'Regular price: 7.99'
                          pricePerUnitLabelEnabled: true
                          unitOfMeasure: null
                          conditionLabel: 1 Sandwich, 2 Drinks, 1 Salad
                          receiptDisplayText: Mix&Match Meal Deal
                          tags: []
                          icons: []
                          autogenerateDiscountLabel: null
                        validFrom: '2026-08-09T00:00:00Z'
                        validTo: '2026-08-15T00:00:00Z'
                        activationTime: '2026-08-10T05:58:02.519396Z'
                        storeIds: []
                        chainIds:
                          - '1'
                          - '2'
                        isRedeemed: false
                        prices: null
                        discount:
                          priority: 5
                          allowOtherDiscountsOnTop: false
                          itemsApplicationType: NonDiscountedItems
                          impactLevel: Total
                          maxDiscountAmount: 0
                          maxDiscountAmountPerCoupon: 0
                          maxNumberApplyPerReceipt: 1
                          applyOnHighestPrice: false
                          applicationType: Multiple
                          discountType: MixAndMatchTotal
                          checkoutTypes: null
                          rewardRedemptionSettings: null
                          rules:
                            - type: Amount
                              value: 0
                              thresholdType: Quantity
                              thresholdValue: 1
                              affiliations:
                                - type: Product
                                  id: null
                                  identifiers:
                                    - Sandwich
                                  applicationType: Include
                            - type: Amount
                              value: 0
                              thresholdType: Quantity
                              thresholdValue: 2
                              affiliations:
                                - type: Product
                                  id: null
                                  identifiers:
                                    - Drink
                                  applicationType: Include
                            - type: Amount
                              value: 0
                              thresholdType: Quantity
                              thresholdValue: 1
                              affiliations:
                                - type: Product
                                  id: null
                                  identifiers:
                                    - Salad
                                  applicationType: Include
                            - type: FixedPrice
                              value: 4.99
                              thresholdType: Quantity
                              thresholdValue: 0
                              affiliations: []
                        redemptionLimit: 1
                        redeemedCount: 0
                        displayPriority: 5
                        deletedAt: null
                        assignedBy: null
                Activated Total Step coupon:
                  value:
                    coupons:
                      - offerId: 2fb579df-7427-4c73-a40d-d2e0b4023485
                        couponId: 95afb299-0c46-4e4c-afee-cf17dfd45f28
                        posCouponId: 2ee36171-b7be-43c8-b4d8-b7eade5879f7
                        offerType: appCoupon
                        offerContent:
                          title: Holiday Savings Tiers
                          description: >-
                            Holiday Savings Tiers: Purchase 60+ for 10 off, 100+
                            for 15 off, 250+ for 25 off!
                          brand: ''
                          imageUrl: https://example.com/assets/holiday_savings_tiers.jpg
                          discountLabel: Holiday Savings Tiers
                          normalPriceLabel: ''
                          pricePerUnitLabelEnabled: true
                          unitOfMeasure: null
                          conditionLabel: Basket amount more than 50
                          receiptDisplayText: Holiday Savings Tiers
                          tags: []
                          icons: []
                          autogenerateDiscountLabel: null
                        validFrom: '2026-08-09T00:00:00Z'
                        validTo: '2026-08-15T00:00:00Z'
                        activationTime: '2026-08-10T05:58:02.5194532Z'
                        storeIds: []
                        chainIds:
                          - '1'
                          - '2'
                        isRedeemed: false
                        prices: null
                        discount:
                          priority: 6
                          allowOtherDiscountsOnTop: false
                          itemsApplicationType: AllItems
                          impactLevel: Total
                          maxDiscountAmount: 0
                          maxDiscountAmountPerCoupon: 0
                          maxNumberApplyPerReceipt: 1
                          applyOnHighestPrice: false
                          applicationType: Multiple
                          discountType: TotalStep
                          checkoutTypes: null
                          rewardRedemptionSettings: null
                          rules:
                            - type: Amount
                              value: 10
                              thresholdType: Amount
                              thresholdValue: 50
                              affiliations:
                                - type: Product
                                  id: junk-food
                                  identifiers: []
                                  applicationType: Exclude
                            - type: Amount
                              value: 15
                              thresholdType: Amount
                              thresholdValue: 100
                              affiliations:
                                - type: Product
                                  id: junk-food
                                  identifiers: []
                                  applicationType: Exclude
                            - type: Amount
                              value: 25
                              thresholdType: Amount
                              thresholdValue: 250
                              affiliations:
                                - type: Product
                                  id: junk-food
                                  identifiers: []
                                  applicationType: Exclude
                        redemptionLimit: 1
                        redeemedCount: 0
                        displayPriority: 5
                        deletedAt: null
                        assignedBy: null
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
components:
  schemas:
    CouponIncludedRelations:
      enum:
        - StoresAndChains
        - Discount
      type: string
    GetCouponsResponse:
      required:
        - coupons
      type: object
      properties:
        coupons:
          type: array
          items:
            $ref: '#/components/schemas/CouponInfo'
          description: All coupons that match the query. Never null, but can be empty.
      additionalProperties: false
    WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    CouponInfo:
      required:
        - chainIds
        - couponId
        - offerId
        - offerType
        - storeIds
      type: object
      properties:
        offerId:
          maxLength: 255
          minLength: 1
          type: string
          description: ID of Promotion Campaign
        couponId:
          maxLength: 50
          minLength: 1
          type: string
          description: ID of Coupon
        posCouponId:
          maxLength: 100
          type: string
          description: >-
            Id of Coupon on POS. Can be the same as CouponId or different,
            depending on Coupon system used downstream.

            Null before coupon is activated, not null after the successful
            activation.
          nullable: true
        offerType:
          maxLength: 255
          minLength: 1
          type: string
          description: >-
            Customer specific Offer type. Determines how or by which service
            Offer

            will be used. Types used so far: baseBonus, game, appCoupon, gift,
            preferredStore, memberOffer,

            stampCard, stickersOffer.
        offerContent:
          $ref: '#/components/schemas/Content'
        validFrom:
          type: string
          description: >-
            Date when this coupon becomes visible and usable in store after
            activation
          format: date-time
        validTo:
          type: string
          description: Date when this coupon expires and cannot be picked up in the store
          format: date-time
        activationTime:
          type: string
          description: Date when this coupon has been activated
          format: date-time
          nullable: true
        storeIds:
          type: array
          items:
            type: string
          description: >-
            List of Store Ids where Offer is available. Mutually exclusive with
            ChainIds.

            Never null, but can be empty. Will be empty if not explicitly
            requested.
        chainIds:
          type: array
          items:
            type: string
          description: >-
            List of Chain Ids where Promotion Offer is available. Mutually
            exclusive with StoreIds.

            Never null, but can be empty. Will be empty if not explicitly
            requested.
        isRedeemed:
          type: boolean
          description: >-
            Has this coupon been redeemed (collected in the store). Is true only
            coupon is redeemed to the limit
        prices:
          $ref: '#/components/schemas/PricesInfo'
        discount:
          $ref: '#/components/schemas/Discount'
        redemptionLimit:
          type: integer
          description: >-
            Specifies how many times coupon can be redeemed in store. Each
            redemption is

            a separate purchase. 0, or positive integer, with 0 meaning
            unlimited redemptions
          format: int32
        redeemedCount:
          type: integer
          description: >-
            Specifies how many times coupon was already redeemed in store. 0
            when coupon was not redeemed,

            postive integer with count of usages otherwise.
          format: int32
        displayPriority:
          type: integer
          description: >-
            Controlls the order in which coupons are returned to the mobile app.
            Lower number means higher priority
          format: int32
        deletedAt:
          type: string
          description: Date when this coupon has been deleted
          format: date-time
          nullable: true
        assignedBy:
          type: string
          description: Name of the person or system that assigned the coupon
          nullable: true
      additionalProperties: false
      description: Coupon details
    Content:
      type: object
      properties:
        title:
          maxLength: 255
          type: string
          description: >-
            Title of product visible in mobile app and in the coupon list. Can
            be cleared by passing empty string.
          nullable: true
        description:
          type: string
          description: >-
            Additional description of product visible in mobile app. Can be
            cleared by passing empty string.
          nullable: true
        brand:
          maxLength: 50
          type: string
          description: Brand of product. Can be cleared by passing empty string.
          nullable: true
        imageUrl:
          maxLength: 2000
          type: string
          description: >-
            Url to the image which be displayed in the promotion in the app. Can
            be cleared by passing empty string.
          nullable: true
        discountLabel:
          maxLength: 255
          type: string
          description: >-
            Discount label - for example Price For a Day or Monthly Price. Can
            be cleared by passing empty string.
          nullable: true
        normalPriceLabel:
          maxLength: 255
          type: string
          description: >-
            Normal price label - for example Non-member Price. Can be cleared by
            passing empty string.
          nullable: true
        pricePerUnitLabelEnabled:
          type: boolean
          description: >-
            Is the price per unit of the product(per kilo, per bottle, etc)
            visible in the mobile app
          nullable: true
        unitOfMeasure:
          maxLength: 255
          type: string
          description: >-
            Unit of measure for the product - EA, kg, etc... Can be cleared by
            passing empty string.
          nullable: true
        conditionLabel:
          maxLength: 64
          type: string
          description: Condition label used for override default condition label in the app
          nullable: true
        receiptDisplayText:
          maxLength: 100
          type: string
          description: Text that should be printed on receipt when the offer is applied
          nullable: true
        tags:
          type: array
          items:
            type: string
          description: >-
            Additional tags - organic, vegan, best buy, etc... Can be cleared by
            passing empty array.
          nullable: true
        icons:
          type: array
          items:
            type: string
          description: >-
            URLs to additional icons to show on Offer Card. Can be cleared by
            passing empty array.
          nullable: true
        autogenerateDiscountLabel:
          type: boolean
          description: Whether to autogenerate discount label based on discount rules
          nullable: true
      additionalProperties: false
    PricesInfo:
      type: object
      properties:
        currency:
          maxLength: 3
          type: string
          description: >-
            ISO-4217 currency code - 3 characters, for example, DKK, ISK, EUR
            etc. Optional on import.

            Required before an offer with a price can be published. When not
            provided, last stored value is used
          nullable: true
        normalPrice:
          maximum: 100000000
          minimum: 0
          type: number
          description: >-
            Price of the purchased amount before discount is applied. Required
            when

            importing campaign for the first time. When not provided, last
            stored value is used.

            Use 0 to clear the field.
          format: double
          nullable: true
        price:
          type: number
          description: Price of the purchased amount after discount is applied
          format: double
          nullable: true
        normalPricePerUnit:
          maximum: 100000000
          minimum: 0
          type: number
          description: >-
            Price per unit (per kile, for example) before discount is applied.
            Required when

            importing campaign for the first time. When not provided, last
            stored value is used.

            Use 0 to clear the field.
          format: double
          nullable: true
        pricePerUnit:
          type: number
          description: Price per unit (per kile, for example) after discount is applied
          format: double
          nullable: true
      additionalProperties: false
    Discount:
      type: object
      properties:
        priority:
          type: integer
          description: >-
            The discount priority. The lower the priority value, the more
            priority the discount has
          format: int32
        allowOtherDiscountsOnTop:
          type: boolean
          description: >-
            Indicates whether the current discount allows the application of
            other discounts over it
        itemsApplicationType:
          $ref: '#/components/schemas/ItemsApplicationType'
        impactLevel:
          $ref: '#/components/schemas/ImpactLevelType'
        maxDiscountAmount:
          type: number
          description: >-
            The maximum discount amount that can be applied to the basket. 0 is
            default value means 'unlimited '.
          format: double
        maxDiscountAmountPerCoupon:
          type: number
          description: >-
            The maximum discount amount that can be applied by a single coupon.
            0 is default value means 'unlimited'.
          format: double
        maxNumberApplyPerReceipt:
          type: number
          description: >-
            Specifies maximum number of times this discount can be applied in
            scope of single receipt
          format: double
        applyOnHighestPrice:
          type: boolean
          description: >-
            Defines sorting of products to apply discount on highest or lowest
            price product.
        applicationType:
          $ref: '#/components/schemas/DiscountApplicationType'
        discountType:
          $ref: '#/components/schemas/DiscountType'
        checkoutTypes:
          type: array
          items:
            type: string
          description: List of checkout types for which discount is applicable.
          nullable: true
        rewardRedemptionSettings:
          $ref: '#/components/schemas/RewardRedemptionSettings'
        rules:
          type: array
          items:
            $ref: '#/components/schemas/DiscountRule'
          description: List of rules tied to this discount.
          nullable: true
      additionalProperties: false
    ItemsApplicationType:
      enum:
        - AllItems
        - NonDiscountedItems
        - DiscountedItems
      type: string
      description: The discounted items type
    ImpactLevelType:
      enum:
        - Line
        - Total
      type: string
      description: Specifies what the discount impacts - specific line or the basket total
    DiscountApplicationType:
      enum:
        - OnThreshold
        - Multiple
      type: string
      description: >-
        Specifies how the discount is applied. Can be calculated based on rules,
        but agreed to hardcode for now.

        In future, will also start supporting Multiple, when there are >1 rules
    DiscountType:
      enum:
        - Unknown
        - SimpleLine
        - SimpleQuantity
        - SimpleTotal
        - MixAndMatch
        - MixAndMatchTotal
        - QuantityStep
        - RewardTotal
        - TotalStep
      type: string
      description: The type of discount calculation rule to apply
    RewardRedemptionSettings:
      type: object
      properties:
        redeemableFrom:
          type: string
          description: >-
            The date and time when the granted benefit becomes available for
            use.

            Can be used only for Bonus benefits.
          format: date-time
          nullable: true
        redeemableTo:
          type: string
          description: >-
            The exact date and time when the granted benefit expires if not
            used.

            Can be used only for Bonus benefits.

            This property is mutually exclusive with
            Promotion.Client.ApiModels.RewardRedemptionSettings.RedeemableForDays.
          format: date-time
          nullable: true
        redeemableForDays:
          type: integer
          description: >-
            The number of days after which the benefit expires if not used,
            counted from the moment the benefit is granted.

            This property is mutually exclusive with
            Promotion.Client.ApiModels.RewardRedemptionSettings.RedeemableTo.

            Can be used only for Bonus benefits.
          format: int32
          nullable: true
      additionalProperties: false
      description: >-
        Settings related to the redemption of a reward granted by an offer.
        Applicable only for Bonus type offers.
    DiscountRule:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/RuleType'
        value:
          maximum: 100000000
          minimum: 0
          type: number
          description: >-
            Absolute price after discount is applied, when type is FixedPrice,
            can be any positive value or 0.

            Or percentage that is detracted from the price, when type is
            Percentage, must be number from (0, 1] range.
          format: double
          nullable: true
        thresholdType:
          $ref: '#/components/schemas/ThresholdType'
        thresholdValue:
          maximum: 100000000
          minimum: 0
          type: number
          description: Value for the threshold. Cannot be negative
          format: double
          nullable: true
        affiliations:
          type: array
          items:
            $ref: '#/components/schemas/Affiliation'
          description: >-
            List of affiliations for the Campaign. For now, only included
            products are actually returned.
          nullable: true
      additionalProperties: false
    RuleType:
      enum:
        - FixedPrice
        - Percentage
        - Amount
        - BonusPercent
        - BonusAmount
      type: string
      description: Type of the discount.
    ThresholdType:
      enum:
        - Quantity
        - Amount
      type: string
      description: >-
        Specifies what is the threshold for discount to apply. If not enough
        items are purchased, discount will not be applied
    Affiliation:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AffiliationType'
        id:
          maxLength: 60
          type: string
          description: The id of the affiliation. Will be null in responses
          nullable: true
          deprecated: true
        identifiers:
          uniqueItems: true
          type: array
          items:
            type: string
          description: List of ids for this affiliation
          nullable: true
        applicationType:
          $ref: '#/components/schemas/AffiliationApplicationType'
      additionalProperties: false
    AffiliationType:
      enum:
        - Product
        - Category
      type: string
      description: The type of the affiliation.
    AffiliationApplicationType:
      enum:
        - Include
        - Exclude
      type: string
      description: The application type for the affiliation.
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Opaque Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````