Add a provider instance to the given reseller.

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

Available to the roles: csp

Headers

  • X-Tenant string Required

    This header identifies which tenant to access with this request. This value should be an existent domain for the specified tenant.

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

    Hide priceMargin attributes Show priceMargin attributes
  • 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
  • providerResellerId string | null

    An id that identifies the reseller has on the provider instance.

  • resellerProviderData string | null Required

    A json formatted string which contains specific data for the reseller association to the provider instance. In Microsoft Tier 1 this property can be a empty josn object "{}".

  • status object

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

    Hide status attribute Show status attribute

Responses

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: string" \
 -H "Authorization: Bearer eyJ0eXAiO..." \
 -H "X-Correlation-Id: string" \
 -d '{"providerInstanceId":"string","priceMargin":{"marginRule":{}},"offerTypeMargins":{},"providerResellerId":"string","resellerProviderData":"string","status":{}}'
Request example
# Headers
X-Tenant: string
Authorization: Bearer eyJ0eXAiO...
X-Correlation-Id: string

# Payload
{
  "providerInstanceId": "string",
  "priceMargin": {
    "marginRule": {}
  },
  "offerTypeMargins": {},
  "providerResellerId": "string",
  "resellerProviderData": "string",
  "status": {}
}
Response examples (201)
"string"
Response examples (201)
"string"
Response examples (400)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}
Response examples (400)
{
  "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"
      ]
    }
  ]
}
Response examples (500)
{
  "statusCode": 42,
  "type": "string",
  "description": "string",
  "correlationId": "string",
  "errors": [
    {
      "propertyName": "string",
      "description": [
        "string"
      ]
    }
  ]
}