Get Order

We will make a GET request from eCommerce Webship to the endpoint you specify in your Get Order URL field, which should return a JSON structure with a single order as a JSON object. This endpoint is used to retrieve an updated order from your system if you have created a partial fulfillment in Webship and have enabled "Support Partial Shipments" in your Webhooks integration settings (see fig. 1).

Gear Icon

REST Endpoint

GET [/your-custom-get-order-endpoint]?orderId=[orderId]

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
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
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 code
receiver.phone string Ten digit phone number
shippingService string or null Shipping service selected (used for shipping service mapping and shows up on ship screen when order is selected)
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

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