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
availableCan fulfil requested quantity
limitedLow / constrained stock
backorderNot immediate; future fulfilment
out_of_stockUnavailable
Stock states
| Field | Meaning |
|---|---|
| available_quantity | Quantity currently available for ordering |
| reserved_quantity | Quantity held by reservations |
| availability_status | Normalized state |
| lead_time_days | Expected fulfilment lead time |
| as_of | Freshness 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/availabilityGET
/v1/stock/availability/locationGET
/v1/stock/availability/summaryPOST
/v1/stock/reservationsDELETE
/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 }]
}