orders
Creates, updates, deletes, gets or lists an orders resource.
Overview
| Name | orders |
| Type | Resource |
| Id | godaddy.orders.orders |
Fields
The following fields are returned by SELECT queries:
- get
- list
Request was successful
| Name | Datatype | Description |
|---|---|---|
billTo | object | The billing contact information that was used at the time of purchase |
createdAt | string (iso-datetime) | Date and time when the current order is created on |
currency | string (iso-currency-code) | Currency in which the order has been placed |
items | array | |
orderId | string | Unique identifier of current order |
parentOrderId | string | Unique identifier of the parent order. All refund/chargeback orders are tied to the original order. The orginal order's orderId is the parentOrderId of refund/chargeback orders |
payments | array | |
pricing | object | Pricing information for current order |
Request was successful
| Name | Datatype | Description |
|---|---|---|
createdAt | string (iso-datetime) | Date and time when the current order was created |
currency | string (iso-currency-code) | Currency in which the order was placed |
items | array | Sets of two or more line items in current order |
orderId | integer | Unique identifier of the current order |
parentOrderId | string | Unique identifier of the parent order. All refund/chargeback orders are tied to the original order. The orginal order's orderId is the parentOrderId of refund/chargeback orders |
pricing | object | Pricing information of the current order |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | order_id | X-Shopper-Id, X-Market-Id | API ResellersThis endpoint does not support subaccounts and therefore API Resellers should not supply an X-Shopper-Id header |
list | select | periodStart, periodEnd, domain, productGroupId, paymentProfileId, parentOrderId, offset, limit, sort, X-Shopper-Id, X-Market-Id | API ResellersThis endpoint does not support subaccounts and therefore API Resellers should not supply an X-Shopper-Id header | |
_list | exec | periodStart, periodEnd, domain, productGroupId, paymentProfileId, parentOrderId, offset, limit, sort, X-Shopper-Id, X-Market-Id | API ResellersThis endpoint does not support subaccounts and therefore API Resellers should not supply an X-Shopper-Id header |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
order_id | string | Order id whose details are to be retrieved |
X-Market-Id | string | Unique identifier of the Market in which the request is happening |
X-Shopper-Id | string | Shopper ID to be operated on, if different from JWTReseller subaccounts are not supported |
domain | string | Domain name to use as the filter of results |
limit | integer | Maximum number of items to return |
offset | integer | Number of results to skip for pagination |
parentOrderId | string | Parent order id to use as the filter of results |
paymentProfileId | integer | Payment profile id to use as the filter of results |
periodEnd | string | End of range indicating what time-frame should be returned. Inclusive |
periodStart | string | Start of range indicating what time-frame should be returned. Inclusive |
productGroupId | integer | Product group id to use as the filter of results |
sort | string | Property name that will be used to sort results. '-' indicates descending |
SELECT examples
- get
- list
API ResellersThis endpoint does not support subaccounts and therefore API Resellers should not supply an X-Shopper-Id header
SELECT
billTo,
createdAt,
currency,
items,
orderId,
parentOrderId,
payments,
pricing
FROM godaddy.orders.orders
WHERE order_id = '{{ order_id }}' -- required
AND X-Shopper-Id = '{{ X-Shopper-Id }}'
AND X-Market-Id = '{{ X-Market-Id }}'
;
API ResellersThis endpoint does not support subaccounts and therefore API Resellers should not supply an X-Shopper-Id header
SELECT
createdAt,
currency,
items,
orderId,
parentOrderId,
pricing
FROM godaddy.orders.orders
WHERE periodStart = '{{ periodStart }}'
AND periodEnd = '{{ periodEnd }}'
AND domain = '{{ domain }}'
AND productGroupId = '{{ productGroupId }}'
AND paymentProfileId = '{{ paymentProfileId }}'
AND parentOrderId = '{{ parentOrderId }}'
AND offset = '{{ offset }}'
AND limit = '{{ limit }}'
AND sort = '{{ sort }}'
AND X-Shopper-Id = '{{ X-Shopper-Id }}'
AND X-Market-Id = '{{ X-Market-Id }}'
;
Lifecycle Methods
- _list
API ResellersThis endpoint does not support subaccounts and therefore API Resellers should not supply an X-Shopper-Id header
EXEC godaddy.orders.orders._list
@periodStart='{{ periodStart }}',
@periodEnd='{{ periodEnd }}',
@domain='{{ domain }}',
@productGroupId='{{ productGroupId }}',
@paymentProfileId='{{ paymentProfileId }}',
@parentOrderId='{{ parentOrderId }}',
@offset='{{ offset }}',
@limit='{{ limit }}',
@sort='{{ sort }}',
@X-Shopper-Id='{{ X-Shopper-Id }}',
@X-Market-Id='{{ X-Market-Id }}'
;