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

# Create An Entitlement

> Create an entitlement.



## OpenAPI

````yaml /openapi/current/dvm/reseller-to-dvm/entitlement/openapi.json post /v1/entitlement
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:
    post:
      tags:
        - Entitlements
      summary: Create An Entitlement
      description: Create an entitlement.
      operationId: Create_an_entitlement_v1_entitlement_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
        - name: X-Request-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Unique request id generated by the reseller. Useful for e2e
              trouble-shooting. While listed as an optional header, some content
              providers consider this to be mandatory.
            title: X-Request-Id
          description: >-
            Unique request id generated by the reseller. Useful for e2e
            trouble-shooting. While listed as an optional header, some content
            providers consider this to be mandatory.
        - name: X-Operation-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Reseller-generated unique id per operation. Used by some content
              providers to identify an idempotent retry. While listed as an
              optional header, some content providers consider this to be
              mandatory.
            title: X-Operation-Id
          description: >-
            Reseller-generated unique id per operation. Used by some content
            providers to identify an idempotent retry. While listed as an
            optional header, some content providers consider this to be
            mandatory.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntitlementCreate'
            examples:
              Base request:
                value:
                  customerIdentifier: '123456789'
                  merchantAccountKey: BANGO_US
                  productKey: MUSIC
                  notificationUrl: https://notifications.bango.com
              Extended request:
                value:
                  customerIdentifier: '123456789'
                  merchantAccountKey: BANGO_US
                  productKey: MUSIC
                  notificationUrl: https://notifications.bango.com
                  entitlementDisplayName: 30 day free trial for Bango Music
                  offerKey: BUNDLE_X
                  externalEntitlementId: 124130d2-2cbc-45a1-ab9b-dfa8b67a2e63
                  dateExpiry: '2024-12-05T07:46:52Z'
                  dateAutoSuspend: '2024-09-05T07:46:52Z'
                  extensionData:
                    customField1: value1
                    customField2: value2
                  extraInformation:
                    communicationInformation:
                      emailAddress: example@bango.com
                      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: Chrome
                    source:
                      channelType: Retail
                      campaignRef: SUMMER_PROMO
                      referrer: SEARCH_ENGINE
                      bundleId: BundleABC123
                      country: United Kingdom
                      region: CB1 3ED
                      brand: BrandA
      responses:
        '200':
          description: Entitlement created and activated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntitlementCreateRead'
              examples:
                OK:
                  value:
                    entitlementId: a25100b8-4e0c-4e37-b921-cac9cb1e930f
                    customerIdentifier: '123456789'
                    sharedCustomerId: 414b3019-0c28-4d14-9c5f-6217b8bd1e3e
                    bangoUserId: '2147483647'
                    merchantAccountKey: BANGO_US
                    productKey: MUSIC
                    entitlementDisplayName: 30 day free trial for Bango Music
                    dateCreated: '2024-06-22T17:35:38.92Z'
                    dateActivated: '0001-01-01T00:00:00Z'
                    dateEnded: '0001-01-01T00:00:00Z'
                    dateExpiry: '0001-01-01T00:00:00Z'
                    dateAutoSuspend: '0001-01-01T00:00:00Z'
                    responseCode: OK
                    responseMessage: Success
                    status: ACTIVE
                    externalEntitlementId: 124130d2-2cbc-45a1-ab9b-dfa8b67a2e63
                    extensionData:
                      customField1: value1
                      customField2: value2
                    extraInformation:
                      communicationInformation:
                        emailAddress: example@bango.com
                        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: Chrome
                      source:
                        channelType: Retail
                        campaignRef: SUMMER_PROMO
                        referrer: SEARCH_ENGINE
                        bundleId: BundleABC123
                        country: United Kingdom
                        region: CB1 3ED
                        brand: BrandA
          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
        '201':
          description: Entitlement created
          content:
            application/json:
              examples:
                Created:
                  value:
                    entitlementId: a25100b8-4e0c-4e37-b921-cac9cb1e930f
                    customerIdentifier: '123456789'
                    sharedCustomerId: 414b3019-0c28-4d14-9c5f-6217b8bd1e3e
                    bangoUserId: '2147483647'
                    merchantAccountKey: BANGO_US
                    productKey: MUSIC
                    entitlementDisplayName: 30 day free trial for Bango Music
                    dateCreated: '2024-06-22T17:35:38.92Z'
                    dateActivated: '0001-01-01T00:00:00Z'
                    dateEnded: '0001-01-01T00:00:00Z'
                    dateExpiry: '0001-01-01T00:00:00Z'
                    dateAutoSuspend: '0001-01-01T00:00:00Z'
                    responseCode: CREATED
                    responseMessage: Entitlement Created
                    status: PENDING
                    externalEntitlementId: 124130d2-2cbc-45a1-ab9b-dfa8b67a2e63
                    extensionData:
                      customField1: value1
                      customField2: value2
                    extraInformation:
                      communicationInformation:
                        emailAddress: example@bango.com
                        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: Chrome
                      source:
                        channelType: Retail
                        campaignRef: SUMMER_PROMO
                        referrer: SEARCH_ENGINE
                        bundleId: BundleABC123
                        country: United Kingdom
                        region: CB1 3ED
                        brand: BrandA
              schema:
                $ref: '#/components/schemas/EntitlementCreateRead'
          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
        '202':
          description: Entitlement created successfully, action required to activate
          content:
            application/json:
              examples:
                ClientActionRequired:
                  value:
                    entitlementId: a25100b8-4e0c-4e37-b921-cac9cb1e930f
                    customerIdentifier: '123456789'
                    sharedCustomerId: 414b3019-0c28-4d14-9c5f-6217b8bd1e3e
                    bangoUserId: '2147483647'
                    merchantAccountKey: BANGO_US
                    productKey: MUSIC
                    entitlementDisplayName: 30 day free trial for Bango Music
                    dateCreated: '2024-06-22T17:35:38.92Z'
                    dateActivated: '0001-01-01T00:00:00Z'
                    dateEnded: '0001-01-01T00:00:00Z'
                    dateExpiry: '0001-01-01T00:00:00Z'
                    dateAutoSuspend: '0001-01-01T00:00:00Z'
                    responseCode: CLIENT_ACTION_REQUIRED
                    responseMessage: An action is required to be performed by the client.
                    status: PENDING
                    externalEntitlementId: 124130d2-2cbc-45a1-ab9b-dfa8b67a2e63
                    extensionData:
                      customField1: value1
                      customField2: value2
                    extraInformation:
                      communicationInformation:
                        emailAddress: example@bango.com
                        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: Chrome
                      source:
                        channelType: Retail
                        campaignRef: SUMMER_PROMO
                        referrer: SEARCH_ENGINE
                        bundleId: BundleABC123
                        country: United Kingdom
                        region: CB1 3ED
                        brand: BrandA
                    parameters:
                      Action: NAVIGATE_TO_URL
                      Url: https://example.activation.url.bango.com
                      urlExpiry: '2024-12-01T00:00:00Z'
              schema:
                $ref: '#/components/schemas/EntitlementCreateRead'
          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
                Maximum entitlements for user:
                  value:
                    responseCode: BAD_REQUEST
                    responseMessage: Maximum number of entitlements for user reached.
                    metadata:
                      responseMessageFrom: BANGO
                Invalid notificationUrl:
                  value:
                    responseCode: BAD_REQUEST
                    responseMessage: NotificationUrl must be a valid URL.
                notificationUrl too long:
                  value:
                    responseCode: BAD_REQUEST
                    responseMessage: >-
                      NotificationUrl must be at maximum 2000 characters in
                      length.
                externalEntitlementId too long:
                  value:
                    responseCode: BAD_REQUEST
                    responseMessage: >-
                      ExternalEntitlementId must be at maximum 255 characters in
                      length.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid credentials (no response body returned)
        '403':
          description: No active entitlement route found
          content:
            application/json:
              examples:
                Not available:
                  value:
                    responseCode: NOT_AVAILABLE
                    responseMessage: No active entitlement routes found.
                    metadata:
                      responseMessageFrom: BANGO
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '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: the state of the entitlement, or an idempotent request in
            progress
          content:
            application/json:
              examples:
                Conflict:
                  value:
                    responseCode: ALREADY_EXISTS
                    responseMessage: Entitlement already exists.
                    metadata:
                      responseMessageFrom: BANGO
                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:
    EntitlementCreate:
      properties:
        customerIdentifier:
          type: string
          maxLength: 400
          title: Customeridentifier
          description: Unique, immutable user identifier
        merchantAccountKey:
          type: string
          maxLength: 100
          title: Merchantaccountkey
          description: >-
            Unique identifier for the content provider. Must be uppercase and
            must not contain spaces.
        productKey:
          type: string
          maxLength: 255
          title: Productkey
          description: Unique identifier for the product/offer
        notificationUrl:
          type: string
          maxLength: 2000
          title: Notificationurl
          description: >-
            The endpoint where Bango will send all notifications regarding this
            entitlement. If provided, it must be a valid URL.
        offerKey:
          type: string
          title: Offerkey
          description: Entitlement offer identifier
        externalEntitlementId:
          type: string
          maxLength: 255
          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:
          type: string
          title: Entitlementdisplayname
          description: Entitlement display name, seen in reports.
        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
        dateAutoSuspend:
          type: string
          format: date-time
          title: Dateautosuspend
          description: >-
            If set, Bango will schedule a suspension request to the content
            provider on this date. Date format must be ISO 8601
        extensionData:
          additionalProperties:
            type: string
            maxLength: 250
          type: object
          title: Extensiondata
          description: Custom key value pairs
        extraInformation:
          $ref: '#/components/schemas/ExtraInformation'
          title: Extrainformation
      type: object
      required:
        - customerIdentifier
        - merchantAccountKey
        - productKey
      title: EntitlementCreate
      description: Entitlement create request.
    EntitlementCreateRead:
      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.
        parameters:
          $ref: '#/components/schemas/Parameters'
          description: >-
            Information needed for entitlement activation. Present only if
            status is `PENDING`.
      type: object
      required:
        - entitlementId
        - customerIdentifier
        - bangoUserId
        - merchantAccountKey
        - productKey
        - entitlementDisplayName
        - dateCreated
        - responseCode
        - responseMessage
        - status
      title: EntitlementCreateRead
      description: |-
        Entitlement returned by the create operation.

        The create response returns activation `parameters` in PascalCase
        (`Action` / `Url` / `urlExpiry`). Present only while the entitlement is
        pending activation.
    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.
    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.
    EntitlementStatus:
      type: string
      enum:
        - PENDING
        - ACTIVE
        - SUSPENDED
        - ACTIVE-ENDING
        - CANCELLED
        - REVOKED
        - FAILED
      title: EntitlementStatus
      description: Entitlement status.
    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.
    Parameters:
      properties:
        Action:
          $ref: '#/components/schemas/Action'
          description: >-
            The action the reseller should take next


            * NAVIGATE_TO_URL: redirect to the URL provided in the `Url`
            parameter.
        Url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: >-
            The activation url provided by the content provider. Redirect the
            customer to this link to continue the activation process.
        urlExpiry:
          type: string
          format: date-time
          title: Urlexpiry
          description: >-
            Timestamp for when the activation information will expire (if
            provided by the content provider). Date is in UTC ISO 8601 format.
      type: object
      required:
        - Action
      title: Parameters
      description: >-
        Activation parameters returned by the create entitlement response
        (PascalCase).


        `Action` and `Url` use PascalCase. `urlExpiry` (camelCase) is optional
        and

        only populated when the create response is produced via the
        activation-info

        flow (the 202 "client action required" case); it is absent on a plain

        200/201 create.
    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.
    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.
    Action:
      type: string
      enum:
        - NAVIGATE_TO_URL
      title: Action
      description: Activation actions.
    ErrorOriginator:
      type: string
      enum:
        - BANGO
        - MERCHANT
      title: ErrorOriginator
      description: Error originator.
    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.