Ecommerce Parcels


This method is used to fetch draft ecommerce parcel orders with a 50 per page pagination

Please note that this end-point has rate-limiting, therefore, it will only allow 20 requests per minute.

If you are using this endpoint within a loop we highly recommend adding a gap/delay between each iteration.

Endpoint

Method URI Headers
GET parcel-orders/ecommerce default
GET parcel-orders/ecommerce?start_date=xx-xx-xx&end_date=xx-xx-xx&platform=shopify default

Query Params

Method Type Required
start_date Date Y-m-d optional
end_date Date Y-m-d optional
platform String optional (must be one of shopify, ebay, walmart, bigcommerce, webflow, wix, zapier, shein, discogs, ecwid, paypal, newegg, neweggbusiness, woocommerce, prestashop, big_cartel, tiktok, squarespace, walmart_canada)
order_number String optional

Response

Field Type Description
success Boolean true or false
message String Message
data Array An array containing received rates or if request has failed an object containing validation errors
+from_address Object An object containing origin address details
+to_address Object An object containing destination address details
+package_list Array An array containing all packages with related details
+carrier String Carrier
+shipment_order_id Integer Related Shipment Order ID
+status String Status of the shipment (draft)
+created_at Date The date order was created in Y-m-d format
+platform String The platform order was received from
+platform_order_id String Related platform ID
+platform_order_number String Related platform number
+store Object An object detailing store information
links Object Object showing next/previous pages
meta Object Meta data of the current page pagination

Response Examples

Successful

{
    "success": true,
    "data": [
        {
            "from_address": {
                "name": "John Doe",
                "attention": "John Doe",
                "city": "City",
                "state": "CA",
                "zip": "123123",
                "country": "US",
                "telephone": "123123123123",
                "email": null,
                "is_residential": false,
                "street_1": "123 Example Street",
                "street_2": null,
                "street_3": null,
                "organisation_id": null,
                "id": null
            },
            "to_address": {
                "name": "Jane Doe",
                "attention": "Jane Doe",
                "city": "City",
                "state": "CA",
                "zip": "12123",
                "country": "US",
                "telephone": "123123123123",
                "email": null,
                "is_residential": false,
                "street_1": "123 Example Street",
                "street_2": null,
                "street_3": null
            },
            "package_list": [
                {
                    "count": 1,
                    "insurance": false,
                    "box_type": null,
                    "signature": "no_signature",
                    "reference_1": "AHL",
                    "reference_2": "",
                    "length": 0.1,
                    "width": 0.1,
                    "height": 0.1,
                    "weight": 0.02,
                    "items": [
                        {
                            "quantity": 1,
                            "price": 0,
                            "sku": "test",
                            "description": null,
                            "content_type": "merchandise",
                            "ecommerce_id": null,
                            "country_of_manufacture": "US"
                        }
                    ]
                }
            ],
            "carrier": null,
            "shipment_order_id": 123123123,
            "status": "draft",
            "created_at": "03-20-2023",
            "platform": "webflow",
            "platform_order_id": "1ab-2cd",
            "platform_order_number": "1ab-123123",
            "store": {
                "account": "account ID",
                "name": "Acme Store",
                "attention": "John Doe",
                "street_1": "123 Example Street",
                "street_2": null,
                "street_3": null,
                "city": "City",
                "state": "CA",
                "zip": "12123",
                "country": "US",
                "telephone": "123123123123"
            }
        }
    ],
    "links": {
        "first": "https://app.deftship.com/api/parcel-orders/ecommerce?start_date=2023-02-23&end_date=2023-05-23&page=1",
        "last": null,
        "prev": null,
        "next": "https://app.deftship.com/api/parcel-orders/ecommerce?start_date=2023-02-23&end_date=2023-05-23&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "https://app.deftship.com/api/parcel-orders/ecommerce",
        "per_page": 50,
        "to": 16
    }
}

Failed

{
    "success": false,
    "message": "The given data was invalid.",
    "data": {
        "end_date": [
            "The end date does not match the format Y-m-d."
        ]
    }
}
{
    "success": false,
    "message": "Too Many Requests! Please slow down"
}