Orders: List Orders
GET /websites/:website_id/orders
Gets a list of orders.
| Attribute | Details |
|---|---|
website_id
Required
integer
|
The ID of the website the order originated from. |
count
integer
|
Maximum number of orders to return. Value can be between |
date_end
date
|
Only return orders that were created before this date. The date should be specified in the YYYY-MM-DD format (e.g., |
date_start
date
|
Only return orders that were created after this date. The date should be specified in the YYYY-MM-DD format (e.g., |
direction
string
|
Return orders sorted in ascending or descending order. Valid options are |
includes
string
|
Comma separated list of additional fields to include in the response. Available includes are |
page
integer
|
The page number of results to return. Defaults to page 1.
|
search
string
|
Search for messages that match the provided search string. Searches the |
sort
string
|
The field to sort the orders by. Possible values are |
status
string
|
Only returns orders that have the provided status. Possible values are |
Sample Curl Request
curl "https://api.firespring.com/websites/4/orders" \
-u your-api-key: \
-H "Firespring-Api-Version: 1" \
-X GET \
-G \
-d count="3" \
-d page="1" \
-d includes="user"
Sample Response
{
"object": "list",
"data": [
{
"object": "order",
"id": 4534,
"amount_paid": 15960,
"content_catalog": 10119035,
"currency": "usd",
"date_created": "2018-06-01T17:45:34+00:00",
"is_pay_later": false,
"message": 52,
"order_type": "catalog",
"portal": 1147329,
"pricing": {
"object": "order_pricing",
"shipping": 0,
"shipping_discount": 0,
"subtotal": 19950,
"subtotal_discount": 3990,
"tax": 0,
"total": 15960
},
"promo_code": {
"object": "order_promo_code",
"id": 2,
"promo_code": {
"object": "promo_code",
"id": 3,
"promo_code": "save20"
},
"shipping_discount": 0,
"subtotal_discount": 3990
},
"shipping_tax_percentage": 0,
"status": "new",
"user": {
"object": "website_user",
"id": 11,
"third_party_identifier": "",
"username": "xyzcorp"
}
},
{
"object": "order",
"id": 5894857,
"amount_paid": 5719,
"content_catalog": 10119035,
"currency": "usd",
"date_created": "2018-05-31T15:33:38+00:00",
"is_pay_later": false,
"message": 54,
"order_type": "ecommerce",
"portal": 1147329,
"pricing": {
"object": "order_pricing",
"shipping": 500,
"shipping_discount": 0,
"subtotal": 5985,
"subtotal_discount": 1197,
"tax": 431,
"total": 5719
},
"promo_code": {
"object": "order_promo_code",
"id": 2,
"promo_code": {
"object": "promo_code",
"id": 3,
"promo_code": "save20"
},
"shipping_discount": 0,
"subtotal_discount": 1197
},
"shipping_tax_percentage": 0,
"status": "new",
"user": {
"object": "website_user",
"id": 11,
"third_party_identifier": "",
"username": "xyzcorp"
}
},
{
"object": "order",
"id": 342,
"amount_paid": 0,
"content_catalog": 10119035,
"currency": "usd",
"date_created": "2018-03-06T18:37:08+00:00",
"is_pay_later": false,
"message": 43,
"order_type": "catalog",
"portal": 0,
"pricing": {
"object": "order_pricing",
"subtotal": 1995,
"subtotal_discount": 0,
"tax": 0,
"shipping": 0,
"shipping_discount": 0,
"total": 1995
},
"promo_code": null,
"shipping_tax_percentage": 0,
"status": "new",
"user": null
}
],
"meta": {
"pagination": {
"total": 8,
"count": 3,
"per_page": 3,
"current_page": 1,
"total_pages": 3
}
}
}