The Get async task method is used with ordering a new subscription (see Create sales order) for checking the status of an asynchronous task of the current reseller or any of its downstream resellers. An asynchronous task is used to validate the values of additional attributes on the service side (see Validate order attributes of plan).
GET {{base_url}}/api/v3/resellers/{{reseller_id}}/async_tasks/{{async_task_id}}
Authentication
This endpoint requires a JWT access token. Specify the token in the Authorization header using the Bearer authentication scheme:
Authorization: Bearer <JWT_ACCESS_TOKEN>
In Postman, select Bearer Token on the Authorization tab and enter the JWT access token.
Arguments
|
Name |
Parameter Type |
Data type |
Required/Optional |
Description |
|---|---|---|---|---|
|
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) |
|
async_task_id |
path |
integer |
Required |
ID of the asynchronous task |
Response model
|
Name |
Data type |
Description |
||||||
|---|---|---|---|---|---|---|---|---|
|
data |
object |
Response data |
||||||
|
|
id |
string |
ID of the asynchronous task |
|||||
|
|
type |
string |
Data type |
|||||
|
|
attributes |
object |
Attributes of the asynchronous task |
|||||
|
|
|
status |
string |
Status of the asynchronous task:
|
||||
|
|
|
failure_message |
string |
Error description — if the asynchronous task is failed due to an error on the platform side ( |
||||
|
|
|
results |
object |
Information about validation of additional attributes — if the asynchronous task is completed successfully ( |
||||
|
|
|
|
valid |
bool |
Validation result:
|
|||
|
|
|
|
errors |
array |
List of keys of additional attributes and error descriptions — if any of additional attributes are not valid ( |
|||
|
|
|
|
application_attributes |
object |
|
|||
Request example
GET /api/v3/resellers/1/async_tasks/9b68427b-52d5-4c01-9b77-eb1b70517414
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
Authorization: Bearer <JWT_ACCESS_TOKEN>
Accept: application/vnd.api+json
Response example
{
"data":
{
"id": "9b68427b-52d5-4c01-9b77-eb1b70517414",
"type": "async_tasks",
"attributes":
{
"status": "completed",
"failure_message": "",
"results":
{
"valid": true,
"errors": [{}] ,
"application_attributes": {application_attributes}
}
}
}
}