/inventory v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Inventory
getInventory
Code samples
const headers = {
Accept: "application/json",
};
fetch("https://goldleaf.app/api/v1/inventory", {
method: "GET",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
GET /inventory
Retrieve inventory items
Retrieves a paginated list of inventory items with optional search filters and warehouse filtering.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| search.partNumber | query | string | false | Filter by part number |
| search.brandName | query | string | false | Filter by brand name |
| search.warehouseName | query | string | false | Filter by warehouse name |
| search.itemType | query | string | false | Filter by item type |
| warehouseId | query | string(mongoId) | false | Filter by warehouse ID |
| showAll | query | boolean | false | Show all inventory items regardless of pagination |
| page | query | integer | false | Page number for pagination |
| limit | query | integer | false | Number of items per page |
Example responses
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | List of inventory items | None |
