Orders
[base module url]/orders
This endpoint is used to retrieve orders placed within the shopping cart. Up to 50 records will be returned at a time within the "orders" envelope
Sort parameters ( ?sort=param,param,etc )
Default: -id
Parameter | Info | Asc/Desc |
---|---|---|
id | id number | Y |
created | Creation time | Y |
Filter parameters ( ?parameter=value¶meter=value&etc )
Default: none
Parameter | Info |
---|---|
page | Sets the current page to retrieve ( returned in sets of 50 ) |
id | id number. When used it will filter to >= that id |
created_on_after | created time >= the supplied time value. See supported time formats |
Sample Response
The "next_page" will contain an integer for the next page number to retrieve the next set of results using ?page. If "next_page" is false, there are no more pages of results to retrieve
{
"orders": [
{
"id": "54123",
"user_id": "628",
"user_email": "email@test.com",
"current_status": "Complete",
"order_num": "54123",
"order_description": "Site shopping order",
"customer_note": "",
"first_name": "Test",
"last_name": "Customer",
"phone": "801-755-9966",
"email": "email@test.com",
"total": "322.85",
"tax": "19.86",
"is_paid": true,
"payment_option": "Credit Card",
"payment_option_type": "authorize.net",
"payment_option_id": "16",
"payment_detail": "",
"check_num": "",
"check_date": "0000-00-00",
"transaction_id": "0",
"card_last_4": "0027",
"card_type": "Visa",
"billing_first_name": "Test",
"billing_last_name": "Customer",
"billing_phone": "801-755-9966",
"billing_email": "email@test.com",
"billing_address": "10 w broadway ste 701",
"billing_city": "salt lake city",
"billing_state": "UT",
"billing_zip": "84101",
"billing_country": "us",
"promo_code": "",
"promo_code_info": "",
"promo_code_discount": "0.00",
"promo_rule_info": "",
"promo_rule_info_admin": "",
"promo_rule_discount": "0.00",
"promo_rule_discount_shipping": "0.00",
"gift_cert_id": null,
"gift_cert_code": "",
"gift_cert_info": "",
"gift_cert_applied": "0.00",
"gift_cert_is_credit_voucher": true,
"shipping_option": "flat rate",
"shipping_cost": "13.00",
"shipping_first_name": "Test",
"shipping_last_name": "Customer",
"shipping_phone": "801-755-9966",
"shipping_company": "",
"shipping_address": "10 w broadway ste 701",
"shipping_address2": "",
"shipping_city": "salt lake city",
"shipping_state": "UT",
"shipping_zip": "84101",
"shipping_country": "us",
"is_fulfilled": false,
"notes": "",
"marketing_source_id": null,
"marketing_source_choice": "",
"marketing_source_other": "",
"admin_created": false,
"web_order": true,
"is_guest_checkout": false,
"created": "2015-04-27T17:34:31-0600",
"created_ip": "127.0.0.1",
"created_user_id": "628",
"modified": "",
"modified_user_id": null,
"line_items": [
{
"id": "3223",
"product_id": "16383",
"name": "Test Product",
"model": "",
"sku": "",
"description": "",
"cost": "289.99",
"quantity": "1",
"total_cost": "289.99",
"did_override_shipping_cost": false,
"total_override_shipping_cost": "0.00",
"is_gift_certificate": false,
"gift_cert_amount": "0.00",
"gift_cert_code": "",
"is_fulfilled": false,
"shipment_info": null
}
]
}
.......
],
"next_page": 3
}
Retrieve specific order
[base module url]/orders/[order id]
This endpoint is used to retrieve a specific order
Sample Response
{
"id": "54123",
"user_id": "628",
"user_email": "email@test.com",
"current_status": "Complete",
"order_num": "54123",
"order_description": "Site shopping order",
"customer_note": "",
"first_name": "Test",
"last_name": "Customer",
"phone": "801-755-9966",
"email": "email@test.com",
"total": "322.85",
"tax": "19.86",
"is_paid": true,
"payment_option": "Credit Card",
"payment_option_type": "authorize.net",
"payment_option_id": "16",
"payment_detail": "",
"check_num": "",
"check_date": "0000-00-00",
"transaction_id": "0",
"card_last_4": "0027",
"card_type": "Visa",
"billing_first_name": "Test",
"billing_last_name": "Customer",
"billing_phone": "801-755-9966",
"billing_email": "email@test.com",
"billing_address": "10 w broadway ste 701",
"billing_city": "salt lake city",
"billing_state": "UT",
"billing_zip": "84101",
"billing_country": "us",
"promo_code": "",
"promo_code_info": "",
"promo_code_discount": "0.00",
"promo_rule_info": "",
"promo_rule_info_admin": "",
"promo_rule_discount": "0.00",
"promo_rule_discount_shipping": "0.00",
"gift_cert_id": null,
"gift_cert_code": "",
"gift_cert_info": "",
"gift_cert_applied": "0.00",
"gift_cert_is_credit_voucher": true,
"shipping_option": "flat rate",
"shipping_cost": "13.00",
"shipping_first_name": "Test",
"shipping_last_name": "Customer",
"shipping_phone": "801-755-9966",
"shipping_company": "",
"shipping_address": "10 w broadway ste 701",
"shipping_address2": "",
"shipping_city": "salt lake city",
"shipping_state": "UT",
"shipping_zip": "84101",
"shipping_country": "us",
"is_fulfilled": false,
"notes": "",
"marketing_source_id": null,
"marketing_source_choice": "",
"marketing_source_other": "",
"admin_created": false,
"web_order": true,
"is_guest_checkout": false,
"created": "2015-04-27T17:34:31-0600",
"created_ip": "127.0.0.1",
"created_user_id": "628",
"modified": "",
"modified_user_id": null,
"line_items": [
{
"id": "3223",
"product_id": "16383",
"name": "Test Product",
"model": "",
"sku": "",
"description": "",
"cost": "289.99",
"quantity": "1",
"total_cost": "289.99",
"did_override_shipping_cost": false,
"total_override_shipping_cost": "0.00",
"is_gift_certificate": false,
"gift_cert_amount": "0.00",
"gift_cert_code": "",
"is_fulfilled": false,
"shipment_info": null
}
],
"statuses": [
{
"id": "187",
"status": "Complete",
"notes": "Order has been processed",
"notify_customer": false,
"created": "2015-07-15T08:50:07-0600",
"created_ip": "127.0.0.1",
"created_user_id": null,
"modified": "",
"modified_user_id": null
},
{
"id": "186",
"status": "Shipped",
"notes": "Order has been shipped",
"notify_customer": true,
"created": "2015-07-15T08:49:44-0600",
"created_ip": "127.0.0.1",
"created_user_id": null,
"modified": "",
"modified_user_id": null
},
{
"id": "185",
"status": "Processing",
"notes": "Order is processing",
"notify_customer": true,
"created": "2015-07-14T09:24:06-0600",
"created_ip": "127.0.0.1",
"created_user_id": "2",
"modified": "",
"modified_user_id": null
}
]
}
Update/add order status
[base module url]/orders/[order id]
Post a status object ( see below ) to the specific order endpoint to add a status update.
The status field should be an exact name from the available order statuses ( see http://www.sitedomain.com/admin/shopping_cart/status ).
The notes field can contain any text notes you want to have for that status update.
notify_customer should be set to true if you want the system to send an email notification to the customer about the status update.
The order response format above will be returned with the new status added on success, otherwise it will be returned without the status added and will contain a list of errors.
Sample Request Body - POST http method
{
"status": {
"status": "Shipped",
"notes": "Tracking #ABCDEFG",
"notify_customer": true,
}
}