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

# Search For Entitlements

> Get a list of entitlements for a customerIdentifier or a sharedCustomerId, matching specific criteria.



## OpenAPI

````yaml /openapi/current/dvm/reseller-to-dvm/entitlement/openapi.json post /v1/entitlement/report
openapi: 3.1.0
info:
  title: Reseller to DVM - Entitlement
  summary: Current / DVM / Reseller to DVM / Entitlement
  description: Create, get, update and cancel entitlements.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Entitlements
    description: API methods to manage entitlements
paths:
  /v1/entitlement/report:
    post:
      tags:
        - Entitlements
      summary: Search For Entitlements
      description: >-
        Get a list of entitlements for a customerIdentifier or a
        sharedCustomerId, matching specific criteria.
      operationId: Search_for_entitlements_v1_entitlement_report_post
      parameters:
        - name: X-RequestIdentifier
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Optional identifier to support idempotency
            title: X-Requestidentifier
          description: Optional identifier to support idempotency
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntitlementReport'
            examples:
              Base request:
                value:
                  customerIdentifier: '4407123456789'
                  productKey: MUSIC
                  status: ACTIVE
              Search by sharedCustomerId:
                value:
                  sharedCustomerId: 414b3019-0c28-4d14-9c5f-6217b8bd1e3e
                  productKey: MUSIC
                  status: ACTIVE
              Search by merchantAccountKey and statuses:
                value:
                  customerIdentifier: '4407123456789'
                  merchantAccountKey: BANGO_US
                  statuses:
                    - ACTIVE
                    - SUSPENDED
      responses:
        '200':
          description: Retrieval successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntitlementReportResponse'
              examples:
                OK:
                  value:
                    responseCode: OK
                    responseMessage: Success
                    entitlements:
                      - entitlementId: a25100b8-4e0c-4e37-b921-cac9cb1e930f
                        customerIdentifier: '4407123456789'
                        sharedCustomerId: 414b3019-0c28-4d14-9c5f-6217b8bd1e3e
                        bangoUserId: '2147483647'
                        productKey: BangoMusic
                        entitlementDisplayName: 30 days Bango music
                        merchantAccountKey: BANGO
                        dateCreated: '2020-06-22T17:35:38.92Z'
                        dateActivated: '2020-06-22T17:36:01Z'
                        dateExpiry: '0001-01-01T00:00:00Z'
                        dateEnded: '0001-01-01T00:00:00Z'
                        dateFailed: '0001-01-01T00:00:00Z'
                        responseCode: OK
                        responseMessage: Success
                        status: ACTIVE
                        externalEntitlementId: 124130d2-2cbc-45a1-ab9b-dfa8b67a2e63
                        extensionData:
                          additionalProp1: string
                          additionalProp2: string
                          additionalProp3: string
                        extraInformation:
                          communicationInformation:
                            emailAddress: 123@abc.co.uk
                            msisdn: '441234567890'
                          clientDevice:
                            type: STB
                            id: bc449c9e-406f-4399-a3ff-8671a27ac410
                            typeId: P49AJFND8NFN23NANGAJG
                            modelName: STB Model X7
                            modelNumber: IAH45IAOF/5
                            serialNumber: JHFJHA43JNFA9393GFD
                            osType: Linux
                            osVersion: 10.3.8
                            macAddress: 4A-0F-99-F2-D3-DD
                            browser: Firefox
                          source:
                            channelType: Website
                            campaignRef: SUMMER_PROMO
                            referrer: SEARCH_ENGINE
                            bundleId: BundleABC123
                            country: United Kingdom
                            region: East Anglia
                            brand: BrandABC
          headers:
            X-Idempotent-Record:
              description: >-
                Set when the request includes an `X-RequestIdentifier` header.
                `CREATED` for the first request with that identifier. `EXISTS`
                for a repeat, when the stored response is returned. `FAILED`
                when the request was processed but its idempotency record could
                not be read or saved, so a retry with the same identifier may be
                processed again.
              schema:
                type: string
                enum:
                  - CREATED
                  - EXISTS
                  - FAILED
        '400':
          description: Bad request
          content:
            application/json:
              examples:
                Bad request:
                  value:
                    responseCode: BAD_REQUEST
                    responseMessage: Invalid request.
                    metadata:
                      responseMessageFrom: BANGO
                Operation not supported:
                  value:
                    responseCode: OPERATION_NOT_SUPPORTED
                    responseMessage: Operation not supported for entitlement route.
                    metadata:
                      responseMessageFrom: BANGO
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid credentials (no response body returned)
        '404':
          description: Not found
          content:
            application/json:
              examples:
                Not found:
                  value:
                    responseCode: NOT_FOUND
                    responseMessage: Entitlement Not Found
                    metadata:
                      responseMessageFrom: BANGO
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                Idempotent request in progress:
                  value:
                    responseCode: IDEMPOTENT_REQUEST_IN_PROGRESS
                    responseMessage: Idempotency request in progress. Please try again later.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-Idempotent-Record:
              description: >-
                Set to `IN_PROGRESS` when the conflict is caused by an earlier
                request with the same `X-RequestIdentifier` that is still being
                processed.
              schema:
                type: string
                enum:
                  - IN_PROGRESS
        '429':
          description: Too Many Requests
          content:
            application/json:
              examples:
                Too Many Requests:
                  value:
                    responseCode: TOO_MANY_REQUESTS
                    responseMessage: Request limit reached. Please try again later.
                    metadata:
                      responseMessageFrom: BANGO
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                Internal server error:
                  value:
                    responseCode: INTERNAL_ERROR
                    metadata:
                      responseMessageFrom: BANGO
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service Unavailable
          content:
            application/json:
              examples:
                Service Unavailable:
                  value:
                    responseCode: SERVICE_UNAVAILABLE
                    metadata:
                      responseMessageFrom: BANGO
                Idempotency service unavailable:
                  value:
                    responseCode: SERVICE_UNAVAILABLE
                    responseMessage: >-
                      The server is undergoing maintenance and is not available.
                      Please, try again later.
                    metadata:
                      responseMessageFrom: BANGO
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-Idempotent-Record:
              description: Set to `FAILED` when the idempotency service is not available.
              schema:
                type: string
                enum:
                  - FAILED
      security:
        - XApiKey: []
        - BasicAuth: []
        - OAuth2: []
