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

  • For services that do not require validating the values of additional attributes (for example, Google Workspace (G Suite)), an asynchronous task is created anyway and completed successfully as a result of sending the request.
    1. Check for accept Microsoft Customer Agreement for the account:
      • If it is necessary to accept Microsoft Customer Agreement for the account, it is required the request body includes microsoft_customer_agreement = 1.
      • If it is not necessary to accept Microsoft Customer Agreement for the account, the microsoft_customer_agreement value in the request body is ignored.
    2. Check for the Tenant Name in the platform for the account:
      • If the account is linked to a Microsoft Tenant Name in the platform:
        1. The is_new_domainwith_subdomain, and customer_domain values in the request body are ignored.
        2. Check for creating a new Tenant Name for the account is skipped.
      • If the account is not linked to a Microsoft Tenant Name in the platform, go to the next check.
    3. Check for creating a new Tenant Name for the account using the is_new_domain value in the request body:
      • If the request body includes is_new_domain = 1:
        1. The with_subdomain value in the request body is ignored.
        2. A new Tenant Name for the account is created with a subdomain: .onmicrosoft.com is automatically added to the customer_domain value.
      • If the request body includes is_new_domain = 0, find an existing Tenant Name on the Microsoft side for the account taking into account the with_subdomain value:
        • If the request body includes with_subdomain = 0, use the customer_domain value as a Tenant Name.
        • If the request body includes with_subdomain = 1, use the customer_domain value with the .onmicrosoft.com subdomain as a Tenant Name.
    4. If the request body includes microsoft_customer_agreement = 1, accept Microsoft Customer Agreement for the account on behalf of the manager determined by the token in the API request.
    1. Check the MicrosoftCloudAgreement purchase prerequisite for accepting Microsoft Customer Agreement for the account:
      • If at least for one of the specified plan_resource_id it is necessary to accept Microsoft Customer Agreement for the account, it is required the request body includes microsoft_customer_agreement = 1.
      • If it is not necessary to accept Microsoft Customer Agreement for the account, the microsoft_customer_agreement value in the request body is ignored.
    2. Check the AzureSubscriptionRegistration purchase prerequisite for an active Microsoft Azure subscription of the account:
      • If at least for one of the specified plan_resource_id it is necessary that the account has an active Microsoft Azure subscription, it is required the request body includes microsoft_azure_subscription with the ID of a Microsoft Azure subscription in the Active status and linked to the account and reservation_scope with any valid value.
      • If it is not necessary that the account has an active Microsoft Azure subscription, the microsoft_azure_subscription and reservation_scope values in the request body are ignored.
    3. Check the InventoryCheck purchase prerequisite for no restrictions by SKUs of the specified resources for the account:
      • If for a specified plan_resource_id it is necessary to check restrictions by SKU for the account, it is required the SKU of the plan_resource_id does not have restrictions.
    4. Check for the Tenant Name in the platform for the account:
      • If the account is linked to a Microsoft Tenant Name in the platform:
        1. The is_new_domainwith_subdomain, and customer_domain values in the request body are ignored.
        2. Check for creating a new Tenant Name for the account is skipped.
      • If the account is not linked to a Microsoft Tenant Name in the platform, go to the next check.
    5. Check for creating a new Tenant Name for the account using the is_new_domain value in the request body:
      • If the request body includes is_new_domain = 1:
        1. The with_subdomain value in the request body is ignored.
        2. A new Tenant Name for the account is created with a subdomain: .onmicrosoft.com is automatically added to the customer_domain value.
      • If the request body includes is_new_domain = 0, find an existing Tenant Name on the Microsoft side for the account taking into account the with_subdomain value:
        • If the request body includes with_subdomain = 0, use the customer_domain value as a Tenant Name.
        • If the request body includes with_subdomain = 1, use the customer_domain value with the .onmicrosoft.com subdomain as a Tenant Name.
    6. If the request body includes microsoft_customer_agreement = 1, accept Microsoft Customer Agreement for the account on behalf of the manager determined by the token in the API request.
    7. On the Microsoft side, a shopping cart with a customer order is created for the account.

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 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-TokenheaderstringRequiredAPI token of a manager that performs the operation (see Viewing and updating Manager's information)
Content-TypeheaderstringRequiredMedia type of the request. Specify the following: application/vnd.api+json
AcceptheaderstringRequired

Supported media types of the answer. Specify the following: application/vnd.api+json

base_urlpathstringRequiredActivePlatform URL
reseller_idpathintegerRequiredID of the current reseller or any of its downstream resellers (see Viewing and updating Reseller general information)
plan_idpathintegerRequiredID of the plan
dataformobjectRequiredInformation about attributes of the operation

account_idformintegerRequiredID of an account used for ordering the subscription

plan_period_idformintegerOptionalID 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_attributesformarrayRequiredList of additional attributes and their values depending on the service linked to the specified plan (see Get list of order attributes of plan)


keyformstringRequiredKey of the additional attribute


valueformDepends on the attributeRequired

Value of the additional attribute

For checkbox and boolean (see Get list of order attributes of plan):

  • — the corresponding option is selected.
  • 0 — the corresponding option is not selected.


plugin_slugform

string

Required

Plugin used for the service of the additional attribute:

  • office365 — the Office365 plugin.
  • microsoft_csp_products — the MicrosoftCspProducts plugin.
  • vendor_service — VSP (Vendor service plugin).

resourcesformarrayOptionalList 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_idformintegerOptionalID of a resource of the specified plan (see Create sales order).


quantityformintegerOptionalAmount 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": []
        }
    }
}

Отзыв | Feedback