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

# Request Activation Info

> Request activation information for an entitlement in a `PENDING` status.

This endpoint is used for new requests as well as refresh requests for expired
activation information.



## OpenAPI

````yaml /openapi/current/dvm/reseller-to-dvm/entitlement/openapi.json post /v1/entitlement/activationInfo/{entitlementId}
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/activationInfo/{entitlementId}:
    post:
      tags:
        - Entitlements
      summary: Request Activation Info
      description: >-
        Request activation information for an entitlement in a `PENDING` status.


        This endpoint is used for new requests as well as refresh requests for
        expired

        activation information.
      operationId: >-
        Request_activation_info_v1_entitlement_activationInfo__entitlementId__post
      parameters:
        - name: entitlementId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The Bango entitlementId generated when the entitlement is created
            title: Entitlementid
          description: The Bango entitlementId generated when the entitlement is created
        - 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:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivationInfo'
            examples:
              Extended request:
                value:
                  options:
                    - SHORT_LIVED_TOKEN
      responses:
        '200':
          description: Activation information returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivationInfoResponse'
              examples:
                activation url:
                  value:
                    entitlementId: a25100b8-4e0c-4e37-b921-cac9cb1e930f
                    responseCode: CLIENT_ACTION_REQUIRED
                    responseMessage: An action is required to be performed by the client.
                    parameters:
                      action: NAVIGATE_TO_URL
                      url: >-
                        https://example.com/?entitlementId=a25100b8-4e0c-4e37-b921-cac9cb1e930f
                      urlExpiry: '2024-12-01T00:00:00Z'
                activation code:
                  value:
                    entitlementId: a25100b8-4e0c-4e37-b921-cac9cb1e930f
                    responseCode: CLIENT_ACTION_REQUIRED
                    responseMessage: An action is required to be performed by the client.
                    activationCode: STB45454
          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: the state of the entitlement, or an idempotent request in
            progress
          content:
            application/json:
              examples:
                Already active:
                  value:
                    responseCode: ALREADY_ACTIVE
                    responseMessage: Entitlement is already active.
                    metadata:
                      responseMessageFrom: BANGO
                Invalid status:
                  value:
                    responseCode: INVALID_STATUS
                    responseMessage: Entitlement is not in a pending status.
                    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:
    ActivationInfo:
      properties:
        options:
          items:
            $ref: '#/components/schemas/ActivationOption'
          type: array
          title: Options
          description: >
            Optional properties for the type of activation token being
            requested.


            * `SHORT_LIVED_TOKEN`

            * `LONG_LIVED_TOKEN`
      type: object
      title: ActivationInfo
      description: Activation info request.
    ActivationInfoResponse:
      properties:
        entitlementId:
          type: string
          title: Entitlementid
          description: Unique identifier representing a specific entitlement.
        responseCode:
          type: string
          title: Responsecode
          description: Result of the activation info request.
          examples:
            - CLIENT_ACTION_REQUIRED
        responseMessage:
          type: string
          title: Responsemessage
          description: Response message of the activation info request.
          examples:
            - An action is required to be performed by the client.
        activationCode:
          type: string
          title: Activationcode
          description: >-
            The activation response will normally be a url. However, this field
            is returned instead of the parameters block if the content provider
            supports activation codes rather than urls
        parameters:
          $ref: '#/components/schemas/ActivationInfoParameters'
          title: Parameters
          description: >-
            Activation parameters returned when the content provider uses an
            activation url.
      type: object
      required:
        - entitlementId
        - responseCode
        - responseMessage
      title: ActivationInfoResponse
      description: Activation info 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.
    ActivationOption:
      type: string
      enum:
        - SHORT_LIVED_TOKEN
        - LONG_LIVED_TOKEN
      title: ActivationOption
      description: Activation token option.
    ActivationInfoParameters:
      properties:
        action:
          $ref: '#/components/schemas/ActivationInfoAction'
          title: Action
          description: The action the reseller should take next
        url:
          type: string
          title: Url
          description: >-
            The url that the reseller must redirect the user to when the
            `NAVIGATE_TO_URL` action is provided
        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
      title: ActivationInfoParameters
      description: Activation info response parameters.
    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.
    ActivationInfoAction:
      type: string
      enum:
        - NAVIGATE_TO_URL
      title: ActivationInfoAction
      description: Activation action.
    ErrorOriginator:
      type: string
      enum:
        - BANGO
        - MERCHANT
      title: ErrorOriginator
      description: Error originator.
  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.