c_agri_trade_code/docs/api/bruno/sales/allocate-order-lot.bru

39 lines
723 B
Plaintext

meta {
name: Allocate Released Lot to Sales Order
type: http
seq: 2
}
post {
url: {{baseUrl}}/api/v1/sales/orders/{{orderId}}/allocations
body: json
auth: bearer
}
auth:bearer {
token: {{jwtToken}}
}
headers {
Content-Type: application/json
X-Tenant-ID: {{tenantId}}
Accept: application/json
}
body:json {
{
"lot_id": "LOT-UNJ-SOY-20261012-001",
"allocated_qty_mt": 50.000,
"allocated_bags": 1000,
"warehouse_id": "WH-01"
}
}
docs {
# Allocate Released Lot to Sales Order (FR-SALESCONTRACTS-003)
Allocates available unreserved inventory lots to confirmed sales orders.
Enforces invariant: Only lots in RELEASED status can be allocated (blocks QC_HOLD and UNDER_QC).
}