Get the Reseller's Order Info by ID
The Get the Reseller's Order Info by ID method returns Order details by the given Order ID of the current Reseller or any of its downstream Resellers.
Access to the current Reseller and downstream Resellers is determined by the Manager's token in the API request.
GET {base_url}/api/v3/resellers/{reseller_id}/orders/{order_id}
Arguments
Name | Parameter Type | Data type | Required/ Optional | Description | ||||
---|---|---|---|---|---|---|---|---|
X-Api-Token | header | string | Required | API token of the Manager that performs the operation (see Viewing and updating manager's information) | ||||
Content-Type | header | string | Required | Indicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser) | ||||
Accept | header | string | Required | Information about data types that the client (browser) supports | ||||
reseller_id | path | integer | Required | ID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information) | ||||
order_id | path | integer | Required | Order ID | ||||
include | query | string | Optional | Returns additional information about objects related to Orders. The following object and possible value are supported:
|
Response model
Name | Data type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | object | Response data | |||||||||||||||||||||
id | integer | Order ID | |||||||||||||||||||||
type | string | Data type | |||||||||||||||||||||
attributes | object | Information about the Order | |||||||||||||||||||||
created_at | date | Date and time of the Order creation | |||||||||||||||||||||
updated_at | date | Date and time when the Order was changed last time | |||||||||||||||||||||
document_id | string | Order number | |||||||||||||||||||||
status | string | Status of the Order. For the list of statuses, see Viewing order details | |||||||||||||||||||||
account_id | integer | Account ID, which was used to pay for the Order | |||||||||||||||||||||
type | string | Order type. For the list of Order types, see Managing an order | |||||||||||||||||||||
closed_at | date | Date and time when the Order was closed | |||||||||||||||||||||
expiration_date | date | Date by which the order must be paid (the order status must be confirmed). The date is calculated using the grace period, which is set in the Service Term (see Creating a service term) | |||||||||||||||||||||
provisioning_date | date | Date of the Order provisioning | |||||||||||||||||||||
total | float | Total amount of the Order | |||||||||||||||||||||
promo_code | string | Promo code, which was used to get the discount (see Managing Promo Code discounts) | |||||||||||||||||||||
payment_id | integer | Payment ID, which is linked to the Order | |||||||||||||||||||||
manager_id | integer | ID and name of the Manager who created the Order | |||||||||||||||||||||
string | IP address of the user who created the Order | ||||||||||||||||||||||
custom_price | bool | Whether the individual prices are used for the ordered Subscription:
| |||||||||||||||||||||
created_by | string | Information about the creator of the Order:
| |||||||||||||||||||||
subscription_id | integer | ID of the linked Subscription | |||||||||||||||||||||
items | array of objects | List of items in the Order | |||||||||||||||||||||
id | integer | Item ID | |||||||||||||||||||||
target_id | integer | Entity ID (service or additional resource), which is related to the item of the Order | |||||||||||||||||||||
target_type | string | Entity type, which is related to the item of the Order:
| |||||||||||||||||||||
type | string | Internal type of the Order item:
| |||||||||||||||||||||
status | string | Current status of the Order item:
| |||||||||||||||||||||
description | string | Brief description of the Order item | |||||||||||||||||||||
quantity | integer | Resource amount changed with the Order | |||||||||||||||||||||
relationships | array | Related objects | |||||||||||||||||||||
charges | array | Charges data | |||||||||||||||||||||
data | array | Related object information:
| |||||||||||||||||||||
included | array | Additional information about objects listed in the request:
Attributes of the object:
|
Request example
GET /api/v3/resellers/1/orders/10567?include=charges
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": {
"id": "10567",
"type": "sales_orders",
"attributes": {
"created_at": "2020-08-02T10:56:54.594+03:00",
"updated_at": "2020-08-02T11:03:44.049+03:00",
"document_id": "SO006035",
"status": "completed",
"account_id": 600,
"type": "SalesOrder",
"closed_at": "2020-08-02T11:03:44.049+03:00",
"expiration_date": "2020-09-01",
"provisioning_date": null,
"total": "14.51",
"promo_code": null,
"payment_id": 7779,
"manager_id": null,
"requester_ip": "10.0.0.203",
"custom_price": false,
"created_by": "#17 Abramovich Roman",
"subscription_id": 3007122,
"items": [
{
"id": 18286,
"target_id": "SubscriptionResource",
"target_type": "SubscriptionResource",
"type": "ProvisioningItem::Upgrade",
"status": "completed",
"description": "HDD",
"quantity": 1
},
{
"id": 18285,
"target_id": "Subscription",
"target_type": "Subscription",
"type": "ProvisioningItem::New",
"status": "completed",
"description": "CSP monthly",
"quantity": 1
}
]
},
"relationships": {
"charges": {
"data": [
{
"id": "308427",
"type": "charges"
},
{
"id": "308426",
"type": "charges"
}
]
}
}
},
"included": [
{
"id": "308427",
"type": "charges",
"attributes": {
"created_at": "2020-08-02T10:56:54.739078+0300",
"updated_at": "2020-09-02T10:08:09.327220+0300",
"subscription_id": 3007122,
"subscription_resource_id": 34928,
"quantity": 1,
"operate_from": "2020-09-01",
"duration": 0.033,
"description": "Upgrade resource (recurring fee) \"HDD\" for Subscription #3007122 \"CSP monthly\"",
"unit_price": "15.0",
"amount": "0.5",
"status": "deleted",
"type": "Charge::Recurring",
"net_cost": null,
"taxes_amount": 0,
"subscription_resource_name": "HDD",
"plan_resource_id": 4340,
"resource_id": 1454,
"order_id": 10567,
"operate_to": "2020-09-01",
"close_date": "2020-09-01",
"billing_date": "2020-09-01",
"additional_params": [],
"discount": "0.00",
"original_amount": "0.5",
"original_amount_currency": "EUR",
"currency_rate": "1.0",
"currency_unit": 1
},
"relationships": {
"taxes": {
"data": []
},
"reseller": {
"data": {
"id": "1",
"type": "resellers"
}
},
"account": {
"data": {
"id": "600",
"type": "accounts"
}
},
"subscription": {
"data": {
"id": "3007122",
"type": "subscriptions"
}
},
"plan": {
"data": {
"id": "1598",
"type": "plans"
}
},
"discount": {
"data": null
}
}
},
{
"id": "308426",
"type": "charges",
"attributes": {
"created_at": "2020-08-02T10:56:54.732962+0300",
"updated_at": "2020-09-02T10:08:07.740634+0300",
"subscription_id": 3007122,
"subscription_resource_id": 34928,
"quantity": 1,
"operate_from": "2020-08-02",
"duration": 0.967,
"description": "Upgrade resource (recurring fee) \"HDD\" for Subscription #3007122 \"CSP monthly\"",
"unit_price": "15.0",
"amount": "14.51",
"status": "closed",
"type": "Charge::Recurring",
"net_cost": null,
"taxes_amount": 0,
"subscription_resource_name": "HDD",
"plan_resource_id": 4340,
"resource_id": 1454,
"order_id": 10567,
"operate_to": "2020-08-31",
"close_date": "2020-08-31",
"billing_date": "2020-08-01",
"additional_params": [],
"discount": "0.00",
"original_amount": "14.51",
"original_amount_currency": "EUR",
"currency_rate": "1.0",
"currency_unit": 1
},
"relationships": {
"taxes": {
"data": []
},
"reseller": {
"data": {
"id": "1",
"type": "resellers"
}
},
"account": {
"data": {
"id": "600",
"type": "accounts"
}
},
"subscription": {
"data": {
"id": "3007122",
"type": "subscriptions"
}
},
"plan": {
"data": {
"id": "1598",
"type": "plans"
}
},
"discount": {
"data": null
}
}
}
]
}