Procurement API
Returns
Create and track procurement return requests with item-level reasons, quantities and supplier resolution states.
Item-level returns
Quantity & reason
Supplier response
Approve / reject / instruct
Credit status
Refund or credit note
Audit
Full return history
Return lifecycle
requestedreviewingapprovedreturningresolvedCreate a return
POST
/v1/procurement/returns| Field | Description |
|---|---|
| purchase_order_id | Original procurement order |
| delivery_id | Delivery being returned, if applicable |
| items[] | Order line, quantity and reason |
| notes | Additional return context |
| attachments | Evidence / documents references |
Return items
| Reason | Example |
|---|---|
| damaged | Product damaged in transit |
| incorrect_item | Different SKU/product received |
| quality_issue | Product quality concern |
| excess_quantity | Over-delivery |
| other | Free-text explanation required |
Supplier response
The supplier can approve, partially approve or reject the request, optionally supplying return instructions, RMA/reference numbers and expected resolution.
Refund & credit status
| Resolution | Meaning |
|---|---|
| replacement | Replacement goods supplied |
| refund | Payment refunded |
| credit_note | Supplier credit issued |
| no_credit | Return resolved without financial credit |
Example request
cURLJavaScriptPython
curl -X POST "https://api.mediloop.com/v1/procurement/returns" \
-H "Authorization: Bearer $MEDILOOP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"purchase_order_id":"po_42","items":[{"order_item_id":"line_1","quantity":2,"reason":"damaged"}]}'Create return
Response201 Created
{ "id":"ret_12", "status":"requested", "purchase_order_id":"po_42" }