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

Validation process sequence
  • 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.

  • For services based on the Office365 plugin:
    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:The is_new_domain, with_subdomain, and customer_domain values in the request body are ignored.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:The with_subdomain value in the request body is ignored.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.

  • For services based on the MicrosoftCspProducts plugin:
    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:The is_new_domain, with_subdomain, and customer_domain values in the request body are ignored.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:The with_subdomain value in the request body is ignored.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.

XML
 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


)

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 


)

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 checkbox and boolean (see Get list of order attributes of plan):

  • — the corresponding option is selected.

  • 0 — the corresponding option is not selected.



plugin_slug

form

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


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

XML
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
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

JSON
{
     "data":
    {
        "id": "9b68427b-52d5-4c01-9b77-eb1b70517414",
        "type": "async_tasks",
        "attributes":
        {
            "status": "pending",
            "failure_message": "",
            "result": []
        }
    }
}