Supplier Allocation¶
GET /api/supplier-allocation
GET /api/supplier-allocation/{id}
POST /api/supplier-allocation
PUT /api/supplier-allocation/{id}
DELETE /api/supplier-allocation/{id}
Required privilege: Supplier Allocation / View (read) · Supplier Allocation / Edit (write)
Supplier Allocations define which suppliers are authorised to supply which items, and in what proportions. The planning engine uses these allocations when generating suggested purchase orders.
Allocation Object¶
{
"id": 1101,
"Item Id": 55,
"Item Number": "ITEM-A",
"Item Description": "Widget Assembly - Type A",
"Supplier Id": 7,
"Supplier Number": "SUP-007",
"Supplier Name": "Acme Components Ltd.",
"Allocation Percentage": 70,
"Priority": 1,
"Status": "Active"
}
| Field | Type | Description |
|---|---|---|
id |
integer | Internal allocation identifier |
Item Number |
string | Item being allocated |
Supplier Number |
string | Allocated supplier |
Allocation Percentage |
number | Percentage of demand assigned to this supplier (0–100) |
Priority |
integer | Supplier priority rank (1 = highest) |
Status |
string | Active or Inactive |
GET - List Allocations¶
POST - Create Allocation¶
POST /api/supplier-allocation HTTP/1.1
Content-Type: application/json
X-XSRF-TOKEN: <csrf>
{
"Item Number": "ITEM-A",
"Supplier Number": "SUP-007",
"Allocation Percentage": 70,
"Priority": 1,
"Status": "Active"
}
Validation: Total allocation percentages for an item should not exceed 100%.
Errors¶
| Status | Code | Description |
|---|---|---|
| 400 | SupplierAllocation.NotFound |
No allocation with this ID |
| 400 | ItemMaster.NotFound |
Item not found |
| 400 | SupplierMaster.NotFound |
Supplier not found |
| 403 | User.NotPrivileged |
Insufficient privilege |