> ## 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.

# Activate coupon

> Activation sends coupon information to client Coupon or POS integration layer,
making it available for pick-up in store.



## OpenAPI

````yaml openapi/promotion-v3.json POST /v3/customers/{customerId}/coupons/{couponId}/activate
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/{couponId}/activate:
    post:
      tags:
        - Coupons
      summary: Activate coupon
      description: >-
        Activation sends coupon information to client Coupon or POS integration
        layer,

        making it available for pick-up in store.
      parameters:
        - name: customerId
          in: path
          description: The id of the customer.
          required: true
          schema:
            type: string
        - name: couponId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CouponInfo'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
components:
  schemas:
    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
    WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    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

````