ListOrders

ListOrders returns all orders in the account. It omits some information that can be retrieved from GetOrder.

Endpoint: GET /v4/orders

Parameters:


perPage

int32

Per Page is the number of records to return per request. Per Page defaults to 1,000.


page

int32

Page is which page to return


Response:


parentAccountId

int32

ParentAccountId field is populated when requesting account has a parent account id.


orders

Orders is the collection of orders, if any, in the requesting account.


nextPage

int32

NextPage is the identifier for the next page of results. It is only populated if there is another page of results after the current page.


lastPage

int32

LastPage is the identifier for the final page of results. It is only populated if there is another page of results after the current page.


Example:

curl -u 'username:token' 'https://api.dev.name.com/v4/orders'
{
    "parentAccountId": 34567891,
    "orders": [
        {
            "id": 123456789,
            "createDate": "2022-01-13T22:58:35Z",
            "status": "success",
            "currency": "USD",
            "orderItems": [
                {
                    "id": 123456781,
                    "status": "success",
                    "name": "example.com",
                    "tld": "com",
                    "type": "registration",
                    "price": 12.99,
                    "quantity": 1,
                    "duration": 1,
                    "interval": "year"
                },
                {
                    "id": 123456780,
                    "status": "success",
                    "name": "example.ninja",
                    "tld": "ninja",
                    "type": "registration",
                    "price": 10.99,
                    "quantity": 1,
                    "duration": 1,
                    "interval": "year"
                }
            ],
            "authAmount": 12.99,
            "totalCapture": 12.99,
            "finalAmount": "12.99"
        },
        {
            "id": 123456790,
            "createDate": "2021-12-10T22:58:35Z",
            "status": "failed",
            "currency": "USD",
            "orderItems": [
                {
                    "id": 12345677,
                    "status": "refunded",
                    "name": "example2.com",
                    "tld": "com",
                    "type": "registration",
                    "price": 9.9900000000000002,
                    "quantity": 1,
                    "duration": 1,
                    "interval": "year"
                }
            ],
            "authAmount": 9.9900000000000002,
            "totalCapture": 9.9900000000000002,
            "totalRefund": 9.9900000000000002
        }
    ]
}					

GetOrder

GetOrder returns details about a specific order

Endpoint: GET /v4/orders/{orderId}

Parameters:


orderId
(path parameters)

int32

OrderId is the unique identifier of the requested order.


Response:


id

int32

Id is the unique identifier of the order.


createDate
(read only)

string

CreateDate is the date the order was placed.


registrar

string

Registrar is registrar with which order is placed.


status
(read only)

string

Status indicates the state of the order ('success', 'failed').


currency
(read only)

string

Currency indicates currency of the order ('USD', 'CNY').


orderItems

OrderItems is the collection of 1 or more items in the order.


authAmount
(read only)

float32

AuthAmount is the amount authorized to complete the order purchase.


totalCapture
(read only)

float32

TotalCapture is the amount captured.


totalRefund
(read only)

float32

TotalRefund is the amount, if any, refunded. Default is 0.00. If 0.00, this field is not included in response.


finalAmount
(read only)

string

FinalAmount is the final amount of the order, after discounts and refunds.


currencyRate

float32

CurrencyRate is the conversion rate from USD to order's currency. This field is only populated if order's currency is non-USD.


Example:

curl -u 'username:token' 'https://api.dev.name.com/v4/orders/123456789'
{
    "id": 123456789,
    "createDate": "2017-11-13T22:58:35Z",
    "registrar": "name.com",
    "status": "success",
    "currency": "USD",
    "orderItems": [
        {
            "id": 123456781,
            "status": "success",
            "name": "example.com",
            "tld": "com",
            "type": "registration",
            "price": 12.99,
            "quantity": 1,
            "duration": 1,
            "interval": "year"
        },
        {
            "id": 123456780,
            "status": "success",
            "name": "example.ninja",
            "tld": "ninja",
            "type": "registration",
            "price": 10.99,
            "originalPrice": 10.99,
            "quantity": 1,
            "duration": 1,
            "interval": "year"
        }
    ],
    "authAmount": 23.98,
    "totalCapture": 23.98,
    "finalAmount": "23.98",
    "currencyRate": 0.085474999999999995
}