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

# Check user eligibility

> Request that is sent to the merchant to check if the user is eligible to create an entitlement for the product provided in the request.



## OpenAPI

````yaml /openapi/legacy/resale/bango-to-content-provider/openapi.yaml post /v1/entitlement/checkeligibility
openapi: 3.0.0
info:
  version: 1.1.0
  title: Resale Merchant - Client API
  description: >
    **Changelog**

    * 1.2.0:
      * Adding optional `sharedCustomerId` to all Bango-initiated outbound requests
    * 1.1.0:
      * Removing `extensionData` from `POST /v1/entitlement`
      * Removing `POST /v1/entitlement/suspend/{merchantEntitlementId}` and `POST /v1/entitlement/resume/{merchantEntitlementId}`
      * Removing `merchantExtensionData` from response object
      * Adding `bangoUserId`, `productId`, `offerId`, `customerId`, `merchantExtensionData` and `extraInformation` to  `POST /v1/entitlement/terminate/{merchantEntitlementId}`
      * Adding `merchantExtensionData` to request object:
        * `POST /v1/entitlement`
        * `PATCH /v1/entitlement`
        * `POST /v1/entitlement/terminate/{merchantEntitlementId}`
        * `POST /v1/entitlement/checkeligibility` 
      * Adding `financeData` to request object:
        * `POST /v1/entitlement`
        * `PATCH /v1/entitlement`
        * `POST /v1/entitlement/terminate/{merchantEntitlementId}`
      * Adding `status` to request object:
        * `POST /v1/entitlement`
        * `PATCH /v1/entitlement`
        * `POST /v1/entitlement/terminate/{merchantEntitlementId}`
      * Adding `merchantBangoExtensionData` to request object
    * 1.0.8:
      * Adding `409 CONFLIFT` to
        * `POST /v1/entitlement/terminate/{merchantEntitlementId}`
    * 1.0.7:
      * Adding `entitlementBenefits` to `PATCH /v1/entitlement`
      * Adding `extraInformation` to `PATCH /v1/entitlement`
    * 1.0.6:
      * Adding customerId to the `POST /v1/entitlement` and `PATCH /v1/entitlement`
    * 1.0.5:
      * Updating API spec to be OpenAPI3
      * Adding resellerId to `PATCH /v1/entitlement` and `POST /v1/entitlement/terminate/{merchantEntitlementId}`
    * 1.0.4:
      * Adding `extensionData` to `PATCH /v1/entitlement`
      * Adding `offerId` and `customerIdentifier` to `POST /v1/entitlement/checkeligibility`
      * Adding the support for a `201 created` response for `POST /v1/entitlement`
    * 1.0.3: Initial release 


    **Available authorization options**

    * Basic Auth - Bango uses Basic; base64-encoded credentials

    * OAuth2 - Bango uses
    https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

    * AWSToken - apiKey

      See security definition secton for more information
  contact:
    name: Bango Support
    url: https://bango.com
    email: support@bango.com
  termsOfService: https://bango.com/privacy
servers:
  - url: >-
      https://virtserver.swaggerhub.com/BangoProducts/MerchantInterface_Client_API/1.1.0
security:
  - BasicAuth: []
paths:
  /v1/entitlement/checkeligibility:
    post:
      tags:
        - Eligibility
      summary: Check user eligibility
      description: >-
        Request that is sent to the merchant to check if the user is eligible to
        create an entitlement for the product provided in the request.
      operationId: checkeligibility
      parameters:
        - name: X-RequestIdentifier
          in: header
          description: Request unique identifier. This id should be used for idempotency.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckEligibilityRequest'
        description: >-
          The check eligibility JSON sent to merchant to check is user is
          eligible for a subscription
        required: true
      responses:
        '200':
          description: Valid User eligibility response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckEligibilityResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequests'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InteralServerError'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailable'
components:
  schemas:
    CheckEligibilityRequest:
      type: object
      required:
        - bangoUserId
        - customerId
        - resellerId
        - productId
      properties:
        bangoUserId:
          type: string
          description: >-
            Unique identifier which Bango holds that representing a specific
            customer of the reseller.
          example: '1549053185'
        customerId:
          type: string
          description: Unique identifier representing a specific customer of the reseller.
          example: abc@email.co.uk
        resellerId:
          type: string
          description: Unique reseller identifier as agreed with the merchant
          example: XYZ_RESELLER
        productId:
          type: string
          description: Entitlement product unique identifier. For example, "BangoMusic".
          example: BangoMusic
        offerId:
          type: string
          description: Entitlement offer unique identifier. For example, "6_MONTHS_ON_US".
          example: 6_MONTHS_ON_US
        merchantExtensionData:
          $ref: '#/components/schemas/MerchantExtensionData'
        merchantBangoExtensionData:
          $ref: '#/components/schemas/MerchantBangoExtensionData'
    CheckEligibilityResponse:
      type: object
      properties:
        eligible:
          type: boolean
          description: |-
            Eligibility status. Possible values are:
              - true: The user is eligible for the Entitlement
              - false: The user is not eligible for the Entitlement
          example: true
        reason:
          type: string
          description: >-
            Reason for the eligibility response. This is not a mandatory value
            to be sent by the merchant. Examples:
              - "User has an existing subscription"
          example: User is eligible for this Entitlement
    BadRequest:
      type: object
      properties:
        responseCode:
          type: string
          example: BAD_REQUEST
        responseMessage:
          type: string
          example: Invalid request.
    Unauthorized:
      type: object
      properties:
        responseCode:
          type: string
          example: UNAUTHORIZED
        responseMessage:
          type: string
          example: Invalid access credentials.
    TooManyRequests:
      type: object
      properties:
        responseCode:
          type: string
          example: TOO_MANY_REQUESTS
        responseMessage:
          type: string
          example: Request limit reached. Please try again later.
    InteralServerError:
      type: object
      properties:
        responseCode:
          type: string
          example: INTERNAL_ERROR
        responseMessage:
          type: string
          example: >-
            The server encountered an unexpected condition which prevented it
            from fulfilling the request.
    ServiceUnavailable:
      type: object
      properties:
        responseCode:
          type: string
          example: SERVICE_UNAVAILABLE
        responseMessage:
          type: string
          example: >-
            The server is undergoing maintenance and is not available. Please,
            try again later.
    MerchantExtensionData:
      type: object
      additionalProperties:
        type: string
        description: Accepts a dynamic list of key-value pairs to cover custom data needs
      example:
        merchantCustomData1: merchantCustomDataValue1
        merchantCustomData2: merchantCustomDataValue2
        merchantCustomData3: merchantCustomDataValue3
    MerchantBangoExtensionData:
      type: object
      additionalProperties:
        type: string
        description: >-
          Contains a defined list of key-value pairs to cover static custom data
          needs
      example:
        merchantCustomData1: merchantBangoCustomDataValue1
        merchantCustomData2: merchantBangoCustomDataValue2
        merchantCustomData3: merchantBangoCustomDataValue3
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic

````