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

# Retrieve Billing Partner Relationships

> Retrieve all partner subscriptions for a CSP.



## OpenAPI

````yaml /marketONE/MarketONEAPIs.yaml get /partnersub/v3/partnerSubscription
openapi: 3.0.1
info:
  title: MarketONE APIs
  description: >
    The MarketONE OpenAPIs provide a quick and easy way to access MarketONE
    features and your data. These APIs let Resellers (Service Providers) and
    Merchants work together to resell products and handle billing on a single
    platform.


    With an API key, you can authenticate and perform various tasks, like
    accessing and managing data. You can use an HTTP client in any programming
    language to send HTTP requests to MarketONE to create, edit, or delete data.
    The data you work with, like subscriptions or entitlements, are called
    resources, and each resource has its own endpoint (URL).


    The MarketONE OpenAPIs use built-in HTTP features, like HTTP authentication
    and HTTP verbs, which are easy for standard HTTP clients to understand. They
    also use HTTP response codes to indicate errors. All responses, including
    errors, are in JSON format, but our API libraries convert them into objects
    that are specific to the programming language you're using. 


    You can also download the MarketONE OpenAPIs in a YAML file, which is easy
    to read and manage.


    For more information about the MarketONE OpenAPIs, see the [API Reference
    Guide for Merchants](https://docs.saas.amdocs.com/bundle/b_partnerAPIGuide/)
    and the [API Reference Guide for Resellers (Service
    Providers)](https://docs.saas.amdocs.com/bundle/b_aggregatorAPIGuide).


    ## Other MarketONE APIs


    Other MarketONE APIs, such as the [Reseller (CSP) Adapter
    OpenAPIs](https://docs.saas.amdocs.com/bundle/MarketONECSPAdapter/page/index.html),
    the [Merchant (OTT) Service
    Callbacks](https://docs.saas.amdocs.com/bundle/MarketONEOTTServiceCallbacks/page/index.html),
    and the [Commerce Gateway
    OpenAPIs](https://docs.saas.amdocs.com/bundle/Amdocs_Media-Commerce-Gateway-Latest-resolved/page/index.html),
    are available to provide additional services for specific organizations.


    # Environments


    MarketONE provides two distinct environments for testing and production:

    - **Prodtest environment**: this is a pre-production environment allowing
    you to test your application with test data. Use server
    <https://int-prodtest.m1amdocs.io/>.

    - **Production environment**: this is the live environment for the
    real-world implementation of  data. Use server <https://int.m1amdocs.com/>.


    # HTTP Verbs


    The MarketONE OpenAPIs support the following HTTP verbs:

    - **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).

    - **PUT**: Create a new resource or replace a resource with the request
    payload.

    - **DELETE**: Remove ownership or hierarchical association between certain
    resources.


    #  Example

     ## Request Example

     ```
    POST /v1/entitlement 

    Content-Type: application/json

    {
      "account": {
        "id": "2922fbf1-1dc4-2293-9d0e-c9a46630ad6e"
      },
      "subscriptionId": "ef1917b8-4a06-4595-9998-718799a33ed6",
      "productCodes": [
        "Basic_Addon"
      ],
      "metadata": {
        "email": "j.smith@email.com"
      }
    }

    ```

      ## Response Example

    ```

    Response: 200 OK

    Content-Type: application/json

    [
      {
        "partnerSubscriptionId": "80e08955-b0e9-4ba6-b882-b24230bfc703",
        "account": {
          "id": "0006fbf1-1ac4-4793-9d0e-c0a0080ad6e",
          "partnerCustomerId": "1bbbb3a5-0f05-4009-b4ae-b01f7eba7g"
        },
       "subscriptionId": "ef1417b8-4a06-7775-8518-718714a33ed2",
        "externalPartnerSubscriptionId": "7d50531-31eb-45f9-91ce-6355250f5501",
        "partnerCode": "PRTNR",
        "productCode": "Basic_Addon",
        "createdDate": "2024-05-04T17:38:10.889",
        "updatedDate": "2024-05-04T17:38:11.160",
        "startServiceDate": "2024-05-04T17:38:10.889",
        "serviceStatus": "PROVISION-COMPLETE"
      }
    ]

    ```


    # 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


    API keys are required to make requests to the MarketONE OpenAPIs. In Partner
    Ecosystem Management, Resellers (Service Providers) can conveniently
    [generate an API
    key](https://docs.saas.amdocs.com/bundle/b_userGuideForResellers/page/topics/apiKeysAggregatorManage_t.html).
    Merchants can also [generate an API key for each Reseller (Service Provider)
    partnership](https://docs.saas.amdocs.com/bundle/b_userGuideForMerchants/page/topics/apiKeysManage_t.html)
    in Partner Ecosystem Management. After you authenticate with your API
    key(s), you can access resources through the MarketONE OpenAPIs.


    Each API key is a JSON Web Token (JWT) that doesn't expire. For every API
    call you make to the MarketONE OpenAPIs, the API key must be included in the
    header (`X-API-KEY`) of the call to ensure trusted communication. All
    communication is HTTP(s) based and supports SSL/TLS encryption.


    # 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. |
  license:
    name: Amdocs Inc.
    url: http://www.amdocs.com
  version: Released
servers:
  - url: https://int-prodtest.m1amdocs.io/
    description: Sandbox server (uses test data)
  - url: https://int.m1amdocs.com/
    description: Production server (uses live data)
security: []
paths:
  /partnersub/v3/partnerSubscription:
    get:
      tags:
        - partnerSubscription
      summary: Retrieve Billing Partner Relationships
      description: Retrieve all partner subscriptions for a CSP.
      operationId: getPartnerSubscription
      parameters:
        - name: X-Aggregator-Code
          in: header
          description: >-
            The aggregator organization code. Organization code must be provided
            either via HTTP header or query parameter. If both are provided,
            HTTP header will be used.
          required: false
          style: simple
          explode: false
          schema:
            maxLength: 16
            type: string
        - name: aggregatorCode
          in: query
          description: >-
            The aggregator organization code. Organization code must be provided
            either via HTTP header or query parameter. If both are provided,
            HTTP header will be used.
          required: false
          style: form
          explode: true
          schema:
            maxLength: 16
            type: string
        - name: filter
          in: query
          description: >
            The filtering conditions: property names or property paths using
            filtering operators and values.


            The supported operators are:


            | Operator | Description |

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

            | eq | Equal  |

            | ne  | Not equal  

            | gt  | Greater than

            | ge  | Greater than or equal  

            | lt  | Less than  

            | le  | Less than or equal

            | sw  | Start with

            | ew  | End with

            | co  | Contains

            | and  | Logical and  

            | or  | Logical or

            | not  | Logical negation

            | ( )  | Precedence grouping


            Precedence order for logical operators: not, and, or.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: include
          in: query
          description: >
            The include data specification: A string composed of comma separated
            property names. Property paths are supported, property paths use
            periods as separators. If properties have a large number of items, a
            page number and size can be provided, following the property name in
            squeare brackets (e.g.: bookmarks[1|20]).
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: orderBy
          in: query
          description: >
            This contains a comma-separated list of expressions used to sort the
            items.


            The expression MAY include the prefix "+" for ascending or "-" for
            descending. If "+" or "-" is not specified, ascending order is used.


            NULL values are sorted as "less than" non-NULL values.


            Items are sorted by the result values of the first expression, and
            then items with the same value for the first expression are sorted
            by the result value of the second expression, and so on. The sort
            order is the inherent order for the type of the property.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: page
          in: query
          description: The results page number.
          required: false
          style: form
          explode: true
          schema:
            minimum: 0
            type: integer
            default: 0
        - name: size
          in: query
          description: The number of items to be returned.
          required: false
          style: form
          explode: true
          schema:
            maximum: 100
            minimum: 1
            type: integer
            format: int32
            default: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerSubscriptions'
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/400ErrorPS'
        '401':
          description: authorization failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401Error'
        '404':
          description: not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/404ErrorPSNF'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500Error'
components:
  schemas:
    PartnerSubscriptions:
      type: array
      description: A list of PartnerSubscription objects.
      items:
        $ref: '#/components/schemas/PartnerSubscription'
    400ErrorPS:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid-request
            - blacklisted-service-csp
            - blacklisted-service-user
            - eligibility-failed-csp
            - insufficient-balance
            - server-error
            - suspended-long-term
            - suspended-lost-stolen
            - suspended-non-payment
            - suspended-short-term
        message:
          type: string
          enum:
            - Invalid request.
            - >-
              You are not allowed to make this purchase because you are
              blacklisted by the aggregator.
            - >-
              You are not allowed to make this purchase based on your user
              preferences.
            - >-
              You are not eligible to subscribe to this service based on the
              rules set by your aggregator.
            - Insufficient funds (prepaid).
            - Server error.
            - Voluntarily long-term account suspended on user request.
            - The account is suspended because of a lost or stolen phone.
            - >-
              The account is suspended because of non-payment or other billing
              issue.
            - Voluntarily temporary account suspended on user request.
    401Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - authentication-required
            - invalid-api-key
            - api-key-not-found
        message:
          type: string
    404ErrorPSNF:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          example: not-found
        message:
          type: string
          example: partner subscription not found
    500Error:
      required:
        - code
      type: object
      properties:
        code:
          type: string
          enum:
            - server-error
        message:
          type: string
    PartnerSubscription:
      required:
        - accountId
        - createdDate
        - externalPartnerSubscriptionId
        - organizationId
        - partnerCode
        - partnerCustomerId
        - partnerSubscriptionId
        - productCode
        - serviceStatus
        - subscriptionId
        - subscriptionItemId
      type: object
      properties:
        partnerSubscriptionId:
          maxLength: 256
          type: string
          description: MarketONE partner service provisioning record identifier.
        partnerCustomerId:
          maxLength: 256
          type: string
          description: MarketONE unique customer identifier per partner.
        organizationId:
          maxLength: 50
          type: string
          description: >-
            The ID of the aggregator organization in MarketONE for which this
            record was created.
        accountId:
          maxLength: 128
          type: string
          description: >-
            The ID of the MarketONE account associated with this partner service
            record. This ID is not returned when the API is called with a
            partner API key. This will be returned withwhen the API is called
            with an aggregator API key.
        accountVid:
          maxLength: 128
          type: string
          description: >-
            The id of the SLM subscription associated with this partner service
            given by SLM in its response.
        subscriptionId:
          maxLength: 128
          type: string
          description: The id of the SLM subscription associated with this partner service.
        subscriptionVid:
          maxLength: 128
          type: string
          description: >-
            The id of the SLM subscription associated with this partner service
            given by SLM in its response.
        subscriptionItemId:
          maxLength: 128
          type: string
          description: >-
            The id of the SLM subscription Item associated with this partner
            service.
        externalPartnerSubscriptionId:
          maxLength: 256
          type: string
          description: >-
            The identifier returned by the partner from the "AddSubscription"
            callback.
        registrationString:
          maxLength: 2048
          type: string
          description: >-
            Information that was sent to the partner as part of the
            "AddSubscription" callback; e.g. registration code
        redemptionCodeExpirationTime:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when redemption code expires
            (optional)
          format: datetime
        partnerUrl:
          maxLength: 2048
          type: string
          description: >-
            The optional response value that identifies the Url where user will
            be directed to for entering the registration code and completing the
            registration
        partnerTokenizedUrl:
          maxLength: 2048
          type: string
          description: >-
            The optional response value that identifies the complete one click
            url that can be used by the user for activation of his partner
            subscription.
        partnerCode:
          maxLength: 15
          type: string
          description: The partner code as set by the partner admin in MarketONE.
        productCode:
          maxLength: 128
          type: string
          description: The product code defined by the partner identified by partner code.
        slmProductCode:
          maxLength: 128
          type: string
          description: The offer code defined by the CSP and maintained in SLM.
        createdDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was created.
          format: datetime
        updatedDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was updated.
          format: datetime
        startServiceDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was created.
          format: datetime
        endServiceDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner service
            provisioning information record was updated.
          format: datetime
        activatedDate:
          type: string
          description: >-
            The timestamp (ISO 8601 format) when the partner subscription was
            activated (optional)
          format: datetime
        serviceStatus:
          maxLength: 50
          type: string
          description: >-
            Status of the partner service MarketONE information. UNPROVISIONED
            indicates that the record was created by the callback response was
            not received. INACTIVE indicates the provisioning callback was
            sucesfully received by the partner service, but it has not been
            claimed by any service user yet. ACTIVE indicates that the service
            entitlement has been sucesfully provisioned, and a partner service
            user has claimed it. CANCELLATION-IN-PROGRESS indicates that the a 
            de-provisioning request is pending. CANCELLED indicates that the
            de-provisioning request confirmation has been received.
          enum:
            - UNPROVISIONED
            - INACTIVE
            - ACTIVE
            - PAUSED
            - UPDATE-IN-PROGRESS
            - PAUSE-IN-PROGRESS
            - RESUME-IN-PROGRESS
            - CANCELLATION-IN-PROGRESS
            - CANCELLED
        state:
          maxLength: 50
          type: string
          description: >-
            Current state of the calls in regards to Create, Cancel and
            Reprovision Subscriptions. Used for state machine orchestration for
            MarketONE managed subscriptions.
          enum:
            - PROVISION-PENDING
            - PROVISION-FAILED
            - PROVISION-COMPLETE
            - CANCELLATION-PENDING
            - CANCELLATION-FAILED
            - CANCELLATION-COMPLETE
            - CANCELLATION-FAILED-PROVISION
            - UPDATE-PENDING-ACTIVE
            - UPDATE-PENDING-INACTIVE
            - UPDATE-FAILED-ACTIVE
            - UPDATE-FAILED-INACTIVE
            - UPDATE-COMPLETE
            - UPDATE-METADATA-PENDING-ACTIVE
            - UPDATE-METADATA-PENDING-INACTIVE
            - UPDATE-METADATA-FAILED-ACTIVE
            - UPDATE-METADATA-FAILED-INACTIVE
            - PAUSE-PENDING-ACTIVE
            - PAUSE-PENDING-INACTIVE
            - PAUSE-FAILED-ACTIVE
            - PAUSE-FAILED-INACTIVE
            - PAUSE-FAILED-COMPENSATE-BY-RESUME
            - PAUSE-COMPLETE-ACTIVE
            - PAUSE-COMPLETE-INACTIVE
            - RESUME-PENDING-ACTIVE
            - RESUME-PENDING-INACTIVE
            - RESUME-FAILED-ACTIVE
            - RESUME-FAILED-INACTIVE
            - RESUME-COMPLETE
            - PARTNER-CANCELLED
            - PARTNER-UPDATED
            - PARTNER-INITIATED-SUBSCRIPTION-CANCEL-STARTED
            - PARTNER-INITIATED-SUBSCRIPTION-CANCEL-COMPLETE
            - PARTNER-INITIATED-SUBSCRIPTION-CANCEL-FAILED
            - CANCEL-CSP-EVENT-SENT-FOR-INACTIVITY
            - ACTIVATION-FAILED
            - AUTO-CANCEL-DUE-TO-INACTIVITY
        billingStatus:
          maxLength: 50
          type: string
          description: >-
            The status of the OTT billing partner subscription.
            PENDING-VALIDATION - the BILLING partner subscription creation was
            requested by the OTT partner and it requires validation, MarketONE
            triggered the OTP notification, aggregator sends the OTP to the
            consumer. The customer aggregator account details have not yet been
            validated as being correct. E.g. a MSISDN was provided, but we have
            not yet verified it belongs to the user. PENDING-CONFIRMATION -
            MarketONE successfully validated the BILLING partner subscription.
            All the BILLING partner subscription details are validated at this
            point, MarketONE awaiting confirmation from the customer via the OTT
            partner that they wish this partner subscription to be active for
            billing. ACTIVE - the BILLING partner subscription is available for
            billing CANCELLED - the BILLING partner subscription was canceled
            and can no longer be used for charges, but may be used for refunds
            if it had previously been active.
          enum:
            - PENDING-VALIDATION
            - PENDING-CONFIRMATION
            - ACTIVE
            - CANCELLED
        type:
          type: string
          description: >-
            the type of the partner subscription record; ENTITLEMENT - is when
            the partner subscription is represeting a entitlement relationship;
            BILLING - when the partner subscription is representing a billing
            relationship.
          enum:
            - ENTITLEMENT
            - BILLING
        billingPaymentMethod:
          $ref: '#/components/schemas/ID'
      description: The information managed in MarketONE about partner service provisioning.
    ID:
      maxLength: 128
      type: string
      description: A unique identifier.

````

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