Skip to main content

Get list of Expedition

Comprehensive guide on how to retrieve a list of expeditions in Mailship using the Get list of Expedition endpoint with filtering options.

Updated over a year ago

The Get list of Expedition endpoint is a powerful tool for retrieving a list of expeditions based on specific criteria. This endpoint is particularly useful for tracking the status of expeditions, obtaining tracking URLs, and other related tasks. Here's a step-by-step guide on how to use this endpoint.


The API URL for this endpoint is http://app.mailship.eu/api/expedition/list.


Request Payload

The request payload for this endpoint is a JSON object that specifies the criteria for the expeditions you want to retrieve. Here's an example of a request payload:

{
"criteria": {
"id": {
"eq": "string",
"neq": "string",
"null": true,
"in": [
"string"
],
"nin": [
"string"
]
},
"name": {
"eq": "string",
"neq": "string",
"null": true,
"like": "string",
"notLike": "string",
"in": [
"string"
],
"nin": [
"string"
]
},
"organisation": {
"eq": "string",
"neq": "string",
"null": true,
"in": [
"string"
],
"nin": [
"string"
]
},
"storeKey": {
"eq": "string",
"neq": "string",
"null": true,
"like": "string",
"notLike": "string",
"in": [
"string"
],
"nin": [
"string"
]
}
},
"extra": {
"partiallyDelivered": true
},
"sort": [
{
"field": "name"
}
],
"limit": 100,
"offset": 200,
"select": [
"id",
"name",
"organisation",
"distributionCenter",
"storeKey",
"internalId",
"createdAt",
"warehouses",
"changedAt"
],
"nested": true
}

Field Descriptions

Here are descriptions for some of the fields used in the request payload:

  • id: This field is used to specify the ID of the expedition. You can use various operators such as eq (equal), neq (not equal), null (is null), in (in array), and nin (not in array) to filter expeditions based on their ID.

  • name: This field is used to filter expeditions based on their name.

  • organisation: This field is used to filter expeditions based on the organisation they belong to.

  • storeKey: This field is used to filter expeditions based on their store key.

  • extra.partiallyDelivered: This field is used to filter expeditions based on whether they are partially delivered.

  • sort: This field is used to sort the returned expeditions based on a specific field. In the example above, the expeditions are sorted based on their name.

  • limit: This field is used to limit the number of expeditions returned by the endpoint.

  • offset: This field is used to specify the starting point from where the expeditions are returned.

  • select: This field is used to specify the fields that should be returned for each expedition.

  • nested: This field is used to specify whether nested fields should be returned for each expedition.
    ​

Please note that the detailed information about eachfield can be found in the official API documentation.
​

Response

The response from the endpoint will be a JSON object containing the expeditions that match the specified criteria. Each expedition will be represented as a JSON object with fields corresponding to the ones specified in the select field of the request payload.


​

Did this answer your question?