Add a provider instance to the given reseller.
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
-
The domain used to access the portal.
-
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
-
The reseller id.
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.
-
The id of the provider instance to which the reseller with ResellerId is associated to. Must always be set.
-
This value object contains the price margin for this entity.
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.
-
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.
-
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.
-
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.
-
500 application/json
A server error has happened during the request. Please try again later or contact support.
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":{}}'
# 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": {}
}
{
"statusCode": 42,
"type": "string",
"description": "string",
"correlationId": "string",
"errors": [
{
"propertyName": "string",
"description": [
"string"
]
}
]
}
{
"statusCode": 42,
"type": "string",
"description": "string",
"correlationId": "string",
"errors": [
{
"propertyName": "string",
"description": [
"string"
]
}
]
}
{
"statusCode": 42,
"type": "string",
"description": "string",
"correlationId": "string",
"errors": [
{
"propertyName": "string",
"description": [
"string"
]
}
]
}