List
Obtains a list of shipments that match the specified criteria. All of the available filters are optional. They do not need to be included in the URL.
HTTP Request
GET /api/v1/shipments/
Parameters
Attribute | Required | Type | Specification |
---|---|---|---|
per_page | optional | integer | Requested page size. Max value is 500. Defaults to 100 |
page | optional | integer | Page Number |
purchased | optional | boolean | Only include Shipments that have been purchased. |
start_date | optional | string | Returns Shipments that were created after the specified date |
end_date | optional | string | Returns Shipments that were created before the specified date |
Example
{
per_page: 20
page: 5
purchased: true
start_date: 2021-10-02
end_date: 2021-10-04
}
{
"data": [
{
"id": 18175,
"from_address": {
"id": 109,
"company": "Labelnship Corp",
"contact_name": "Labelnship Corp",
"email": null,
"phone": "514-555-5555",
"address_1": "22 Atlas Ave",
"address_2": null,
"city": "York",
"province_state": "ON",
"country": "CA",
"zip_postal": "L4J3J8",
"residential": null,
"created_at": "2021-10-03T21:29:42.000000Z",
"updated_at": "2021-10-03T21:29:42.000000Z"
},
"to_address": {
"id": 110,
"company": "Client Corp",
"contact_name": "Mr Client",
"email": null,
"phone": "416-555-5555",
"address_1": "390 Bay St",
"address_2": null,
"city": "Toronto",
"province_state": "ON",
"country": "CA",
"zip_postal": "m5h2y2",
"residential": null,
"created_at": "2021-10-03T21:29:42.000000Z",
"updated_at": "2021-10-03T21:29:42.000000Z"
},
"return_address": null,
"package": [
{
"Width": "10",
"Height": "5",
"Length": "10",
"Weight": "2",
"Insurance": "0",
"Description": null
}
],
"customs": null,
"rates": [
{
"rate_id": "rate_7a7a21bd3d264904b13ac131eb9451c3",
"days": 1,
"carrier": "FedEx",
"service": "FEDEX_EXPRESS_SAVER",
"price": {
"pre-tax": "12.46",
"tax": "1.62",
"taxName": "HST",
"tax2": null,
"tax2Name": null,
"residential": null,
"insurance": null,
"total": "14.08"
}
},
{
"rate_id": "rate_afe6800656d9474696972909c86f36c1",
"days": 3,
"carrier": "CanadaPost",
"service": "RegularParcel",
"price": {
"pre-tax": "14.93",
"tax": "1.94",
"taxName": "HST",
"tax2": null,
"tax2Name": null,
"residential": null,
"insurance": null,
"total": "16.87"
}
}
],
"selected_rate": {
"rate_id": "rate_7a7a21bd3d264904b13ac131eb9451c3",
"days": 1,
"carrier": "FedEx",
"service": "FEDEX_EXPRESS_SAVER",
"price": {
"tax": "1.62",
"tax2": null,
"total": "14.08",
"pre-tax": "12.46",
"taxName": "HST",
"tax2Name": null,
"insurance": null,
"residential": null
}
},
"label": "/api/shipment/ey....iJ9/labels",
"created_at": "2021-10-11T23:04:49.000000Z",
"updated_at": "2021-10-10T23:05:08.000000Z"
}
],
"links": {
"first": "/api/v1/shipments?page=1",
"last": "/api/v1/shipments?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/api/v1/shipments?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/api/v1/shipments",
"per_page": 100,
"to": 1,
"total": 1
}
}
{
"data": [],
"links": {
"first": "/api/v1/shipments?page=1",
"last": "/api/v1/shipments?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/api/v1/shipments?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"path": "/api/v1/shipments",
"per_page": 100,
"to": null,
"total": 0
}
}