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

# Service Provisioning Callbacks for Batch Request

> Callbacks allow a OTT service provider system to know about MarketONE service provisioning events as they occur. You can provide a callback URL and when those events happen, MarketONE will immediately generate an HTTPS POST request with a JSON payload. MarketONE callback actions are intended to be actionable on their own. As such they will include the full related object(s) in JSON format.



## OpenAPI

````yaml /marketONE/MarketONEOTTServiceCallbacks.yaml post /add-multiple-subscriptions-callback-url
openapi: 3.0.1
info:
  title: MarketONE OTT Service Callbacks
  description: Callback API's
  termsOfService: urn:tos
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: Released
servers:
  - url: /
security:
  - ApiKeyAuth: []
tags:
  - name: MarketONE
paths:
  /add-multiple-subscriptions-callback-url:
    post:
      tags:
        - Add MultipleSubscriptions callback
      summary: Service Provisioning Callbacks for Batch Request
      description: >-
        Callbacks allow a OTT service provider system to know about MarketONE
        service provisioning events as they occur. You can provide a callback
        URL and when those events happen, MarketONE will immediately generate an
        HTTPS POST request with a JSON payload. MarketONE callback actions are
        intended to be actionable on their own. As such they will include the
        full related object(s) in JSON format.
      operationId: callbackV1MultipleAdd
      parameters:
        - name: X-B3-TraceId
          in: header
          description: >-
            The TraceId indicates the overall ID of the trace. Every span in a
            trace shares this ID. The X-B3-TraceId header is encoded as 32 or 16
            lower-hex characters. For example, a 128-bit TraceId header might
            look like 463ac35c9f6413ad48485a3953bb6124.
          required: false
          schema:
            type: string
        - name: X-B3-SpanId
          in: header
          description: >-
            The SpanId is 64-bit in length and indicates the position of the
            current operation in the trace tree. The value should not be
            interpreted; it may or may not be derived from the value of the
            TraceId. The X-B3-SpanId header is encoded as 16 lower-hex
            characters. For example, a SpanId header might look like
            a2fb4a1d1a96d312. Unless propagating only the Sampling State, the
            X-B3-SpanId header is required.
          required: false
          schema:
            type: string
        - name: X-B3-ParentSpanId
          in: header
          description: >-
            The ParentSpanId is 64-bit in length and indicates the position of
            the parent operation in the trace tree. When the span is the root of
            the trace tree, there is no ParentSpanId. The X-B3-ParentSpanId
            header may be present on a child span and must be absent on the root
            span. It is encoded as 16 lower-hex characters. For example, a
            ParentSpanId header might look like 0020000000000001.
          required: false
          schema:
            type: string
      requestBody:
        description: >-
          A Callback Request will contain an "action" parameter. Action
          Parameter can be "AddMultipleSubscriptions",
          "DeleteMultipleSubscriptions", "UpdateMultipleSubscriptions". Please
          note that callbacks must be idempotent; e.g "AddMultipleSubscriptions"
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Add_multiple_subscriptions_callback_URL_body
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_5'
        '202':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_202'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/403Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/409Error'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/429Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500Error'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/503Error'
