Skip to main content
Skip table of contents

List of Products

Get list of Products

Retrieve a list of products, optionally filtering by various parameters such as eshops, SKUs, active products and more.

Request structure

Endpoint:

POST /api/product/list

URL (prod):

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

Headers:

CODE
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 products (no filters):

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

This request retrieves all active products (active = true), returning only the id, name, and productSku fields. The results are sorted alphabetically by name in ascending order (default).

CODE
curl --location "https://app.mailship.eu/api/product/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
    \"criteria\": {
        \"active\": {
            \"flag\": true
        }
    },
    \"select\": [
        \"id\",
        \"name\",
        \"productSku\"
    ],
    \"sort\": [
        {
            \"field\": \"name\"
        }
    ]
}"

This request retrieves products with a name that contains "Headphones". The response includes up to 10 results (limit = 10), skipping the first 5 (offset = 5).

CODE
curl --location "https://app.mailship.eu/api/product/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
    \"criteria\": {
        \"name\": {
            \"like\": \"Headphones\"
        }
    },
    \"limit\": 10,
    \"offset\": 5
}"

This request retrieves all products where the product name contains "Notebook" and the product was created between January 1, 2025, and January 31, 2025. Only the id, name, and productSku fields are returned.

CODE
curl --location "https://app.mailship.eu/api/product/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
    \"criteria\": {
        \"name\": {
            \"like\": \"Notebook\"
        },
        \"createdAt\": {
            \"gte\": \"2025-01-01T00:00:00Z\",
            \"lte\": \"2025-01-31T23:59:59Z\"
        }
    },
    \"select\": [
        \"id\",
        \"name\",
        \"productSku\"
    ]
}"

Response

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

  • No request body: Returns all products.

  • With filters in request body:

    • criteria: Returns only matching products.

    • select: Only the requested fields are returned.

See more details in the API Doc.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.