Skip to main content
Skip table of contents

List of Stock Advices

Get list of Stock Advices

Retrieve a list of stock advices, optionally filtering by various parameters such as supplier, warehouse and more.

 

Request structure

Endpoint:

POST /api/stock-advice/list

URL (prod):

https://app.mailship.eu/api/stock-advice/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 stock advices (no filters):

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

This request will return a maximum of 1000 stock advices with a status of "closed" that were changed between October 1, 2024 and October 12, 2024. The results will be sorted in descending order by the time of change (changedAt), so the most recently changed notice will be at the top.

CODE
curl --location 'https://app.mailship.eu/api/stock-advice/list' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
    "limit": 1000,
    "offset": 0,
    "criteria": {
        "status": {
            "in": [
                "closed"
            ]
        },
        "changedAt": {
            "gte": "2024-10-01T16:10:59+00:00",
            "lt": "2024-10-12T16:20:59+00:00"
        }
    },
    "sort": [
        {
            "field": "changedAt",
            "order": "desc"
        }
    ],
    "nested": true
}
'

 

Response

Returns a list of stock advices in JSON format based on searched criteria.

  • No request body: Returns all stock advices.

  • With filters in request body:

    • criteria: Returns only matching stock advices.

    • 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.