List Orders

We will make a GET request from eCommerce Webship to the endpoint you specify in your List Orders URL field which should return a JSON structure with an array of orders that are ready to be shipped.

REST Endpoint

GET [/your-custom-list-orders-endpoint]

Explanation of Expected Response Fields

Field Type Description
orderId string Unique order id
orderNumber string or null Order number shown to customer
orderDate unix-timestamp Date order was placed
customerNotes string Notes provided by customer
dueByDate YYYY-MM-DD (optional) Date that will show up in the order list of the ship screen
sender object sender address
sender.company string Sender company name
sender.name string Sender name
sender.address1 string First line of sender address
sender.address2 string Second line of sender address
sender.city string Sender city
sender.state string Sender state
sender.zip string Sender zip code
sender.country string Two character country code
sender.phone string Ten digit phone number
sender.email string Sender email
receiver object receiver address
receiver.company string Receiver company name
receiver.name string Receiver name
receiver.address1 string First line of receiver address
receiver.address2 string Second line of receiver address
receiver.city string Receiver city
receiver.state string Receiver state
receiver.zip string Receiver zip code
receiver.country string Two character country cod
receiver.phone string Ten digit phone number
receiver.email string Receiver email
returnTo object return to address (optional)
returnTo.company string Return to company name
returnTo.name string Return to name
returnTo.address1 string First line of return to address
returnTo.address2 string Second line of return to address
returnTo.city string Return to city
returnTo.state string Return to state
returnTo.zip string Return to zip code
returnTo.country string Two character country cod
returnTo.phone string Ten digit phone number
returnTo.email string Return to email
shippingService string or null Shipping service selected (used for shipping service mapping and shows up on ship screen when order is selected)
shipperReference string or null Text that will show up on shipping label in the reference field. If nothing is specified, order number will be used. If no order number exists, order id will be used
shipping_total decimal-as-string or null Customer cost of shipping
weightUnit "kg" or "lb" or null weight unit of each item
items array items in order
item.productId string or null product id
item.sku string or null product sku
item.title string or null product title
item.price decimal-as-string or null item price
item.quantity positive-integer or null item quantity
item.weight decimal-as-string or null item weight
item.imgUrl string or null item image url
packages array packages in order
package.weight decimal-as-string or null package weight
package.length decimal-as-string or null package length
package.width decimal-as-string or null package width
package.height decimal-as-string or null package height
package.insuranceAmount decimal-as-string or null package insuranceAmount
package.declaredValue decimal-as-string or null package declaredValue

Expected Response Status Code

200 OK

Expected Response Content Type

application/json

Response JSON Example

{
    "orders": [
        {
            "orderId": "5210320",
            "status": "pending",
            "dueByDate": "2015-11-30",
            "orderNumber": null,
            "orderDate": 1444148650,
            "receiver": {
                "name": "Al Borland",
                "address1": "4020 N Williams Ave",
                "city": "Claremont",
                "state": "California",
                "zip": 91711,
                "country": "US",
                "phone": "8888881234"
            },
            "shippingService": "Priority Overnight",
            "shipping_total": "15.89",
            "weightUnit": "lb",
            "items": [
                {
                    "productId": "1234",
                    "sku": "1234",
                    "title": "Wiffle Balls",
                    "price": "9.99",
                    "quantity": "3",
                    "weight": "5",
                    "imgUrl": "http://example.com/balls.jpg"
                },
                {
                    "productId": "4321",
                    "sku": "4321",
                    "title": "Junk",
                    "price": "4.99",
                    "quantity": "20",
                    "weight": "2",
                    "imgUrl": "http://example.com/junk.jpg"
                },
                {
                    "productId": "777",
                    "sku": "777",
                    "title": "Lucky",
                    "price": ".77",
                    "quantity": "1",
                    "weight": "7",
                    "imgUrl": null
                }
            ]
        },
        {
            "orderId": "5937960",
            "status": "pending",
            "dueByDate": "2014-11-29",
            "orderNumber": null,
            "orderDate": 1444148650,
            "receiver": {
                "company": "Rocksolid Internet",
                "name": "Al Borland",
                "address1": "1880 FooBar Dr",
                "city": "La Cucaracha",
                "state": "California",
                "zip": 91711,
                "country": "US",
                "phone": "8888881234"
            },
            "shippingService": "Priority Overnight",
            "shipping_total": "5.15",
            "weightUnit": "lb",
            "items": [
                {
                    "productId": "7894",
                    "sku": "7894",
                    "title": "Business Cards",
                    "price": "5.89",
                    "quantity": "1000",
                    "weight": ".01",
                    "imgUrl": "http://example.com/cards.jpg"
                }
            ]
        },
        {
            "orderId": "5436325",
            "status": "pending",
            "orderNumber": null,
            "orderDate": 1453273200,
            "receiver": {
                "name": "Ello Mate",
                "address1": "Bondi Beach",
                "city": "La Cucaracha",
                "state": "New South Wales",
                "zip": 2026,
                "country": "AU",
                "phone": "8888881234"
            },
            "shippingService": "Priority Overnight",
            "shipping_total": "5.15",
            "weightUnit": "lb",
            "items": [
                {
                    "productId": "4321",
                    "sku": "4321",
                    "title": "Junk",
                    "price": "4.99",
                    "quantity": "20",
                    "weight": "2",
                    "imgUrl": "http://example.com/junk.jpg"
                }
            ]
        }
    ]
}