Get list of Expedition
Retrieve a list of expeditions, optionally filtering by various parameters such as eshops, order numbers, carriers and more.
Request structure
|
Endpoint: |
|
|
URL (prod): |
|
|
Request body: |
Request body supports multiple filtering options. Please see the API Doc for more details. |
|
Headers: |
|
Request Examples (cURL):
Get all expeditions (no filters):
curl --location --request POST "https://app.mailship.eu/api/expedition/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}"
This request retrieves all expeditions where the orderNumber contains "testDevPortal", expeditions are without COD (cash on delivery) and the expedition was created between January 1, 2025, and March 31, 2025.
Only the id, orderNumber, note, carrier, carrierService, carrierPickupPlace, carrierNote, status, createdAt, countOfItems, countOfSku and sumOfQuantity fields are returned.
curl --location "https://app.mailship.eu/api/expedition/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
\"criteria\": {
\"orderNumber\": {
\"like\": \"%testDevPortal%\"
},
\"cod\": {
\"flag\": false
},
\"createdAt\": {
\"gte\": \"2025-01-01T00:00:00Z\",
\"lte\": \"2025-03-31T23:59:59Z\"
}
},
\"select\": [
\"id\",
\"orderNumber\",
\"note\",
\"carrier\",
\"carrierService\",
\"carrierPickupPlace\",
\"carrierNote\",
\"status\",
\"createdAt\",
\"countOfItems\",
\"countOfSku\",
\"sumOfQuantity\"
]
}"
This request retrieves all expeditions where the status is "delivered", and the expedition was created between January 1, 2025, and March 31, 2025.
The response is paginated, returning a maximum of 10 expeditions per request, while skipping the first 5 records.
Only the id, orderNumber, note, carrier, carrierService, carrierPickupPlace, carrierNote, status and createdAt fields are returned.
curl --location "https://app.mailship.eu/api/expedition/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
\"criteria\": {
\"status\": {
\"eq\": \"delivered\"
},
\"createdAt\": {
\"gte\": \"2025-01-01T00:00:00Z\",
\"lte\": \"2025-03-31T23:59:59Z\"
}
},
\"limit\": 10,
\"offset\": 5,
\"select\": [
\"id\",
\"orderNumber\",
\"note\",
\"carrier\",
\"carrierService\",
\"carrierPickupPlace\",
\"carrierNote\",
\"status\",
\"createdAt\"
]
}"
This request retrieves all expeditions where the status is "delivered", the expedition was created between January 1, 2025, and March 31, 2025, and it belongs to the e-shop with ID "12bd5a15-93a1-4e15-b2ea-b1baaa21a210".
You can get the ID of your eshop with the endpoint POST /api/eshop/list.
Additionally, the response includes partially delivered expeditions ("partiallyDelivered": true).
The results are sorted by "orderNumber" in ascending order.
Only the id, orderNumber, carrier, carrierService, status, and createdAt fields are returned.
curl --location "https://app.mailship.eu/api/expedition/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
\"criteria\": {
\"status\": {
\"eq\": \"delivered\"
},
\"createdAt\": {
\"gte\": \"2025-01-01T00:00:00Z\",
\"lte\": \"2025-03-31T23:59:59Z\"
},
\"eshop\": \"4b47c5b0-d590-4f26-a8d6-84906a988197\"
},
\"extra\": {
\"partiallyDelivered\": true
},
\"sort\": [
{
\"field\": \"orderNumber\"
}
],
\"select\": [
\"id\",
\"orderNumber\",
\"carrier\",
\"carrierService\",
\"status\",
\"createdAt\"
]
}"
Response
If successful, returns a paginated list of expeditions in JSON format based on searched criteria.
-
No request body: Returns all expeditions.
-
With filters in request body:
-
criteria: Returns only matching expeditions. -
select: Only the requested fields are returned.
-
See more details in the API Doc.