Storeden Developers

Orders API

Current version: v1.1

List orders

List orders in any status

GET
/orders/list.json
limit (int) Limit the number of orders to return. Default 10
skip (int) Elements to skip starting from 0. Default 0
status (int) Please refer to /orders/statuses.json to get correct value
since (unix timestamp) Return all orders where order date is greater than {timestamp}
from (unix timestamp) Nov 04th, 2020 Return all orders where order date is greater than {timestamp}. Must be used with to param.
to (unix timestamp) Nov 04th, 2020 Return all orders where order date is lower than {timestamp}. Must be used with from param.
orderID[] (string) Nov 04th, 2020 Search one or more specified orderID.
nodes (string) Accepted values billing.fullname,billing.email and short_id separated with ,
billing.email (string) May 31st, 2019 Filter orders by buyer email
billing.fullname (string) May 31st, 2019 Filter orders by buyer fullname

Repeating fields with green left border, permit you to search for more orderID.

List orders Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/list.json?limit=10&skip=0&since=...');
					
List orders Response

[
    {
        "orderID": "132_5672eebab5aa6",
        "total": 45.25,
        "orderDate": "2015-12-17T18:19:54+0100",
        "status": 3,
		"iso": {
			"orderDate": "2015-12-17T18:19:54+0100"
		}
    },
    {
        "orderID": "132_56695c3c0a3be",
        "total": 117.5,
        "orderDate": "2015-12-10T12:04:28+0100",
        "status": 4,
		"iso": {
			"orderDate": "2015-12-10T12:04:28+0100"
		}
    },
    ...
]
					

Get updated Orders

List all orders updated in a defined time-span

Api throttling

You have a limit of 5 requests every 60 seconds. All requests made over 5 requests in 60 seconds span, your call will be throttle and an HTTP 429 Too Much Requests error is returned.
On response headers you can find a X-Storeden-Limit header with left-usage/assigned-quota.

GET
/orders/orders_filter.json
updated_from required(unix timestamp) Return all orders where an event occur in date greater than {timestamp}
updated_to (unix timestamp) Return all orders where an event occur in date lower than {timestamp}.
If empty, updated_to will be setted with "now" value
nodes (string) Accepted values billing.fullname,billing.email and short_id separated with ,
Get updated Orders Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/orders_filter.json=nodes=short_id');
					
Get updated Orders Response

{
    "count": 3,
    "filter": {
        "updated_from": "2020-11-03T11:13:20+01:00",
        "updated_to": "2020-11-15T15:26:18+01:00"
    },
    "orders": [
        {
            "orderID": "132_5fa514919c121",
            "total": 105.99,
            "orderDate": "2020-11-06T10:17:05+0100",
            "status": 0,
            "locale": "it_IT",
            "events": [
                {
                    "eventId": 1,
                    "iso_date": "2020-11-06T10:17:16+01:00"
                }
            ],
            "iso": {
                "orderDate": "2020-11-06T10:17:05+0100"
            }
        },
        ...
	]
}
					

Get order details

GET
/orders/order.json?orderID={order-id}
orderID required (OrderID) Unique id of your order
Get order details Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/order.json?orderID=132_56695c3c0a3be');
					
Get order details Response

{
    "orderID": "132_56695c3c0a3be",
    "billing": {
        "addr1": "Times Square",
        "addr2": "",
        "city": "New York",
        "email": "no-reply@storeden.com",
        "fullname": "Times Square",
        "country": "119",
        "phone": "+1/xxxxxxxxxxx",
        "principal": 1,
        "state": "13637",
        "userUID": -1,
        "vat": "IT04214670269",
        "zip": "NY 10036"
    },
    "delivery": {
        "addr1": "Times Square",
        "addr2": "",
        "city": "New York",
        "email": "no-reply@storeden.com",
        "fullname": "Times Square",
        "country": "119",
        "phone": "+1/xxxxxxxxxxx",
        "principal": 1,
        "state": "13637",
        "userUID": -1,
        "vat": "IT04214670269",
        "zip": "NY 10036"
    },
    "cart": {
        "total": 117.5,
        "items": {
            "105251#|#xl_red": {
                "count": 1,
                "price": 110,
                "options": "xl_red",
                "title": "Product with size XL and color RED",
                "sku": ""
            }
        },
        "couponCode": "",
        "saleAmount": 0.00,
        "shippingAmount": 7.5,
        "shippingProfile": "Corriere Espresso Standard",
        "paymentAmount": 0,
        "paymentProfile": "credit-card",
        "checkouted": true,
        "userUID": -1,
    },
    "total": 117.5,
    "userUID": -1,
    "orderDate": {
        "sec": 1449745468,
        "usec": 65000
    },
    "method": "Corriere Espresso Standard",
    "payment": "credit-card",
    "status": 4,
	"message": "Message to the seller",
    "transactionID": "txn_7VTA0Zn3iDFKF1",
	"iso": {
		"orderDate": "2015-12-10T10:04:28+0100"
	},
	"customer": {
        "id": "5d5d09e5e21692eca2601968"
    }
}

					

