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
since (unix timestamp) Return all orders where order date is greater than {timestamp}
[
    {
        "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 order details

GET
/orders/order.json?orderID={order-id}
orderID required (OrderID) Unique id of your order
{
    "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,
    "transactionID": "txn_7VTA0Zn3iDFKF1",
	"iso": {
		"orderDate": "2015-12-10T10:04:28+0100"
	}
}

					

Get purchased products by orderID (Legacy)

GET
/orders/legacy_order.json?orderID={order-id}
orderID required (OrderID) Unique id of your order
{
    "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.
{
	"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)
{
    "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)
{
    "orderID": "132_5b8e84672f829",
    "nRemoved": 1
}
					

Order Tracking

Get information about order tracking

GET
/orders/tracking.json
orderID required (OrderID) Unique id of your order
{
    "url": "https://tracking.qapla.it/47026906299f3cfbd12e3d0a94bb9458",
    "courier": "BRT",
    "tracking": "1234567876543",
    "pickup_date": "2016-01-18"
}
					

Couriers List

Retrieve supported couriers

GET
/orders/couriers.json
[
    ...
    "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
{
    "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)

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

{
    "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
{
	"ok": 1
	"err": null
}
					

Order Event Timeline

Retrieve all events done on specified order

GET
/orders/timeline.json
orderID required (string)
[

    {
        "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"
    }
]