Inventory Point
Model
Endpoints
- GET /api/inventory/
List all inventory points. :returns: an object mapping InventoryPoint ID to InventoryPoint object
- GET /api/inventory/(int: inv_pt_id)
Get a single inventory point.
- PUT /api/inventory/
Create a new inventory point.
- Request JSON Object:
name (string) – name for the new inventory point
- Status Codes:
400 Bad Request – if the name is missing
- PATCH /api/inventory/(int: inv_pt_id)
Edit an existing inventory point. The request body is a (partial) InventoryPoint object.
- Status Codes:
400 Bad Request – if any fields in the incoming object are invalid.
404 Not Found – if the inventory point does not exist
- DELETE /api/inventory/(int: inv_pt_id)
Delete an existing inventory point.
- Status Codes:
204 No Content – on success
404 Not Found – if the inventory point does not exist
- POST /api/inventory/(int: ipt_id)/import
Import tool quantities to a specified inventory point from an uploaded CSV or XLSX file.
Spreadsheet layout rules:
The first row must contain column headers.
The “quantity” (or “qty”) column is required.
At least one column of “name” (or “item”) and “part number” (or “barcode”) are required.
The order of columns does not matter.
Column headers are not case-sensitive.
Inventory items can be matched either name and/or part number.
Row handling rules:
If no existing inventory item matches a row’s name and/or part number, the row information will be listed as an object in the
not_matched
array in the response.Items present in the inventory point but not in the spreadsheet will not be changed.
Items present in both the inventory point and the spreadsheet will have their quantity in the inventory point updated to match the spreadsheet.
Items present in the spreadsheet but not the inventory point will be added to the inventory point with the quantity specified in the spreadsheet.
- Parameters:
ipt_id – ID of the inventory point to import to
- Status Codes:
400 Bad Request – if the MIME type or file is invalid
404 Not Found – if an inventory point with the given ID does not exist
- Response JSON Array of Objects:
not_matched – list of rows that did not match an inventory item. Empty means all were matched.