Create. API

Orders

Access Levels
Group: shop, order_managment
Resource: orders

Order statuses

These endpoints use the following values to represent the status of an order:

List all orders

GET 	https://api.create.net/orders

Input

GET 	https://api.create.net/orders?date_purchased__from=2010-04-07%2018:08:14
Param Type Required Description
date_purchased__from datetime Optional Orders after a certain date
yyyy-mm-dd hh:mm:ss
date_purchased__to datetime Optional Orders up to a certain date
yyyy-mm-dd hh:mm:ss
status INT Optional Get orders by status
1 = X, 2 = X etc
customer_id INT Optional Get orders from a single customer

Response

Status: 200 OK
{ "orders" :[
	{
		"ID" : 42050,
		"customer_details" : [
			{
				"ID" : 0,
				"email" : "name@example.com",
				"first_name" : "John",
				"last_name" : "Doe",
				"company" : "",
				"address1" : "45 Topic Street",
				"address2" : "",
				"address3" : "",
				"city" : "Brighton",
				"county" : "East Sussex",
				"postcode" : "BN1 7TY",
				"country" : "United Kingdom"
				"phone" : "01234 567890"
			}
		],
		"delivery_details" : [
			{
				"first_name" : "John",
				"last_name" : "Doe",
				"company" : "",
				"address1" : "45 Topic Street",
				"address2" : "",
				"address3" : "",
				"city" : "Brighton",
				"county" : "East Sussex",
				"postcode" : "BN1 7TY",
				"country" : "United Kingdom"
				"phone" : "01234 567890",
				"email" : "name@example.com"
			}
		],
		"date_purchased" : "2012-10-02",
		"order_total" : "25.99",
		"order_currency" : "GBP",
		"shipping_method" : "Standard Postage",
		"shipping_total" : "2.98",
		"tax_total" : "0.00",
		"status" : 2,
		"sub_status" : "",
		"gateway" : "PayPal",
		"gateway_transaction_id" : "3377373820382646",
		"notes" : "",
		"discount_amount" : "",
		"discount_text" : "",
		"referrer" : "smithssweets.co.uk",
    "opt_in" : true
	}
]}

Get a single order

GET 	https://api.create.net/orders/:id

Response

Status: 200 OK
{ "order" :
	{
		"ID" : 42050,
		"customer_details" : [
			{
				"ID" : 0,
				"email" : "name@example.com",
				"first_name" : "John",
				"last_name" : "Doe",
				"company" : "",
				"address1" : "45 Topic Street",
				"address2" : "",
				"address3" : "",
				"city" : "Brighton",
				"county" : "East Sussex",
				"postcode" : "BN1 7TY",
				"country" : "United Kingdom"
				"phone" : "01234 567890"
			}
		],
		"delivery_details" : [
			{
				"first_name" : "John",
				"last_name" : "Doe",
				"company" : "",
				"address1" : "45 Topic Street",
				"address2" : "",
				"address3" : "",
				"city" : "Brighton",
				"county" : "East Sussex",
				"postcode" : "BN1 7TY",
				"country" : "United Kingdom"
				"phone" : "01234 567890",
				"email" : "name@example.com"
			}
		],
		"date_purchased" : "2012-10-02",
		"order_total" : "25.99",
		"order_currency" : "GBP",
		"shipping_method" : "Standard Postage",
		"shipping_total" : "2.98",
		"tax_total" : "0.00",
		"status" : 2,
		"sub_status" : "",
		"gateway" : "PayPal",
		"gateway_transaction_id" : "3377373820382646",
		"notes" : "",
		"discount_amount" : "",
		"discount_text" : "",
		"referrer" : "smithssweets.co.uk",
    "opt_in" : true
	}
}

Update an order

PUT 	https://api.create.net/orders/:id

Input

The request can either be sent as a form post or JSON. The structure is the same as a single order and all fields are optional

{
	"customer_details" : [
		{
			"ID" : 0,
			"email" : "name@example.com",
			"first_name" : "John",
			"last_name" : "Doe",
			"company" : "",
			"address1" : "45 Road Street",
			"address2" : "",
			"address3" : "",
			"city" : "Brighton",
			"county" : "East Sussex",
			"postcode" : "BN1 7TY",
			"country" : "United Kingdom"
			"phone" : "01234 567890"
		}
	],
	"delivery_details" : [
		{
			"first_name" : "John",
			"last_name" : "Doe",
			"company" : "",
			"address1" : "45 Road Street",
			"address2" : "",
			"address3" : "",
			"city" : "Brighton",
			"county" : "East Sussex",
			"postcode" : "BN1 7TY",
			"country" : "United Kingdom"
			"phone" : "01234 567890",
			"email" : "name@example.com"
		}
	],
	"date_purchased" : "2012-10-02",
	"order_total" : "25.99",
	"order_currency" : "GBP",
	"shipping_method" : "Standard Postage",
	"shipping_total" : "2.98",
	"tax_total" : "0.00",
	"status" : 2,
	"sub_status" : "",
	"gateway" : "PayPal",
	"gateway_transaction_id" : "3377373820382646",
	"notes" : "",
	"discount_amount" : "",
	"discount_text" : "",
	"referrer" : "",
}

Response

Status: 200 OK