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-TokenheaderstringRequiredAPI token of the Manager that performs the operation (see Viewing and updating manager's information)
Content-TypeheaderstringRequiredIndicates the media type (text/html or text/JSON) of the request that is sent to the server by the client (browser)
AcceptheaderstringRequiredInformation about data types that the client (browser) supports
reseller_idpathintegerRequiredID of the current Reseller or any of its downstream Resellers (see Viewing and updating reseller general information)
order_idpathintegerRequiredOrder ID
includequerystringOptional

Returns additional information about objects related to Orders. The following object and possible value are supported:

ObjectParameter value
Chargescharges

Response model

Name

Data type

Description

dataobject
Response data

idintegerOrder ID

typestringData type

attributesobjectInformation 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_atdateDate 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_datedateDate 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_idintegerID and name of the Manager who created the Order


stringIP address of the user who created the Order


custom_priceboolWhether the individual prices are used for the ordered Subscription:
    • true — Subscription is ordered at the individual prices
    • false — Subscription is ordered at the Plan prices


created_bystring

Information about the creator of the Order:

  • ID and name of the Reseller's Manager or Accounts' User who created the Order
  • system — the Order is created automatically


subscription_idintegerID of the linked Subscription


items

array of objectsList of items in the Order



idintegerItem ID



target_idintegerEntity ID (service or additional resource), which is related to the item of the Order



target_typestring

Entity type, which is related to the item of the Order:

  • Subscription — subscription

  • SubscriptionResource — additional resource of the subscription




typestring

Internal type of the Order item:

  • "ProvisioningItem::Upgrade" — increasing an amount of the subscription's resources

  • "ProvisioningItem::New" — new subscription

  • "ProvisioningItem::RegisterDomain" — domain registration

  • "ProvisioningItem::Renew" — renewal of the subscription

  • "ProvisioningItem::SwitchPlan" — changing a plan within the subscription

  • "ProvisioningItem::Downgrade" — decreasing an amount of the subscription's resources

  • "ProvisioningItem::TransferDomain" — transferring a domain

  • "ProvisioningItem::RegisterCertificate" — registration of the SSL-certificate




statusstring

Current status of the Order item:

  • waiting for payment — the Order has been placed by a customer, the payment is expected
  • provisioning — the Order has been accepted, the service is provided
  • provisioning failed — the Order has been accepted, but the service is not provided
  • completed — the Order has been successfully processed
  • cancelled — the Order has been cancelled by a customer



descriptionstringBrief description of the Order item



quantityinteger

Resource amount changed with the Order


relationshipsarrayRelated objects


chargesarrayCharges data



dataarray

Related object information:

NameData typeDescription
idintegerID of the object
typestringData type
includedarray

Additional information about objects listed in the request:

NameData typeDescription
idintegerID of the object
typestringData type
attributesarrayAttributes of the object (see details below)

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
                }
            }
        }
    ]
}