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

# Validate (approve or reject) merchant initiated entitlement update.



## OpenAPI

````yaml /marketONE/MarketONECSPAdapter.yaml post /v1/entitlement/{id}/update/validate
openapi: 3.0.1
info:
  title: MarketONE Reseller Adapter API
  description: >
    # Introduction

    The MarketONE Reseller (CSP) Adapter OpenAPIs are essential interfaces for
    Resellers (Service Providers) to implement for integration with MarketONE.
    Reseller developers can use the provided specifications to build APIs that
    interact with MarketONE. Reseller developers are responsible for writing the
    code to handle requests and responses and ensuring their implementation
    adheres to the specifications.


    Unlike traditional APIs, these APIs are not called by Resellers. Instead,
    MarketONE invokes them to perform operations such as triggering customer
    notifications or subscription lifecycle events. 


    While these APIs offer comprehensive resources for development, they do not
    encompass every possible API call. For information about APIs Resellers can
    call, see the [MarketONE
    OpenAPIs](https://docs.saas.amdocs.com/bundle/MarketONEAPIs/page/index.html).


    For a list of all the APIs Resellers can build and call, see the [API
    Reference for
    Resellers](https://docs.saas.amdocs.com/bundle/b_aggregatorAPIGuide/page/topics/serviceProviderAPIs_r.html). 


    # HTTP Methods


    The MarketONE Reseller (CSP) Adapter OpenAPIs support the following HTTP
    methods:

    | Method | Description |

    | ----------  | ------------------ |

    | GET  | Retrieve resources (as a list or single record fetch) |

    | POST  | Create new resources or update existing ones (overloading during
    create/update is permitted where specified) |


    # Example Request and Response


    ```

    POST /v2/notification/

    Content-Type: application/json

    X-API-KEY: {Insert API KEY here}

    {
      "type": "partnerSubscriptionAdded",
      "parameters": [
        {
          "key": "redemptionUrl",
          "value": "http://www.acme.com/redeem"
        }
      ]
    }


    HTTP/1.1 200 OK

    ```


    # Status Codes

    MarketONE uses the following HTTP response codes to indicate the success or
    failure of an API request.


    | Code | Status | Description |

    | --------  | ------ | ------------------- |

    | **200** | OK | Everything worked as expected. |

    | **201** | OK | Everything worked as expected. |

    | **400** | Bad Request | The request was unacceptable, often due to missing
    a required parameter. Other possibilities include: <ul><li>A parameter
    doesn't fit the data type</li><li>A parameter is outside the maximum or
    minimum boundaries of what can be accepted.</li> |

    | **401** | Unauthorized | Couldn’t authenticate your request. This could be
    due to a wrong or invalid API key. |

    | **403** | Forbidden | Authentication failed. Check your username and
    password. |

    | **404** | Not Found | The requested resource doesn’t exist. |

    | **409** | Conflict | |

    | **429** | Too Many Requests | Too many requests were made to the API too
    quickly. |

    | **500** | Internal Server Error  | |

    | **501** | Not Implemented | |

    | **503** | Service Unavailable | We’re temporarily offline for maintenance.
    Please try again later. |


    # Authentication


    An API key is required for MarketONE to make requests to the MarketONE
    Reseller (CSP) Adapter OpenAPIs. Resellers (Service Providers) need to
    generate an API key using their system and provide the API key during
    [gateway
    configuration](https://docs.saas.amdocs.com/bundle/b_userGuideForResellers/page/topics/gateway_c.html)
    and [webhook
    registration](https://docs.saas.amdocs.com/bundle/b_userGuideForResellers/page/topics/webhooksAbout_c.html)
    in Partner Ecosystem Management. As an alternative, Resellers can
    authenticate using a username and password (basic auth) or OAuth2. 


    # Errors


    All error responses will return an error object.


    ## Attributes


    | Name | Type | Required/Optional | Description |

    | -------  | ------ | ------ | ------ |

    | **code** | string | required | The error type, such as
    \"authentication-required\" (401) or \"not-found\" (404). |

    | **message** | string | required | A human-readable message providing more
    detailed information about the error. |

    | **validationErrors** | object | optional | An array of validation errors
    with **code** and **message** attributes provided. |


    # Tracing Headers


    The following tracing headers can be used for all APIs:


    - **X-B3-TraceId**: 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.


    - **X-B3-SpanId**: 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.


    - **X-B3-ParentSpanId**: 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.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: Released
servers:
  - url: /
security:
  - CSPApiKeyAuth: []
paths:
  /v1/entitlement/{id}/update/validate:
    post:
      tags:
        - Subscription update validation
      summary: Validate (approve or reject) merchant initiated entitlement update.
      operationId: partnerSubscriptionUpdateValidation
      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
          style: simple
          explode: 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
          style: simple
          explode: 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
          style: simple
          explode: false
          schema:
            type: string
        - name: id
          in: path
          description: The partner subscription id which is being updated.
          required: true
          style: simple
          explode: false
          schema:
            maxLength: 36
            type: string
      requestBody:
        description: Partner subscription update validation request
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PartnerSubscriptionUpdateValidateRequestNew'
        required: true
      responses:
        '200':
          description: Validated Entitlement Update
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PartnerSubscriptionUpdateValidateResponseNew
        '400':
          description: Invalid 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'
        '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: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500Error'
components:
  schemas:
    PartnerSubscriptionUpdateValidateRequestNew:
      required:
        - dateOfChange
        - newProductCode
        - partnerCode
      type: object
      properties:
        newProductCode:
          maxLength: 128
          type: string
          description: New product code that is being changed.
        dateOfChange:
          maxLength: 36
          type: string
          description: Date the product change will take effect.
          format: datetime
        partnerCode:
          maxLength: 36
          type: string
          description: Code for the partner who owns this subscription.
    PartnerSubscriptionUpdateValidateResponseNew:
      required:
        - changeStatus
      type: object
      properties:
        changeStatus:
          maxLength: 36
          type: string
          description: Account update status - Approved or not by CSP.
          enum:
            - Approved
            - Declined
        declineReason:
          maxLength: 128
          type: string
          description: Decline reason if applicable.
          enum:
            - CustomerNotEligible
            - PaymentInstrumentFailure
            - UserActionNeededPayment
            - UserActionNeededConfirmation
            - Other
      example:
        changeStatus: Declined
        declineReason: CustomerNotEligible
    400Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid-request
        message:
          type: string
        validationErrors:
          type: array
          items:
            $ref: '#/components/schemas/400ValError'
    401Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - authentication-required
            - invalid-api-key
            - api-key-not-found
        message:
          type: string
    403Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - forbidden
            - access-denied
            - agreement-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
        message:
          type: string
    500Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - server-error
        message:
          type: string
    400ValError:
      required:
        - code
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    CSPApiKeyAuth:
      type: apiKey
      description: The authorization key obtained from the CSP organization.
      name: X-API-KEY
      in: header

````

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