components:
  schemas:
    EntitlementReport:
      oneOf:
        - required:
            - customerIdentifier
        - required:
            - sharedCustomerId
      not:
        required:
          - status
          - statuses
      properties:
        customerIdentifier:
          type: string
          maxLength: 400
          minLength: 1
          title: Customeridentifier
          description: >-
            Unique customer identifier. Required if `sharedCustomerId` is not
            provided. Cannot be used with `sharedCustomerId`.
        sharedCustomerId:
          type: string
          format: uuid
          title: Sharedcustomerid
          description: >-
            Bango-generated customer identifier. Required if
            `customerIdentifier` is not provided. Cannot be used with
            `customerIdentifier`.
          examples:
            - 414b3019-0c28-4d14-9c5f-6217b8bd1e3e
        productKey:
          type: string
          maxLength: 255
          minLength: 1
          title: Productkey
          description: Entitlement product unique identifier
        merchantAccountKey:
          type: string
          maxLength: 100
          title: Merchantaccountkey
          description: Merchant account key to filter by. Must be uppercase with no spaces.
          examples:
            - BANGO_US
        status:
          $ref: '#/components/schemas/ReportStatus'
          title: Status
          description: |-
            Entitlement status

            * `PENDING`
            * `ACTIVE`
            * `SUSPENDED`
            * `ACTIVE-ENDING`
            * `CANCELLED`
            * `REVOKED`
            * `FAILED`

            Cannot be used with `statuses`.
        statuses:
          items:
            $ref: '#/components/schemas/ReportStatus'
          type: array
          minItems: 1
          uniqueItems: true
          title: Statuses
          description: >-
            Entitlement statuses to filter by. Each value must be unique. Cannot
            be used with `status`.
          examples:
            - - ACTIVE
              - SUSPENDED
      type: object
      title: EntitlementReport
      description: |-
        Entitlement report (search) request.

        Provide either `customerIdentifier` or `sharedCustomerId`, but not both.
        `status` and `statuses` cannot be used together.
    EntitlementReportResponse:
      properties:
        responseCode:
          type: string
          title: Responsecode
          description: Result of the search request.
          examples:
            - OK
        responseMessage:
          type: string
          title: Responsemessage
          description: Response message of the search request.
          examples:
            - Success
        entitlements:
          items:
            $ref: '#/components/schemas/EntitlementRead'
          type: array
          title: Entitlements
          description: The entitlements matching the search criteria.
      type: object
      required:
        - responseCode
        - responseMessage
        - entitlements
      title: EntitlementReportResponse
      description: Entitlement report (search) response.
    ErrorResponse:
      properties:
        responseCode:
          type: string
          title: Responsecode
          description: >-
            Bango code that identifies the error, for example `BAD_REQUEST`,
            `NOT_AVAILABLE`, `NOT_FOUND`, `INVALID_STATE` or `INTERNAL_ERROR`.
            See the examples on each response for the codes that the operation
            can return.
          examples:
            - BAD_REQUEST
        responseMessage:
          type: string
          title: Responsemessage
          description: Description of the error
        metadata:
          $ref: '#/components/schemas/ErrorMetadata'
          title: Metadata
          description: Error Metadata
      type: object
      required:
        - responseCode
      title: ErrorResponse
      description: Error response for Entitlement API.
    ReportStatus:
      type: string
      enum:
        - PENDING
        - ACTIVE
        - SUSPENDED
        - ACTIVE-ENDING
        - CANCELLED
        - REVOKED
        - FAILED
      title: ReportStatus
      description: Entitlement status filter for a report search.
    EntitlementRead:
      properties:
        entitlementId:
          type: string
          format: uuid
          title: Entitlementid
          description: Unique identifier representing a specific entitlement.
        customerIdentifier:
          type: string
          title: Customeridentifier
          description: Unique, immutable user identifier
        sharedCustomerId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Sharedcustomerid
          description: >-
            Bango generated id shared between reseller and merchant for this
            customer (contact support for setup)
        bangoUserId:
          type: string
          title: Bangouserid
          description: Bango-generated customer identifier.
        merchantAccountKey:
          type: string
          title: Merchantaccountkey
          description: Unique identifier for the content provider
        productKey:
          type: string
          title: Productkey
          description: Unique identifier for the product/offer
        notificationUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Notificationurl
          description: >-
            The endpoint where Bango will send all notifications regarding this
            entitlement
        offerKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Offerkey
          description: Entitlement offer identifier
        externalEntitlementId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalentitlementid
          description: >-
            Unique identifier for the entitlement provided by the reseller. If
            the previous attempt to create an entitlement failed, this value can
            be reused.
        entitlementDisplayName:
          anyOf:
            - type: string
            - type: 'null'
          title: Entitlementdisplayname
          description: Entitlement display name used in reports.
        dateCreated:
          type: string
          format: date-time
          title: Datecreated
          description: Timestamp for the creation of the entitlement
        dateActivated:
          type: string
          format: date-time
          title: Dateactivated
          description: >-
            Timestamp provided by the content provider when the entitlement is
            activated
          default: '0001-01-01T00:00:00Z'
        dateEnded:
          type: string
          format: date-time
          title: Dateended
          description: Timestamp for when the entitlement terminated
          default: '0001-01-01T00:00:00Z'
        dateSuspended:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Datesuspended
          description: Timestamp for when the entitlement was suspended
        dateResumed:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Dateresumed
          description: Timestamp for when the entitlement was last resumed
        dateExpiry:
          type: string
          format: date-time
          title: Dateexpiry
          description: >-
            If set, Bango will schedule a termination request to the content
            provider on this date. Date format must be ISO 8601
          default: '0001-01-01T00:00:00Z'
        dateFailed:
          type: string
          format: date-time
          title: Datefailed
          description: Date when the creation of the entitlement failed
          default: '0001-01-01T00:00:00Z'
        dateAutoSuspend:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Dateautosuspend
          description: >-
            If set, Bango will schedule a suspension request to the content
            provider on this date. Date format must be ISO 8601
        responseCode:
          type: string
          title: Responsecode
          description: Result of entitlement operation. `OK` on success.
          examples:
            - OK
        responseMessage:
          type: string
          title: Responsemessage
          description: >-
            Response message of entitlement operation. `Success` if completed
            successfully.
          examples:
            - Success
        status:
          $ref: '#/components/schemas/EntitlementStatus'
          description: >
            The entitlement status. Possible values are:

            * PENDING: The entitlement has been initiated, but the user has not
            yet completed the activation process.

            * ACTIVE: The entitlement has been successfully activated

            * SUSPENDED: The entitlement has been suspended.

            * ACTIVE-ENDING: The entitlement is ending at the end of the current
            period.

            * CANCELLED: The entitlement has been cancelled.

            * REVOKED: The entitlement has been revoked.

            * FAILED: The entitlement could not be created.
        activationCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Activationcode
          description: Code or token used for the entitlement activation
        extensionData:
          additionalProperties:
            type: string
            maxLength: 250
          type: object
          title: Extensiondata
          description: Custom key value pairs
        extraInformation:
          $ref: '#/components/schemas/ExtraInformation'
          title: Extrainformation
        financeData:
          $ref: '#/components/schemas/FinanceData'
          title: Financedata
          description: Finance Data.
      type: object
      required:
        - entitlementId
        - customerIdentifier
        - bangoUserId
        - merchantAccountKey
        - productKey
        - entitlementDisplayName
        - dateCreated
        - responseCode
        - responseMessage
        - status
      title: EntitlementRead
      description: Entitlement.
    ErrorMetadata:
      properties:
        responseMessageFrom:
          $ref: '#/components/schemas/ErrorOriginator'
          description: |
            The originator of the error (either Bango or the content provider)

            * `BANGO`
            * `MERCHANT`
      type: object
      required:
        - responseMessageFrom
      title: ErrorMetadata
      description: Error metadata.
    EntitlementStatus:
      type: string
      enum:
        - PENDING
        - ACTIVE
        - SUSPENDED
        - ACTIVE-ENDING
        - CANCELLED
        - REVOKED
        - FAILED
      title: EntitlementStatus
      description: Entitlement status.
    ExtraInformation:
      properties:
        communicationInformation:
          $ref: '#/components/schemas/CommunicationInformation'
          title: Communicationinformation
        clientDevice:
          $ref: '#/components/schemas/ClientDevice'
          title: Clientdevice
          description: Client device information.
        source:
          $ref: '#/components/schemas/Source'
          description: Entitlement creation / activation source.
      type: object
      title: ExtraInformation
      description: Entitlement extra information.
    FinanceData:
      properties:
        source:
          type: string
          title: Source
          description: 'The source of the finance event. Suggested values: `Merchant`.'
          examples:
            - Merchant
        type:
          type: string
          title: Type
          description: >-
            The type of finance event. Suggested values: `order`, `return`,
            `renew`.
          examples:
            - order
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: UTC ISO 8601
        retailCurrency:
          type: string
          title: Retailcurrency
          description: ISO 3
        retailPrice:
          type: number
          title: Retailprice
          description: As per standard price element, including tax
        retailPriceTax:
          type: number
          title: Retailpricetax
          description: As per standard price element, tax included in the retailPrice
        offerPrice:
          type: number
          title: Offerprice
          description: As per standard price element, including tax
        offerPriceTax:
          type: number
          title: Offerpricetax
          description: As per standard price element, tax included in the offerPrice
        notes:
          type: string
          maxLength: 255
          title: Notes
          description: Free text field, max 255 characters
      type: object
      required:
        - source
        - type
        - timestamp
      title: FinanceData
      description: Finance data.
    ErrorOriginator:
      type: string
      enum:
        - BANGO
        - MERCHANT
      title: ErrorOriginator
      description: Error originator.
    CommunicationInformation:
      properties:
        msisdn:
          anyOf:
            - type: string
            - type: 'null'
          title: Msisdn
          description: >-
            A mobile phone number that can be used to contact the consumer, with
            international prefix
        emailAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Emailaddress
          description: An email address that can be used to contact the consumer.
      type: object
      title: CommunicationInformation
      description: Communication information.
    ClientDevice:
      properties:
        type:
          $ref: '#/components/schemas/DeviceType'
          description: >
            The type of device. This field is mandatory if clientDevice is being
            provided.


            * `STB`

            * `MOBILE`

            * `DESKTOP`

            * `TABLET`
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: The unique id of the device
        typeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Typeid
          description: The common id for the type of device
        modelName:
          anyOf:
            - type: string
            - type: 'null'
          title: Modelname
          description: The model name of the device
        modelNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Modelnumber
          description: The model number of the device
        serialNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Serialnumber
          description: The serial number of the device
        osType:
          anyOf:
            - type: string
            - type: 'null'
          title: Ostype
          description: The operating system of the device
        osVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Osversion
          description: The version of the operating system of the device
        macAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Macaddress
          description: The MAC address of the device
        browser:
          anyOf:
            - type: string
            - type: 'null'
          title: Browser
          description: The browser being used
      type: object
      required:
        - type
      title: ClientDevice
      description: Client device.
    Source:
      properties:
        channelType:
          $ref: '#/components/schemas/ChannelType'
          title: Channeltype
          description: |
            The channel the customer used to get the offer. Allowed values:

            * `Retail`
            * `SMS`
            * `App`
            * `Website`
            * `Email`
            * `Call Centre`
            * `Mobile`
            * `Set Top Box`
            * `Other`
        campaignRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaignref
          description: The reference of the campaign that attracted the customer
        referrer:
          anyOf:
            - type: string
            - type: 'null'
          title: Referrer
          description: The origin of the customer's request
        bundleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Bundleid
          description: Identifies the bundle the entitlement is part of
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: The customer's country
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
          description: The customer's regional area or code
        brand:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand
          description: The brand
      type: object
      title: Source
      description: Entitlement source.
    DeviceType:
      type: string
      enum:
        - STB
        - MOBILE
        - DESKTOP
        - TABLET
      title: DeviceType
      description: Client device type.
    ChannelType:
      type: string
      enum:
        - Retail
        - SMS
        - App
        - Website
        - Email
        - Call Centre
        - Mobile
        - Set Top Box
        - Other
      title: ChannelType
      description: The channel the customer used to get the offer.
  securitySchemes:
    XApiKey:
      type: apiKey
      in: header
      name: x-api-key
    BasicAuth:
      type: http
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        Bango uses
        https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/.
        Please note that when requesting a token, we only support the option to
        send the client secret in the request body. The token URL is for
        production. In the sandbox, use the sandbox authentication service at
        https://sandbox.auth.bango.com.
      flows:
        clientCredentials:
          scopes:
            any: >-
              grants Bango access to the merchant system based on merchant
              defined rules
          tokenUrl: https://auth.bango.com/oauth2/token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.