Orders

Add, edit, and delete anything related to orders.

Order

order_id
integer

The order ID for the WP EasyCart. Leave blank if adding new or updating your order.

order_date
string <date-time>

The order date and time in format YYYY-MM-DD HH:MM:SS

object (OrderStatus)
guest_key
string

The unique key for an order to be viewed without having to log into the user account.

subscription_id
integer

The subscription ID if this connects to a subscription order.

viewed
boolean

The control if this order has been viewed

success_page_shown
boolean

This helps prevent double calls of javascript on success page view.

weight
number

The order status ID

promocode
string

The coupon code, if used for this order

giftcard
string

The gift card ID, if used for this order

order_notes_admin
string

The admin order notes.

order_notes_customer
string

The customer order notes.

object (Totals)
object (TaxRates)
object (Shipping)
object (User)
object (Payment)
object (Gateway)
object (QuickbooksOrder)
object (Terms)
{
  • "order_id": 0,
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}

OrderRequest

order_date
string <date-time>

The order date and time in format YYYY-MM-DD HH:MM:SS

object (OrderStatus)
guest_key
string

The unique key for an order to be viewed without having to log into the user account.

subscription_id
integer

The subscription ID if this connects to a subscription order.

viewed
boolean

The control if this order has been viewed

success_page_shown
boolean

This helps prevent double calls of javascript on success page view.

weight
number

The weight of the entire order, typically used for shipping rates.

promocode
string

The coupon code, if used for this order

giftcard
string

The gift card ID, if used for this order

order_notes_admin
string

The admin order notes.

order_notes_customer
string

The customer order notes.

object (Totals)
object (TaxRates)
object (Shipping)
object (User)
object (Payment)
object (Gateway)
object (Quickbooks)
object (Terms)
{
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}

Gets a list of orders

This allows you to get a list of orders

SecuritybearerAuth or basicAuth
Request
query Parameters
page
integer <int64>

Page number starting at 1

perpage
integer <int64>

Number of items per page

sortby
string

Sort results by term. Valid values are order_id, billing_last_name, billing_first_name, shipping_last_name, shipping_first_name, order_date, orderstatus_id, last_updated, or user_id.

sortdir
string

Sort results ASC or DESC

user_id
integer <int64>

Get orders by user id

order_id
integer <int64>

Get orders by order id

search
string

Filter orders by a search term

email
string

Filter orders by a email address

Responses
200

Successful operation

400

Unauthorized

get/orders
Request samples
Response samples
application/json
[
  • {
    }
]

Add an order

This allows you to add a new order

SecuritybearerAuth
Request
Request Body schema: application/json
required

Submit any or all elements of an order to add a new order.

order_date
string <date-time>

The order date and time in format YYYY-MM-DD HH:MM:SS

object (OrderStatus)
guest_key
string

The unique key for an order to be viewed without having to log into the user account.

subscription_id
integer

The subscription ID if this connects to a subscription order.

viewed
boolean

The control if this order has been viewed

success_page_shown
boolean

This helps prevent double calls of javascript on success page view.

weight
number

The weight of the entire order, typically used for shipping rates.

promocode
string

The coupon code, if used for this order

giftcard
string

The gift card ID, if used for this order

order_notes_admin
string

The admin order notes.

order_notes_customer
string

The customer order notes.

object (Totals)
object (TaxRates)
object (Shipping)
object (User)
object (Payment)
object (Gateway)
object (Quickbooks)
object (Terms)
Responses
200

Successful operation

400

Unauthorized

post/orders
Request samples
application/json
{
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}
Response samples
application/json
{
  • "order_id": 0,
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}

Gets an order by ID

This allows you to get an order from your store by Order ID

SecuritybearerAuth or basicAuth
Request
path Parameters
order_id
required
integer <int64>

Order ID

Responses
200

Successful operation

400

Unauthorized

get/orders/{order_id}
Request samples
Response samples
application/json
{
  • "order_id": 0,
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}

Updates an order by ID

This allows you to update an order by Order ID

SecuritybearerAuth
Request
path Parameters
order_id
required
integer <int64>

Order ID

Request Body schema: application/json
required

Submit any or all elements of an order to update the order by ID.

order_date
string <date-time>

The order date and time in format YYYY-MM-DD HH:MM:SS

object (OrderStatus)
guest_key
string

The unique key for an order to be viewed without having to log into the user account.

subscription_id
integer

The subscription ID if this connects to a subscription order.

viewed
boolean

The control if this order has been viewed

success_page_shown
boolean

This helps prevent double calls of javascript on success page view.

weight
number

The weight of the entire order, typically used for shipping rates.

promocode
string

The coupon code, if used for this order

giftcard
string

The gift card ID, if used for this order

order_notes_admin
string

The admin order notes.

order_notes_customer
string

The customer order notes.

object (Totals)
object (TaxRates)
object (Shipping)
object (User)
object (Payment)
object (Gateway)
object (Quickbooks)
object (Terms)
Responses
200

Successful operation

400

Unauthorized

patch/orders/{order_id}
Request samples
application/json
{
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}
Response samples
application/json
{
  • "order_id": 0,
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}

Deletes an order by ID

This allows you to delete an order from your store by Order ID

SecuritybearerAuth
Request
path Parameters
order_id
required
integer <int64>

Order ID

Responses
200

Successful operation

400

Unauthorized

delete/orders/{order_id}
Request samples
Response samples
application/json
{
  • "order_id": 0,
  • "order_date": "2019-08-24T14:15:22Z",
  • "order_status": {
    },
  • "guest_key": "string",
  • "subscription_id": 0,
  • "viewed": true,
  • "success_page_shown": true,
  • "weight": 0,
  • "promocode": "string",
  • "giftcard": "string",
  • "order_notes_admin": "string",
  • "order_notes_customer": "string",
  • "totals": {
    },
  • "taxrates": {
    },
  • "shipping": {
    },
  • "user": {
    },
  • "payment": {
    },
  • "gateway": {
    },
  • "quickbooks": {
    },
  • "terms": {
    }
}