Developer Portal
Breadcrumbs

Product Stock

Monitor your product stock in real time to track physical inventory levels in the warehouse. This allows you to see how much stock is available for expeditions, how much is reserved, incoming, etc.


Get list of Stock

Retrieve a list of product stock records, optionally filtering by parameters such as product name, SKU, warehouse name, and more.


Request structure

Endpoint:

POST /api/product-stock/list

URL (prod):

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

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

This request retrieves stock data for product ID a84ee2b9-0da1-422b-83ea-7b8ca1096ac4.

curl --location "https://app.mailship.eu/api/product-stock/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
    \"criteria\": {
        \"product\": {
            \"eq\": \"a84ee2b9-0da1-422b-83ea-7b8ca1096ac4\"
        }
    }
}"

Fetch stock attributes such as id, product, quantity, booked, available, and missing for a specific warehouse.

curl --location "https://app.mailship.eu/api/product-stock/list" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}" \
--data "{
    \"criteria\": {
        \"warehouse\": {
            \"eq\": \"819a18d1-2603-49e8-9f1e-73bc15f70613\"
        }
    },
    \"select\": [
        \"id\",
        \"product\",
        \"quantity\",
        \"booked\",
        \"available\",
        \"missing\"
    ]
}"

 

Response

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

  • No request body: Returns all product stocks.

  • With filters in request body:

    • criteria: Returns only matching product stocks.

    • select: Only the requested fields are returned.

See more details in the API Doc.



Get Product Stock

Retrieve detailed information about a specific product stock using its unique ID.

To obtain a product stock ID, first list all stocks filtered by product (see the previous endpoint). Once you have a specific product stock ID, use this endpoint to get detailed information.


Request structure

Endpoint:

GET /api/product-stock/{id}

URL (prod):

https://app.mailship.eu/api/product-stock/{id}

Headers:

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Request body:

None (this request does not require a body).

Request Example (cURL):

curl --location "https://app.mailship.eu/api/product-stock/a84ee2b9-0da1-422b-83ea-7b8ca1096ac40" \
--header "Accept: application/json" \
--header "Authorization: Bearer {{token}}"

Path parameter:

Parameter

Type

Required

Description

id

string

The unique product stock identifier. Example: a84ee2b9-0da1-422b-83ea-7b8ca1096ac4

 

Response

If successful, the API returns the product stock entity in JSON format.

See more details in the API Doc.