Mediloop
DocsAPIsProcurement APIStock Availability
Procurement API

Stock Availability

Check supplier availability before ordering and interpret stock, lead-time and fulfilment signals consistently.

Permission

stock_availability:read

Rate limit

300 requests / min

Caching

30 sec recommended

Localization

Multi-location

Availability model

available

Can fulfil requested quantity

limited

Low / constrained stock

backorder

Not immediate; future fulfilment

out_of_stock

Unavailable

Stock states

FieldMeaning
available_quantityQuantity currently available for ordering
reserved_quantityQuantity held by reservations
availability_statusNormalized state
lead_time_daysExpected fulfilment lead time
as_ofFreshness timestamp

Lead times

Availability should be interpreted with lead time and freshness. A positive quantity may still be unsuitable for an urgent purchase when fulfilment lead time exceeds the required delivery window.

Multi-supplier availability

GET/v1/stock/availability
GET/v1/stock/availability/location
GET/v1/stock/availability/summary
POST/v1/stock/reservations
DELETE/v1/stock/reservations/{id}

Freshness & caching

Cache product metadata longer than stock data. Availability responses should include an as_of timestamp so clients can decide whether their local copy remains suitable for the purchasing decision.

Example request

cURLJavaScriptPython
curl "https://api.mediloop.com/v1/stock/availability?product_id=prod_123" \
  -H "Authorization: Bearer $MEDILOOP_API_KEY" \
  -H "X-Tenant-Id: $TENANT_ID"
Availability by product
Response200 OK
{
 "product_id":"prod_123",
 "suppliers":[{ "supplier_id":"sup_42", "available_quantity":240, "status":"available", "lead_time_days":2 }]
}