Validate order attributes of plan
The Validate order attributes of plan method is used with ordering a new subscription (see Create sales order) for validating the values of additional attributes (see Get list of order attributes of plan) required for the services provisioning by the given plan ID of the current reseller or any of its downstream resellers.
As a result of sending the request, an asynchronous task is created for performing validation on the service side. Completing the task may take some time. To check the validation results, use the Get async task method (see Get async task).
An API token of a manager is required for authorization. To get an API token via the Operator Control Panel, see Viewing and updating manager's information.
The manager's API token specified in an API request determines:
- The role and access level of the manager, which determine the availability of a method.
- The current reseller and downstream resellers accessible within a method.
POST {base_url}/api/v3/resellers/{reseller_id}/plans/{plan_id}/order_attributes_validation
Arguments
Name | Parameter Type | Data type | Required/Optional | Description | ||
---|---|---|---|---|---|---|
X-Api-Token | header | string | Required | API token of a manager that performs the operation (see Viewing and updating manager's information) | ||
Content-Type | header | string | Required | Media type of the request. Specify the following: application/vnd.api+json | ||
Accept | header | string | Required | Supported media types of the answer. Specify the following: application/vnd.api+json | ||
base_url | path | string | Required | ActivePlatform URL | ||
reseller_id | path | integer | Required | ID of the current reseller or any of its downstream resellers (see Viewing and updating reseller general information) | ||
plan_id | path | integer | Required | ID of the plan | ||
data | form | object | Required | Information about attributes of the operation | ||
account_id | form | integer | Required | ID of an account used for ordering the subscription | ||
plan_period_id | form | integer | Optional | ID of a period of the specified plan (see Create sales order) to be ordered in a subscription. Required for services based on the MicrosoftCspProducts plugin because affects the validation logic | ||
order_attributes | form | array | Required | List of additional attributes and their values depending on the service linked to the specified plan (see Get list of order attributes of plan) | ||
key | form | string | Required | Key of the additional attribute | ||
value | form | Depends on the attribute | Required | Value of the additional attribute For
| ||
plugin_slug | form | string | Required | Plugin used for the service of the additional attribute:
| ||
resources | form | array | Optional | List of IDs of resources to be ordered in a subscription. Required for services based on the MicrosoftCspProducts plugin because affects the validation logic | ||
plan_resource_id | form | integer | Optional | ID of a resource of the specified plan (see Create sales order). | ||
quantity | form | integer | Optional | Amount of a resource of the specified plan to be ordered in a subscription |
Response model
If no errors are encountered, the method returns data as the information about the created asynchronous task in the Pending status (see the response model in Get async task).
Request example
POST /api/v3/resellers/1/plans/1770/order_attributes_validation
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
{
"data": {
"account_id": 833,
"order_attributes": [
{
"plugin_slug": "office365",
"key": "is_new_domain",
"value": "1"
},
{
"plugin_slug": "office365",
"key": "with_subdomain",
"value": "1"
},
{
"plugin_slug": "office365",
"key": "customer_domain",
"value": "exampledomain"
},
{
"plugin_slug": "office365",
"key": "microsoft_customer_agreement",
"value": "1"
}
]
}
}
Response example
{
"data":
{
"id": "9b68427b-52d5-4c01-9b77-eb1b70517414",
"type": "async_tasks",
"attributes":
{
"status": "pending",
"failure_message": "",
"result": []
}
}
}