Add a provider instance to the given reseller.

POST /v1/Resellers/{resellerId}/provider-instances

When creating the provider reseller, we validate that the reseller's company address country is supported on all its provider instances plus the newly added provider instance. If not supported, then the creation attempt will fail. Available to the roles: csp

Headers

  • X-Tenant string Required

    The domain used to access the portal.

  • Authorization string Required

    JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

    Default value is Bearer eyJ0eXAiO....

  • X-Correlation-Id string(UUID)

    This header is optional and by setting it you can correlate the audit logs made by this request.

Path parameters

application/json

Body

To add the provider instance, pass a valid instance of ProviderResellerViewModel setting ProviderInstanceId to the id of an instance that the reseller hasn't got a relationship with, as well as the PriceMargin that should be set at the provider instance level. If you are doing this request for a Microsoft Tier 1 provider instance then don't set ProviderResellerId and don't set ResellerProviderData.

For a Microsoft Tier 2 provider instance set ProviderResellerId to the primary mpn id of the reseller, which is the mpn id that will be used for new subscription purchases and set ResellerProviderData to {"IndirectResellerId":null,"SecondaryMpnIds":[]} or if you have any secondary mpn ids set SecondaryMpnIds as an array of mpn ids, example: {"IndirectResellerId":null,"SecondaryMpnIds":["123"]}

For a Generic provider instance don't set ProviderResellerId and don't set ResellerProviderData.

Optionally, you can set OfferTypeMargins to specify price margins applied at the offer type level which will override the price margin applied at the provider instance level.

  • providerInstanceId string(uuid) Required

    The id of the provider instance to which the reseller with ResellerId is associated to. Must always be set.

  • priceMargin object Required

    This value object contains the price margin for this entity.

    Additional properties are NOT allowed.

    Hide priceMargin attribute Show priceMargin attribute object
    • marginRule object Required

      The margin rule applied. Possible values: Markup, Margin, SplitMargin or ErpMinusDiscount

      Additional properties are NOT allowed.

  • offerTypeMargins object | null

    Contains as key the name of the offer type and as value the price margin applied to each offer type for this specific provider instance. Price margins applied at the offer type level will override the price margin applied at the provider instance level. If no price margin is applied to a specific offer type of this provider instance then it will not be in the dictionary. This dictionary is optional.

    Hide offerTypeMargins attribute Show offerTypeMargins attribute object | null
    • * object Additional properties

      This value object contains the price margin for this entity.

      Additional properties are NOT allowed.

      Hide * attribute Show * attribute object
      • marginRule object Required

        The margin rule applied. Possible values: Markup, Margin, SplitMargin or ErpMinusDiscount

        Additional properties are NOT allowed.

  • providerResellerId string | null

    An id that identifies the reseller has on the provider instance. For a Microsoft Tier 2 provider instance set ProviderResellerId to the primary mpn id of the reseller, which is the mpn id that will be used for new subscription purchases. When adding a provider instance to a reseller for a Microsoft Tier 1 environment or a generic provider, don't pass this property on the creation request.

  • resellerProviderData string | null Required

    A json formatted string which contains specific data for the reseller association to the provider instance. For Microsoft Tier 1 resellers, this property can be a empty json: "{}". On Microsoft Tier 2 resellers, this property will be a json with the following format: {"IndirectResellerId":string,"SecondaryMpnIds":string[]}

  • status object

    The status for this entity. Possible values: Processing, Success, Failed

    Additional properties are NOT allowed.

Responses

  • The request completed with success and the provider reseller was added to the reseller.

  • 400 application/json

    There is an error in the parameters sent in the request. Can happen when for example you have already created the provider reseller.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

  • Please use a valid authorization token.

  • You don't have enough permissions to access this information.

  • 404 application/json

    The requested reseller or the provider instance you are trying to add does not exist.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

  • 500 application/json

    A server error has happened during the request. Please try again later or contact support.

    Hide response attributes Show response attributes object
    • statusCode integer(int32)

      The HTTP status code that represents a specific error scenario.

    • type string | null

      The type of error that occurred.

    • description string | null

      Describes the error scenario that occurred.

    • correlationId string | null

      The correlationId of the request that originated the error.

    • errors array[object] | null

      A list containing the detail of the errors that occurred in this error scenario.

      Hide errors attributes Show errors attributes object
      • propertyName string | null

        The name of the property involved in the error.

      • description array[string] | null

        A description of each error associated with the given property.

POST /v1/Resellers/{resellerId}/provider-instances
curl \
 -X POST https://app-cloudcockpitapi-prod-01.azurewebsites.net/v1/Resellers/{resellerId}/provider-instances \
 -H "Content-Type: application/json" \
 -H "X-Tenant: portal.cloudcockpit.com" \
 -H "Authorization: Bearer eyJ0eXAiO..." \
 -H "X-Correlation-Id: string" \
 -d '{"providerInstanceId":"a393f55e-8249-47a5-b11f-80c8dc7905c9","priceMargin":{"marginRule":{}},"offerTypeMargins":{"license":{"value":6,"marginRule":{"name":"markup"}}},"providerResellerId":"123","resellerProviderData":"JSON Object: {\"IndirectResellerId\":null,\"SecondaryMpnIds\":[\"123\"]}","status":{}}'
Request examples
# Headers
X-Tenant: portal.cloudcockpit.com
Authorization: Bearer eyJ0eXAiO...
X-Correlation-Id: string

# Payload
{
  "providerInstanceId": "a393f55e-8249-47a5-b11f-80c8dc7905c9",
  "priceMargin": {
    "marginRule": {}
  },
  "offerTypeMargins": {
    "license": {
      "value": 6,
      "marginRule": {
        "name": "markup"
      }
    }
  },
  "providerResellerId": "123",
  "resellerProviderData": "JSON Object: {\"IndirectResellerId\":null,\"SecondaryMpnIds\":[\"123\"]}",
  "status": {}
}
Response examples (400)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (404)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (500)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}