POST api/v1/ProductsRequiringBuying
Returns a collection of products which may need reordering
Request Information
URI Parameters
None.
Body Parameters
ProductsRequiringBuyingParams| Name | Description | Type | Additional information |
|---|---|---|---|
| apiKey |
Please contact Caliq support to get your key |
string |
Required |
| MonthsStock |
If true , only return items with non zero physical stock |
integer |
None. |
Request Formats
application/json, text/json
Sample:
{
"MonthsStock": 1,
"apiKey": "sample string 1"
}
application/xml, text/xml
Sample:
<ProductsRequiringBuyingParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <MonthsStock>1</MonthsStock> <apiKey>sample string 1</apiKey> </ProductsRequiringBuyingParams>
Response Information
Resource Description
Returns:
200 OK Returns collection of order lines
400 Bad Request - parameters supplied cannot be properly interpreted
401 Not Authorised if supplied api key is not valid
204 No Content if no products were updated or added since the date supplied
| Name | Description | Type | Additional information |
|---|---|---|---|
| ProductsRequiringBuyingList | Collection of ProductRequiringBuying |
None. |
Response Formats
application/json, text/json
Sample:
{
"ProductsRequiringBuyingList": [
{
"ID": 1,
"Code": "sample string 2",
"Description": "sample string 3",
"Cost_Valuation": 4.0,
"StockQty": 5,
"POQty": 6,
"MonthsCover": 7.0,
"AvgMonthUsage_1": 8.0,
"AvgMonthUsage_6": 9.0,
"AvgMonthUsage_12": 10.0
},
{
"ID": 1,
"Code": "sample string 2",
"Description": "sample string 3",
"Cost_Valuation": 4.0,
"StockQty": 5,
"POQty": 6,
"MonthsCover": 7.0,
"AvgMonthUsage_1": 8.0,
"AvgMonthUsage_6": 9.0,
"AvgMonthUsage_12": 10.0
}
]
}
application/xml, text/xml
Sample:
<ProductsRequiringBuying xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ProductRequiringBuying>
<ID>1</ID>
<Code>sample string 2</Code>
<Description>sample string 3</Description>
<Cost_Valuation>4</Cost_Valuation>
<StockQty>5</StockQty>
<POQty>6</POQty>
<MonthsCover>7</MonthsCover>
<AvgMonthUsage_1>8</AvgMonthUsage_1>
<AvgMonthUsage_6>9</AvgMonthUsage_6>
<AvgMonthUsage_12>10</AvgMonthUsage_12>
</ProductRequiringBuying>
<ProductRequiringBuying>
<ID>1</ID>
<Code>sample string 2</Code>
<Description>sample string 3</Description>
<Cost_Valuation>4</Cost_Valuation>
<StockQty>5</StockQty>
<POQty>6</POQty>
<MonthsCover>7</MonthsCover>
<AvgMonthUsage_1>8</AvgMonthUsage_1>
<AvgMonthUsage_6>9</AvgMonthUsage_6>
<AvgMonthUsage_12>10</AvgMonthUsage_12>
</ProductRequiringBuying>
</ProductsRequiringBuying>