Skip to main content
Skip table of contents

Creation of Stock Advice

Create Stock Advice

Create a new stock advice entity to the database.

 

Request structure

Endpoint:

POST /api/stock-advice

URL (prod):

https://app.mailship.eu/api/stock-advice

Headers:

CODE
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

For detailed request body specifications, please refer to our API doc.

Request Example (cURL):

CODE
curl --location 'https://app.mailship.eu/api/stock-advice' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
    "organisation": "c8e4544d-4fb9-452a-b8d2-160727ddca5b",
    "warehouse": "cdf15196-51e9-456c-b115-6459b3741367",
    "wms": "6bfd4074-7839-4c42-9eb2-6760bc1bf479",
    "supplier": "bfdfee29-eaa4-486e-ad79-e6a57d7fa40d",
    "packagingUnit": "pallet",
    "countOfUnits": 1,
    "items": [
        {
            "product": "03b5c026-4c79-486d-b97f-55084d7d7610",
            "quantity": 4
        }
    ],
    "note": "this is note for this advice.",
    "internalId": "your_internal_number",
    "expectedAt": "2025-05-30T00:00:00+01:00",
    "ref1": "REF1",
    "ref2": "REF2",
    "ref3": "REF3"
}'

 

Request body specifications

Here is an additional, more detailed explanation of certain fields:

Field

Description

"organisation"

Specifies your organization ID. Retrieve your organization ID via POST /api/eshop/list.

"warehouse"

ID of your warehouse. Retrieve available warehouse IDs via POST /api/warehouse/list.

Warehouse is your physical warehouse.

"wms"

ID of your wms. A wms entity represents a virtual warehouse linked to a physical warehouse. It tracks inventory, stock movements, and shipments within the system, ensuring accurate stock records.

Retrieve your wms ID via POST /api/warehouse/list.

"supplier"

You can create a supplier in Mailship via POST /api/supplier. Retrieve all your partner IDs via POST /api/supplier/list endpoint.

See more for suppliers in Knowledge Base or API Doc.

"items"

Array of products included in the expedition.

For additional field informations, refer to the Knowledge Base or API Doc.

Response

If successful, the API returns the newly created stock advice entity in JSON format.

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.