components:
  schemas:
    Add_multiple_subscriptions_callback_URL_body:
      required:
        - organizationCode
        - partnerSubscriptions
        - subscriptionId
      type: object
      properties:
        action:
          type: string
          enum:
            - AddMultipleSubscriptions
        subscriptionId:
          maxLength: 128
          type: string
          description: >-
            The id of a MarketONE subscription.Will be sent in the request call
            for "AddMultipleSubscriptions"
        organizationCode:
          maxLength: 128
          type: string
          description: The organization code for the aggregator
        partnerSubscriptions:
          type: array
          items:
            $ref: >-
              #/components/schemas/Add_multiple_subscriptions_callback_URL_partnerSubscriptions
    inline_response_200_5:
      required:
        - partnerSubscriptions
        - subscriptionId
      type: object
      properties:
        subscriptionId:
          maxLength: 128
          type: string
          description: The id of a MarketONE subscription.
        partnerSubscriptions:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_200_5_partnerSubscriptions'
    inline_response_202:
      required:
        - partnerSubscriptions
        - subscriptionId
      type: object
      properties:
        subscriptionId:
          maxLength: 128
          type: string
          description: The id of a MarketONE subscription.
        partnerSubscriptions:
          type: array
          items:
            $ref: '#/components/schemas/inline_response_202_partnerSubscriptions'
    400Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid-request
        message:
          type: string
        validationErrors:
          type: array
          items:
            $ref: '#/components/schemas/400ValError'
      description: The 400 Error object contains information about the error.
    401Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - authorization-failure
        message:
          type: string
      description: The 401 Error object contains information about the error.
    403Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - forbidden
        message:
          type: string
      description: The 403 Error object contains information about the error.
    404Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - not-found
        message:
          type: string
    409Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - input-conflict
        message:
          type: string
    429Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - too-many-requests
        message:
          type: string
    500Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - system-error
        message:
          type: string
      description: The 500 Error object contains information about the error.
    503Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - service-unavailable
        message:
          type: string
      description: The 500 Error object contains information about the error.
    Add_multiple_subscriptions_callback_URL_partnerSubscriptions:
      required:
        - partnerSubscriptionId
        - productCode
      type: object
      properties:
        partnerSubscriptionId:
          maxLength: 256
          type: string
          description: The unique identifier for the provisioning record
        partnerCustomerId:
          maxLength: 256
          type: string
          description: The unique identifier for the partner customer account
        productCode:
          maxLength: 128
          type: string
          description: >-
            The code of the OTT service provider product subscribed by the
            customer as defined by the OTT service provider in MarketONE for
            which there is an MarketONE agreement in place. This parameter is
            required in the "UpdateSubscription" and "AddSubscription" cases
            while creating, upgrading or downgrading to a different service as
            the new product code.
        registrationString:
          type: string
          description: >-
            This is information that can be used by the OTT service provider to
            associate this subscription with a user. This can be an access code,
            access token or redemption code. This parameter is applicable only
            to the "AddSubscription" callback.
        redemptionCodeExpirationTime:
          type: string
          description: >-
            (Optional) The time at which the redemption code (registration
            string) expires (ISO 8601).
          format: datetime
        startDate:
          type: string
          description: (Optional) The start date of the subscription (ISO 8601).
          format: datetime
        quantity:
          type: integer
          description: (Optional) the unit quanity for the subscription
        metadata:
          allOf:
            - $ref: '#/components/schemas/METADATA'
    inline_response_200_5_partnerSubscriptions:
      required:
        - partnerSubscriptionId
      type: object
      properties:
        partnerSubscriptionId:
          maxLength: 256
          type: string
          description: The unique identifier for the provisioning record
        partnerCustomerId:
          maxLength: 256
          type: string
          description: The unique identifier for the provisioning record
        externalPartnerSubscriptionId:
          maxLength: 256
          type: string
          description: >-
            The OTT service provider id that uniquely identitifes the OTT
            service  entitlements and it is associated to this MarketONE
            subscriptionId.
        registrationStatus:
          type: string
          description: The provisioning status of each partner subscription product/item.
          enum:
            - UNPROVISIONED
            - ACTIVE
            - INACTIVE
        registrationState:
          type: string
          description: The provisioning state of each partner subscription product/item.
          enum:
            - PROVISION-PENDING
            - PROVISION-COMPLETE
            - PROVISION-FAILED
        startDate:
          maxLength: 256
          type: string
          description: >-
            This is information that can be used by the OTT service provider to
            associate this subscription with a user. This can be an access code,
            access token or redemption code. This parameter is applicable only
            to the "AddSubscription" callback.
        endDate:
          type: string
          description: >-
            (Optional) The time at which the redemption code (registration
            string) expires (ISO 8601).
          format: datetime
    inline_response_202_partnerSubscriptions:
      required:
        - partnerSubscriptionId
      type: object
      properties:
        partnerSubscriptionId:
          maxLength: 128
          type: string
          description: The unique identifier for the provisioning record
        externalPartnerSubscriptionId:
          maxLength: 256
          type: string
          description: >-
            The OTT service provider id that uniquely identitifes the OTT
            service  entitlements and it is associated to this MarketONE
            subscriptionId.
        registrationStatus:
          type: string
          description: The provisioning status of each partner subscription product/item.
          enum:
            - UNPROVISIONED
            - ACTIVE
            - INACTIVE
        registrationState:
          type: string
          description: The provisioning state of each partner subscription product/item.
          enum:
            - PROVISION-IN-PROGRESS
            - PROVISION-COMPLETE
            - PROVISION-FAILED
        startDate:
          maxLength: 256
          type: string
          description: >-
            This is information that can be used by the OTT service provider to
            associate this subscription with a user. This can be an access code,
            access token or redemption code. This parameter is applicable only
            to the "AddSubscription" callback.
        endDate:
          type: string
          description: >-
            (Optional) The time at which the redemption code (registration
            string) expires (ISO 8601).
          format: datetime
    400ValError:
      required:
        - code
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    METADATA:
      type: object
      additionalProperties:
        type: string
        properties:
          key:
            type: string
          value:
            type: string
      description: >-
        A set of key/value pairs that you can attach to an object. Useful for
        storing additional information.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        The authorization key obtained from the OTT service provider for a given
        CSP organization.
      name: X-API-KEY
      in: header

````

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