Developer Portal
Breadcrumbs

List of Carriers

Get list of Carriers

Retrieve a list of carriers, optionally filtering by various parameters such as name, code and more.


Request structure

Endpoint:

POST /api/carrier/list

URL (prod):

https://app.mailship.eu/api/carrier/list

Headers:

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

Request body supports multiple filtering options. Please see the API Doc for more details.

Request Examples (cURL):

Get all carriers (no filters):

curl --location --request POST 'https://app.mailship.eu/api/carrier/list' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}'

This request retrieves all active carriers, returning the id, name, code, services fields. The results are sorted alphabetically by name in ascending order (default).

curl --location 'https://app.mailship.eu/api/carrier/list' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
    "sort": [
        {
            "field": "name"
        }
    ],
    "limit": 1000,
    "offset": 0,
    "nested": false,
    "select": [
        "id",
        "name",
        "code",
        "services"
    ]
}
'

 

Response

If successful, returns a paginated list of carriers in JSON format based on searched criteria.

  • No request body: Returns all carriers.

  • With filters in request body:

    • criteria: Returns only matching carriers.

    • select: Only the requested fields are returned.

See more details in the API Doc.



Get list of Carrier Services

Retrieve a list of carrier services, optionally filtering by various parameters such as name, code and more.


Request structure

Endpoint:

POST /api/carrier-service/list

URL (prod):

https://app.mailship.eu/api/carrier-service/list

Headers:

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

Request body supports multiple filtering options. Please see the API Doc for more details.

Request Examples (cURL):

Get all carrier services (no filters):

curl --location --request POST 'https://app.mailship.eu/api/carrier-service/list' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}'

This request retrieves all carrier services of certain carrier, returning the id, name, code fields. The results are sorted alphabetically by name in ascending order (default).

curl --location 'https://app.mailship.eu/api/carrier-service/list' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
    "criteria": {
        "carrier": {
            "eq": "c948fa08-e9cb-48c6-87bd-2fd338338947"
        }
    },
    "sort": [
        {
            "field": "name"
        }
    ],
    "select": [
        "id",
        "name",
        "code"
    ]
}'

 

Response

If successful, returns a paginated list of carrier services in JSON format based on searched criteria.

  • No request body: Returns all carrier services.

  • With filters in request body:

    • criteria: Returns only matching carrier services.

    • select: Only the requested fields are returned.

See more details in the API Doc.