> ## 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 offer by id

> Get offer by id with requested set of fields.

By default, does not return any relations or statistics. Needed relations should be explicitly specified.



## OpenAPI

````yaml openapi/promotion-v3.json GET /v3/offers/{offerId}
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/offers/{offerId}:
    get:
      tags:
        - Offers
      summary: Get offer by id
      description: >-
        Get offer by id with requested set of fields.


        By default, does not return any relations or statistics. Needed
        relations should be explicitly specified.
      parameters:
        - name: includedRelations
          in: query
          description: List with the included relations.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/OfferIncludedRelations'
        - name: offerId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfferInfo'
        '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:
    OfferIncludedRelations:
      enum:
        - StoresAndChains
        - Statistics
        - Discount
        - Affiliations
      type: string
    OfferInfo:
      required:
        - name
        - offerId
      type: object
      properties:
        unifiedCampaignId:
          maxLength: 64
          type: string
          description: ID of Turboflow Campaign.
          nullable: true
        offerId:
          maxLength: 255
          minLength: 1
          type: string
          description: ID of Promotion Campaign.
        name:
          maxLength: 255
          minLength: 1
          type: string
          description: Name of the campaign visible in the admin tools.
        validFrom:
          type: string
          description: |-
            Date when any coupons for this promotion campaign become
            available to pick up in store.
          format: date-time
          nullable: true
        validTo:
          type: string
          description: >-
            Date when all coupons for this promotion campaign stop being
            available

            to pick up in the store.
          format: date-time
          nullable: true
        previewVisibleFrom:
          type: string
          description: >-
            Date when Coupons will be returned in API and visible in the app.
            Optional. When not specified, ValidFrom is used.
          format: date-time
          nullable: true
        offerType:
          maxLength: 255
          type: string
          description: >-
            Customer specific campaign type. Determines how or by which service
            campaign

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

            stampCard, stickersCampaign, segmentedAppCoupon.
          nullable: true
        content:
          $ref: '#/components/schemas/Content'
        prices:
          $ref: '#/components/schemas/PricesInfo'
        discount:
          $ref: '#/components/schemas/Discount'
        status:
          $ref: '#/components/schemas/CampaignDisplayStatus'
        redemptionLimit:
          type: integer
          description: >-
            Specifies how many times coupon can be redeemed in store. Each
            redemption is

            a separate purchase. Amount of time a coupon can be used in one
            purchase is controlled

            by Discount model.
          format: int32
        totalCoupons:
          type: integer
          description: >-
            Total amount of possible coupons in the campaign. When it is null,
            unlimited

            amount of coupons can be assigned.
          format: int32
          nullable: true
        statistics:
          $ref: '#/components/schemas/OfferStatistics'
        chainIds:
          type: array
          items:
            type: string
          description: >-
            List of Chain Ids where Promotion campaign is available. Mutually
            exclusive with StoreIds.

            Can be null if not requested
          nullable: true
        storeIds:
          type: array
          items:
            type: string
          description: >-
            List of Store Ids where Promotion campaign is available. Mutually
            exclusive with ChainIds.

            Can be null if not requested
          nullable: true
        isDefault:
          type: boolean
          description: >-
            Can be true only for personal campaigns ("personalOffer",
            "relevantOffer"). When true, this campaign

            will be returned for a user that has no coupons assigned in personal
            campaigns.
          nullable: true
        offerSynchronized:
          type: boolean
          description: >-
            Specifies if offer was successfully synchronized into customer
            system
        fundedBy:
          maxLength: 100
          type: string
          description: >-
            Specifies who this offer is funded by. Retailers can use any values
            they need, or keep it empty
          nullable: true
        audienceIds:
          maxItems: 1
          uniqueItems: true
          type: array
          items:
            type: string
          description: Segmentation identifier from the audience service.
          nullable: true
        metadata:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: >-
            Allows to store any arbitrary data in Campaign, returned in all get
            requests and sent to IL during activation. Can be null.
          nullable: true
        authorName:
          maxLength: 64
          type: string
          description: The name of the person/entity that created the offer.
          nullable: true
        isTemplate:
          type: boolean
          description: >-
            Specifies if the offer is template, meaning it can be used as a base
            for other offers during creation
        displayPriority:
          type: integer
          description: >-
            Controlls the order in which coupons are returned to the mobile app.
            Lower number means higher priority
          format: int32
        preactivated:
          type: boolean
          description: >-
            Specifies if coupons for this offer require activation, or are
            working on POS without activation
        ignoreOnPos:
          type: boolean
          description: Specifies if coupons should be visible and processed by POS.
        defaultValidForDays:
          type: integer
          description: >-
            Default number of days a Triggered coupon is valid for, when no
            explicit value is specified during assignment
          format: int32
          nullable: true
        modifiedDate:
          type: string
          description: >-
            The date and time when the campaign was modified. Changes every time
            the campaign is updated.
          format: date-time
          nullable: true
        modifiedBy:
          maxLength: 64
          type: string
          description: The name of the person/entity that last updated the offer.
          nullable: true
      additionalProperties: false
    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
    CampaignDisplayStatus:
      enum:
        - Imported
        - Active
        - Expired
        - Scheduled
      type: string
    OfferStatistics:
      type: object
      properties:
        assignedCoupons:
          type: integer
          description: >-
            Amount of coupons currently assigned or reserved in the campaign.
            Cannot be null
          format: int32
        activatedCoupons:
          type: integer
          description: >-
            Count of coupons that were activated regarding campaign. Cannot be
            null
          format: int32
        redeemedCoupons:
          type: integer
          description: >-
            Count of coupons that were claimed regarding campaign. Cannot be
            null
          format: int32
        totalValue:
          type: number
          description: >-
            Total discount/bonus value granted by this Offer. Can be null, if
            redemption values are not recorded
          format: double
          nullable: true
        minValue:
          type: number
          description: >-
            Minimal discount/bonus value granted by this Offer. Can be null, if
            redemption values are not recorded
          format: double
          nullable: true
        maxValue:
          type: number
          description: >-
            Maximum discount/bonus value granted by this Offer. Can be null, if
            redemption values are not recorded
          format: double
          nullable: true
        avgValue:
          type: number
          description: >-
            Average discount/bonus value granted by this Offer. Can be null, if
            redemption values are not recorded
          format: double
          nullable: true
        minBasket:
          type: number
          description: >-
            Minimal basket that was impacted by this Offer. Can be null, if
            redemption values are not recorded
          format: double
          nullable: true
        maxBasket:
          type: number
          description: >-
            Maximum basket that was impacted by this Offer. Can be null, if
            redemption values are not recorded
          format: double
          nullable: true
        avgBasket:
          type: number
          description: >-
            Average basket that was impacted by this Offer. Can be null, if
            redemption values are not recorded
          format: double
          nullable: true
      additionalProperties: false
      description: Statistical data about campaign. Can be null if not requested.
    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

````