Get purchased products by orderID (Legacy)

GET
/orders/legacy_order.json?orderID={order-id}
orderID required (OrderID) Unique id of your order
Get purchased products by orderID (Legacy) Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/legacy_order.json?orderID=132_56695c3c0a3be');
					
Get purchased products by orderID (Legacy) Response

{
    "orderID": "132_56695c3c0a3be",
    "billing": {
        "addr1": "Times Square",
        "addr2": "",
        "city": "New York",
        "email": "no-reply@storeden.com",
        "fullname": "Times Square",
        "country": "119",
        "phone": "+1/xxxxxxxxxxx",
        "principal": 1,
        "state": "13637",
        "userUID": -1,
        "vat": "IT04214670269",
        "zip": "NY 10036"
    },
    "delivery": {
        "addr1": "Times Square",
        "addr2": "",
        "city": "New York",
        "email": "no-reply@storeden.com",
        "fullname": "Times Square",
        "country": "119",
        "phone": "+1/xxxxxxxxxxx",
        "principal": 1,
        "state": "13637",
        "userUID": -1,
        "vat": "IT04214670269",
        "zip": "NY 10036"
    },
    "cart": {
        "total": 117.5,
        "items": [
            {
                "count": 1,
                "price": 110,
                "options": "xl_red",
                "title": "Product with size XL and color RED",
                "sku": "",
                "product_uid": 105251,
                "product_endpoint": "https://connect.storeden.com/v1.1/products/product.json?uid=105251"
            }
        ],
        "couponCode": "",
        "saleAmount": 0.00,
        "shippingAmount": 7.5,
        "shippingProfile": "Corriere Espresso Standard",
        "paymentAmount": 0,
        "paymentProfile": "credit-card",
        "checkouted": true,
        "userUID": -1,
    },
    "total": 117.5,
    "userUID": -1,
    "orderDate": {
        "sec": 1449745468,
        "usec": 65000
    },
    "method": "Corriere Espresso Standard",
    "payment": "credit-card",
    "status": 4,
    "transactionID": "txn_7VTA0Zn3iDFKF1",
	"iso": {
		"orderDate": "2015-12-10T10:04:28+0100"
	}
}
					

Update order status

PUT
/orders/order.json
orderID required (orderID) Unique id of your order
status required (int) New order status. Valid orders can be retrieved with Orders statues
courier (string) If order status is equal to 3 you can specify which courier you are using to fulfill this order.
A supported list can be found with: Couriers
tracking (string) Tracking number of order shipping
pickup_date (string) yyyy-mm-dd Mandatory field if tracking and courier are setted
tracking_url (string) Public shipping tracking url.
Update order status Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['orderID'] = '132_56695c3c0a3be';
$payload['status'] = 2;
// etc...

$result = $storeden->put('/orders/order.json', $payload);
					
Update order status Response

{
	"ok": 1,
	"err": null
}
					

Add Tag to Order

POST
/orders/tags.json
orderID required (orderID) Unique id of your order
tags required (string) Tags. To insert multiple tags use "," so separate each word (string)
Add Tag to Order Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['orderID'] = '132_5b8e84672f829';
$payload['tags'] = 'tag_1,tag_2';

$result = $storeden->post('/orders/tags.json', $payload);
					
Add Tag to Order Response

{
    "orderID": "132_5b8e84672f829",
    "nAdded": 1
}
					

Remove Tag to Order

DELETE
/orders/tags.json
orderID required (orderID) Unique id of your order
tags required (string) Tags. To remove multiple tags use "," so separate each word (string)
Remove Tag to Order Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['orderID'] = '132_5b8e84672f829';
$payload['tags'] = 'tag_1,tag_2';

$result = $storeden->delete('/orders/tags.json', $payload);
					
Remove Tag to Order Response

{
    "orderID": "132_5b8e84672f829",
    "nRemoved": 1
}
					

Order Tracking

Get information about order tracking

GET
/orders/tracking.json
orderID required (OrderID) Unique id of your order
Order Tracking Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/tracking.json?orderID=132_5b8e84672f829');
					
Order Tracking Response

{
    "url": "https://tracking.qapla.it/47026906299f3cfbd12e3d0a94bb9458",
    "courier": "BRT",
    "tracking": "1234567876543",
    "pickup_date": "2016-01-18"
}
					

Couriers List

Retrieve supported couriers

GET
/orders/couriers.json
Couriers List Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/couriers.json');
					
Couriers List Response

[
    ...
    "TNT": {
        "code": "TNT",
        "name": "TNT",
        "country": "global"
    },
    ...
    "UPS": {
        "code": "UPS",
        "name": "UPS",
        "country": "global"
    },
    ...
]
					

Order statuses

