Orders API
When customers purchase products from a site's store an order is created. An order contains order items that represent the products the customer purchased. Orders can have one or more shipments and shipment transactions that show the charges for shipping. Orders also include billings, which are the payment methods and billing addresses, as well as billing transactions which are the actual charges.
Orders can also be associated with coupons and discounts used with the order, as well as notes that the customer may have left for the store owner.
Orders can also be associated with coupons and discounts used with the order, as well as notes that the customer may have left for the store owner.
Note: To authenticate with the Weebly API, you need to use OAuth. This will allow you to access resources based on a particular user and site.
In this topic:
Fields
The following table shows all fields that exist for this API and those that are returned when you retrieve a list. All fields are returned when you retrieve a single item.
Name |
Description |
Type |
List |
user_id |
Unique ID of the user authenticated during the OAuth process |
string |
X |
site_id |
ID of a Weebly site, unique to the currently authenticated user |
string |
X |
order_id |
The unique order id (within the store) of the order |
string |
X |
order_date |
The date that the order was placed |
Unix timestamp in GMT |
X |
full_name |
Full name of the person who placed the order, as entered during checkout. |
string |
X |
order_status |
The order status. Valid values are:
|
string |
X |
order_currency |
Currency used for this order |
string |
X |
order_item_tax_ total |
Total tax charged for all items |
decimal |
|
order_tax_total |
Total tax charged for this order |
decimal |
|
order_tax_rates |
An object that breaks down the total_tax for the order into an array of the different tax rates for the order. For example, an order that has both state and local taxes charged on a $100 order might have this: { "total_tax": 8.50, "rates": [ {"name": "State", "rate": 0.075, "amount":7.5 }, {"name": "City", "rate": 0.010, "amount": 1.0 } ] } |
object |
|
order_shipping_total |
Total amount of shipping charged for this order |
decimal |
|
order_shipping_taxes_ total |
Total amount of tax charged against shipping |
integer |
|
order_shipping_subtotal |
Amount of shipping charged before any shipping tax |
integer |
|
order_shipping_method |
The method used to ship the order. These are defined by the store owner when they configure their shipping rates. |
string |
|
order_subtotal |
Amount of order before taxes and shipping charges |
decimal |
|
order_total |
Amount of order, including taxes and shipping charges |
integer |
X |
order_notes |
Notes entered by the customer when the order was placed |
string |
|
items |
An array of order items |
array |
|
shipments |
An array of order shipments |
array |
|
billings |
An array of order billings |
array |
|
coupons |
An array of coupons used on this order |
array |
|
is_marketing_updates_ subscribed |
Whether or not the customer of this order elected to receive marketing updates. Valid values are:
|
boolean |
|
created_date |
Date the customer first created the order |
Unix timestamp in GMT |
|
updated_date |
Date the order was last updated. |
Unix timestamp in GMT |
Note: Any fields returned that are not documented are currently unsupported and can be safely ignored.
Retrieve a List of Orders for a Site
Endpoint URL
Returns all orders created for this site.
Scope: read:store-orders
Query Parameters
Parameter |
Description |
Type |
page |
Which page of results to return. Start is 1. Note: Only the first 25 results are returned by default. If the result set is expected to be over 25, you must implement pagination. |
integer |
limit |
Number of results per page to return. Default is 25. Max is 200. |
integer |
query |
Use to retrieve only orders that have a full-text match with the query string. |
string |
filterby |
Field name to set a filter on. |
string |
filterfor |
Value to search the filterby field for. You can use the following URL encoded operators with your filterfor parameter:
|
string |
sortby |
Field to sort on. You can sort on order_date. |
string |
sortdir |
Sort direction. Valid values are:
|
string |
Request
Example returning all orders:
Example of filtered request
Response
Example response
Retrieve the Number of Orders for a Site
Enpoint URL
Returns the number of non-deleted orders for a store.
Scope: read:store-orders
Scope: read:store-orders
Request
Example request
Response
Example response
Retrieve Details for an Order
Enpoint URL
Returns the details for an order.
Scope: read:store-orders
Scope: read:store-orders
Request
Example request
Response
See Fields table. All fields for the order are returned.
Example response