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

# Gets consumers offer for a brand.

> 
Returns the list of active or published offers for this brand for this specific
consumer.




## OpenAPI

````yaml /program/api/openapi/legacy/1.1.9/connector.json get /connectors/consumers/{consumer_id}/brands/{brand_id}/offers
openapi: 3.0.2
info:
  description: >
    ## Welcome to PayLead API Documentation !

    With this documentation, we will help you go through the phases of

    basic implementation, and help you understand the basic steps to let you
    reach your objectives through our API.

    ## Versioning

    Our API supports versioning, so be sure to set the right version in the
    header, using the Client-Api-Version field :


    ex : X-Api-Version = 1.0.0

    ## Response code

    Our API returns standard HTTP response codes to indicate success or failure
    of the API requests. For

    errors, we also return a customized error message inside the JSON response.
    You can see the returned

    HTTP status codes below.


    |Code|Title|Description

    |------|------|------|

    |200|OK|Request successful

    |201|Created|Resource successfully created

    |204|No Content|Request successful with no content returned

    |400|Bad Request|Request was unacceptable

    |401|Unauthorised|API key provided is invalid

    |402|Request Failed|Valid parameters but the request failed

    |403|Forbidden|Access is forbidden.

    |404|Not Found|Resource does not exist

    |409|Conflict|The request could not be completed due to a conflict with the
    current state of the target resource

    |429|Too Many Requests|The user has sent too many requests in a given amount
    of time ("rate limiting").

    |500, 502, 503, 504|Server Errors|Something went wrong with the PayLead API


    ## Error handling

    In case of error our API returns errors based on JSON API principles,
    especially for 4xx errors.

    An error response contains an unique id which can be used for investigation.

    In addition, you will find a message explaining the error, a readable code
    and a meta object containing more details.


    You can see an example below.


    >> ~~~~

    >> {

    >>     'errors': {

    >>             'target_account': [

    >>                 {

    >>                 'code': 'FORMAT_ERROR',

    >>                 'message': 'Invalid IBAN; it should be 4-34 characters,
    only upper-case letters and digits.',

    >>                 'meta': {

    >>                     'value': 'SOME-INVALID-IBAN'

    >>                 }

    >>             }

    >>         ]

    >>     },

    >>     'id': '784db0c2-0e87-40d4-aa62-3e801135ccf7'

    >> }

    >> ~~~~

    ## Language — Content Negotiation

    If your program has been configured to support multiple languages, the API
    will respect the `Accept-Language` header as defined in
    [RFC7231](https://tools.ietf.org/html/rfc7231#section-5.3.5).


    For each incoming request, the best language will be selected by matching
    the list of languages accepted by the client with the list of languages
    supported by the program.


    For example, with a header of `Accept-Language: fr-FR,en-GB;q=0.8,en;q=0.3`:

      * If supported languages are `fr-FR, en-GB`, the best match is `fr-FR`;
      * If supported languages are `en-GB, fr-FR`, the best match is `fr-FR`;
      * If supported languages are `fr-BE, nl-BE`, the best match is `fr-BE`;
      * If supported languages are `it-IT, en-US`, the best match is `en-US`;
      * If supported languages are `de-CH, it-CH`, the best match is `de-CH`.


    The selected language will be exposed through the `Content-Language` header.


    *Note:* If some fields haven't been translated yet, they will be returned in
    the program's primary language.
  title: PayLead API
  version: 1.1.9
servers:
  - url: https://api.sandbox.paylead.tech
security:
  - ApiKeyAuth: []
paths:
  /connectors/consumers/{consumer_id}/brands/{brand_id}/offers:
    get:
      tags:
        - Brands
      summary: Gets consumers offer for a brand.
      description: >

        Returns the list of active or published offers for this brand for this
        specific

        consumer.
      parameters:
        - description: Unique ID of the brand on PayLead system.
          in: path
          name: brand_id
          required: true
          schema:
            format: uuid
            type: string
        - description: The id you used to create the given consumer
          in: path
          name: consumer_id
          required: true
          schema:
            type: string
        - description: |-
            Filter by cashback_rate

            Rate of reward used to calculate cashback amount
          example: 5
          in: query
          name: cashback_rate
          schema:
            type: number
        - description: Filter by default_cashback_rate
          in: query
          name: default_cashback_rate
          schema:
            type: number
        - description: |-
            Filter by frequency

            Number of purchases before the customer gets a reward.
          in: query
          name: frequency
          schema:
            type: integer
        - description: Filters all frequency higher than those provided in frequency__gt.
          in: query
          name: frequency__gt
          schema:
            type: integer
        - description: >-
            Filters all offers depending on whether they are a loyalty_offer or
            not. If "true", retrieves all the Offers that are not of loyalty
            type. If "false", retrieves all the Offers of loyalty type.
          in: query
          name: frequency__isnull
          schema:
            type: boolean
        - description: |-
            Filter by frequency_counter

            Purchases made by the Consumer.
          in: query
          name: frequency_counter
          schema:
            type: integer
        - description: >-
            Filters all frequency_counter higher than those provided in
            frequency_counter__gt.
          in: query
          name: frequency_counter__gt
          schema:
            type: integer
        - description: >-
            Filters all offers depending on whether they are a loyalty_offer or
            not. If "true", retrieves all the Offers that are not of loyalty
            type. If "false", retrieves all the Offers of loyalty type.
          in: query
          name: frequency_counter__isnull
          schema:
            type: boolean
        - description: Filter by is_boosted
          in: query
          name: is_boosted
          schema:
            type: boolean
        - description: >-
            Filter by is_consumed


            Has the consumer already consumed the coupon of the current offer?
            If true, yes. If false, no.
          example: true
          in: query
          name: is_consumed
          schema:
            type: boolean
        - description: |-
            Filter by offer__id

            Unique UUID of the offer
          example: 16db86d2-38eb-47fb-bae1-a23bb1b36cc2
          in: query
          name: offer__id
          schema:
            format: uuid
            type: string
        - description: |-
            Filter by offer__name

            Name of the offer
          example: 5% de remboursement chez MyBrand
          in: query
          name: offer__name
          schema:
            type: string
        - description: >-
            Filter by source_transaction


            If this flag is true, the transaction must come from the default
            bank of the program to generate a reward
          in: query
          name: source_transaction
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandConsumer'
          description: OK
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Not allowed to access the resource
        '404':
          description: Not found
        '405':
          description: Method not allowed
        '422':
          description: Unprocessable Entity
components:
  schemas:
    BrandConsumer:
      properties:
        description:
          description: description
          readOnly: true
          type: string
        id:
          description: Unique ID of the object.
          example: e2c32b4b-de61-459b-accf-a75f76247946
          format: uuid
          readOnly: true
          type: string
        logo:
          $ref: '#/components/schemas/Logo'
        name:
          description: Name of the object
          readOnly: true
          type: string
        offers:
          description: List of Offer objects
          items:
            $ref: '#/components/schemas/BrandOfferConsumer'
          type: array
        universes:
          description: Universes
          items:
            $ref: '#/components/schemas/Universe'
          type: array
      required:
        - name
      type: object
    Logo:
      properties:
        content_type:
          description: Content type of the logo.
          type: string
        created_at:
          description: Object creation datetime
          example: '2019-01-31T15:16:15.523309+00:00'
          format: date-time
          type: string
        id:
          description: Unique ID of the object.
          example: e2c32b4b-de61-459b-accf-a75f76247946
          format: uuid
          type: string
        links:
          $ref: '#/components/schemas/Links'
        name:
          description: Name of the object
        owner:
          description: Owner of the logo.
          type: string
        path:
          description: Path of the logo.
          type: string
      required:
        - path
      type: object
    BrandOfferConsumer:
      properties:
        application_channel:
          description: >-
            Offer availability: **ONLINE** if the offer is online only.
            **OFFLINE** if the offer is offline only. **BOTH** if the offer is
            online and offline
          enum:
            - BOTH
            - ONLINE
            - OFFLINE
          example: ONLINE
          maxLength: 7
          nullable: true
        application_url:
          description: >-
            URL to reach the offer if the offer channel is **ONLINE** or
            **BOTH**
          example: https://www.mybrand.fr
          nullable: true
          readOnly: true
          type: string
        capping_period:
          readOnly: true
        cashback_rate:
          description: Rate of reward used to calculate cashback amount
          example: 5
          readOnly: true
        default_cashback_rate:
          readOnly: true
        end_date:
          description: 'Date (ex. 2017-12-26T23:00:00+00:00): End date of the offer.'
          example: '2018-12-21T00:00:00+00:00'
          readOnly: true
        frequency:
          description: Number of purchases before the customer gets a reward.
          nullable: true
          readOnly: true
        frequency_counter:
          description: Purchases made by the Consumer.
          nullable: true
          readOnly: true
        id:
          description: Unique ID of the object.
          example: e2c32b4b-de61-459b-accf-a75f76247946
          format: uuid
          readOnly: true
          type: string
        is_boosted:
          readOnly: true
        is_consumed:
          description: >-
            Has the consumer already consumed the coupon of the current offer?
            If true, yes. If false, no.
          example: true
          readOnly: true
          type: boolean
        legal_terms:
          description: Legal terms
          readOnly: true
        max_amount:
          description: >-
            Maximum transaction amount for this offer. the maximum reward for
            this offer is max_amount x cashback_rate
          example: 250
          readOnly: true
        max_cashbacks_per_consumer:
          description: >-
            The maximum number of rewards that can be obtained by a consumer, if
            "None", it's unlimited, on a given offer
          readOnly: true
        max_limit_transaction_amount:
          description: >-
            The maximum amount of a transaction to be eligible for a reward. If
            a transaction exceeds this amount, no reward will be generated.
          readOnly: true
        min_amount:
          description: >-
            Minimum amount for a transaction to be able to generate a reward for
            the consumer
          example: 40
          readOnly: true
        name:
          description: Name of the offer
          nullable: true
          readOnly: true
          type: string
        picture:
          $ref: '#/components/schemas/Logo'
        segments:
          description: Segments of offers.
          items:
            $ref: '#/components/schemas/Segment'
          readOnly: true
          type: array
        source_transaction:
          description: >-
            If this flag is true, the transaction must come from the default
            bank of the program to generate a reward
          readOnly: true
          type: boolean
        start_date:
          description: 'Date (ex. 2017-12-26T23:00:00+00:00): Start date of the offer.'
          example: '2018-12-21T00:00:00+00:00'
          readOnly: true
        status:
          description: >
            - ACTIVE: The offer is available and your customers can benefit from
            it.

            - COMPLETED: All the coupons of the offer have been burnt, the offer
            is no longer active.

            - PUBLISHED: The offer is published but not yet active. You can
            choose to display it to tease your customers.
          readOnly: true
          type: string
        type:
          description: 'Enum in: CASHBACK, UNIQUE_COUPON, GENERIC_COUPON'
          enum:
            - CASHBACK
            - UNIQUE_COUPON
            - GENERIC_COUPON
            - VOUCHER
            - AFFILIATION
            - LBS_CASHBACK
          example: CASHBACK
          maxLength: 14
      type: object
    Universe:
      properties:
        id:
          description: Unique ID of the object.
          example: e2c32b4b-de61-459b-accf-a75f76247946
          format: uuid
          readOnly: true
          type: string
        name:
          description: Name of the object
          nullable: true
          readOnly: true
          type: string
      type: object
    Links:
      properties:
        download:
          description: The link to download the data.
          format: url
          type: string
        preview:
          description: The link to preview the data.
          format: url
          type: string
      type: object
    Segment:
      properties:
        id:
          description: Unique ID of the object.
          example: e2c32b4b-de61-459b-accf-a75f76247946
          readOnly: true
          type: string
        name:
          description: Name of the object
          maxLength: 128
          minLength: 1
          pattern: ^[a-zA-Z0-9_.-]*$
          type: string
      required:
        - name
      type: object
  securitySchemes:
    ApiKeyAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````