List all supported order statuses

GET
/orders/statuses.json
Order statuses Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/statuses.json');
					
Order statuses Response

{
    "opened": {
        "0": "Pending Payment",
        "1": "Order Paid"
    },
    "processing": {
        "2": "Preparation",
        "3": "Sent",
        "4": "Delivered"
    },
    "closed": {
        "5": "Closed",
        "6": "Archived\/Deleted",
        "7": "Aborted"
    },
    "aftersale": {
        "8": "AfterSale"
    }
}

					

Create a new Order

This API permit you to insert a plain order beta

POST
/orders/order.json
delivery_fullname required (string) User Delivery Address Fullname
DeliveryObject input
delivery_email required (string) User Delivery Address Email
DeliveryObject input
delivery_address required (string) User Delivery Address
DeliveryObject input
delivery_phone required (string) User Delivery Address Phone Number
DeliveryObject input
delivery_city required (string) User Delivery Address City
DeliveryObject input
delivery_postal_code required (string) User Delivery Address Postal Code
DeliveryObject input
delivery_state required (string) User Delivery Address State
DeliveryObject input
delivery_country required (string length="2") User Delivery Address Country (pass Iso codes)
DeliveryObject input
billing_fullname required (string) BillingObject input
billing_email required (string) BillingObject input
billing_address required (string) BillingObject input
billing_phone required (string) BillingObject input
billing_city required (string) BillingObject input
billing_postal_code required (string) BillingObject input
billing_state required (string) BillingObject input
billing_country required (string length="2") BillingObject input
shipping_flag (string:preset) If setted to not_required, BillingObject & DeliveryObject are not required
item_id[n][price] required (float) Item price
item_id[n][quantity] required (int) Item quantity added to cart
item_id[n][title] (string) Item viewable title
item_id[n][sku] required (string) Item SKU
item_id[n][options] (string) Variants superkey
shipping_method required (string) Shipping Method for order Fullfilment ( can be passed any string )
shipping_cost required (string) Shipping Cost ( >= 0)
payment_method required (string) Gateway for order payment
payment_cost (float) [default = 0] Additional cost for using the specified payment method
coupon_code (string) Optionally used coupon code
coupon_amount (float) [default = 0] Additional cost for using the specified payment method
require_invoice (float) [default = 0] Set to 1 to require invoice for this order
digital_invoice (associative array) Available only if require_invoice setted to 1
Fields:
type Set digital invoice type: person or company
company_vat_number Vat number for invoice ( only for type company)
company_pec_address Pec email for invoice ( only for type company)
company_unique_code Unique AdE code ( only for type company)
person_tax_number Fiscal code ( only for type person)
person_pec_address Pec email for invoice ( only for type person)
currency (string) [default = Store Currency] Jul 17st, 2019 Available currency: EUR,USD,GBP
timestamp (unix-timestamp) [default = currenct time] Jul 17st, 2019

Repeating fields with green left border, permit you to insert more items per order.

Create a new Order Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['delivery_fullname'] = 'Delivery Fullname';
$payload['delivery_email'] = 'delivery@email...';
$payload['delivery_address'] = 'Delivery address...';
$payload['delivery_phone'] = '+39 000 0000';
// etc...

$result = $storeden->post('/orders/order.json', $payload);
					
Create a new Order Response

{
    "order_id": "30_55bb7bdg344983ce"
}
					

Remove order from Shop

Remove specified order from shop

DELETE
/orders/order.json
orderID required (string)
authorization_code required (string) A valid authorization_code must be specified to remove order from shop data-warehouse
Remove order from Shop Request

$storeden = new Storeden\Storeden($config);

$payload = array();
$payload['orderID'] = '30_55bb7bdg344983ce';
$payload['authorization_code'] = '...';

$result = $storeden->delete('/orders/order.json', $payload);
					
Remove order from Shop Response

{
	"ok": 1
	"err": null
}
					

Order Event Timeline

Retrieve all events done on specified order

GET
/orders/timeline.json
orderID required (string)
Order Event Timeline Request

$storeden = new Storeden\Storeden($config);
$result = $storeden->get('/orders/timeline.json?orderID=30_55bb7bdg344983ce');
					
Order Event Timeline Response

[

    {
        "status": 1,
        "ip": "10.28.91.167",
        "ts": 1532527619,
        "iso_date": "2018-07-25T16:06:59+02:00"
    },
    {
        "status": 2,
        "ip": "10.28.91.167",
        "ts": 1539879289,
        "iso_date": "2018-10-18T18:14:49+02:00"
    },
    {
        "status": 4,
        "ip": "172.16.100.234",
        "ts": 1539879293,
        "iso_date": "2018-10-18T18:14:53+02:00"
    },
    {
        "status": 7,
        "ip": "10.28.1.4",
        "ts": 1539879296,
        "iso_date": "2018-10-18T18:14:56+02:00"
    }
]