POST api/v1/OrderLinesAddedByDate
Returns a collection of order lines which were created between two dates
Optionally the results can be restricted to just lines sold below cost or below a specific margin
Request Information
URI Parameters
None.
Body Parameters
OrderLinesAddedByDateParams| Name | Description | Type | Additional information |
|---|---|---|---|
| apiKey |
Please contact Caliq support to get your key |
string |
Required |
| WhereBelowCost |
If true, only items sold below cost will be included |
boolean |
Required |
| WhereBelowMarginPerc |
If greatre than zero, only items sold below this margin will be included |
decimal number |
Required |
| DateFrom |
List order lines created on and since YYYYMMDD |
string |
None. |
| DateTo |
List order lines created on and before YYYYMMDD |
string |
None. |
| ProductIDs |
The list of product IDs you want returned, can be empty if using codes |
Collection of integer |
None. |
| ProductCodes |
The list of product Codes you want returned, can be empty if using ID's |
Collection of string |
None. |
Request Formats
application/json, text/json
{
"DateFrom": "sample string 1",
"DateTo": "sample string 2",
"ProductIDs": [
1,
2
],
"ProductCodes": [
"sample string 1",
"sample string 2"
],
"apiKey": "sample string 1",
"WhereBelowCost": true,
"WhereBelowMarginPerc": 3.0
}
application/xml, text/xml
<OrderLinesAddedByDateParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DateFrom>sample string 1</DateFrom>
<DateTo>sample string 2</DateTo>
<ProductIDs>
<int>1</int>
<int>2</int>
</ProductIDs>
<ProductCodes>
<string>sample string 1</string>
<string>sample string 2</string>
</ProductCodes>
<apiKey>sample string 1</apiKey>
<WhereBelowCost>true</WhereBelowCost>
<WhereBelowMarginPerc>3</WhereBelowMarginPerc>
</OrderLinesAddedByDateParams>
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 |
|---|---|---|---|
| OrderLinesAddedByDateList | Collection of OrderLineAddedByDate |
None. |
Response Formats
application/json, text/json
{
"OrderLinesAddedByDateList": [
{
"AccountNo": "sample string 1",
"OrderNo": 2,
"ID": 3,
"Code": "sample string 4",
"Description": "sample string 5",
"Qty": 6,
"UnitSellPrice": 7.0,
"UnitCost": 8.0,
"MarginPerc": 9.0,
"Created": "sample string 10",
"CreatedBy": "sample string 11",
"Channel": "sample string 12",
"ItemStatus": 13
},
{
"AccountNo": "sample string 1",
"OrderNo": 2,
"ID": 3,
"Code": "sample string 4",
"Description": "sample string 5",
"Qty": 6,
"UnitSellPrice": 7.0,
"UnitCost": 8.0,
"MarginPerc": 9.0,
"Created": "sample string 10",
"CreatedBy": "sample string 11",
"Channel": "sample string 12",
"ItemStatus": 13
}
]
}
application/xml, text/xml
<OrderLinesAddedByDate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OrderLineAddedByDate>
<AccountNo>sample string 1</AccountNo>
<OrderNo>2</OrderNo>
<ID>3</ID>
<Code>sample string 4</Code>
<Description>sample string 5</Description>
<Qty>6</Qty>
<UnitSellPrice>7</UnitSellPrice>
<UnitCost>8</UnitCost>
<MarginPerc>9</MarginPerc>
<Created>sample string 10</Created>
<CreatedBy>sample string 11</CreatedBy>
<Channel>sample string 12</Channel>
<ItemStatus>13</ItemStatus>
</OrderLineAddedByDate>
<OrderLineAddedByDate>
<AccountNo>sample string 1</AccountNo>
<OrderNo>2</OrderNo>
<ID>3</ID>
<Code>sample string 4</Code>
<Description>sample string 5</Description>
<Qty>6</Qty>
<UnitSellPrice>7</UnitSellPrice>
<UnitCost>8</UnitCost>
<MarginPerc>9</MarginPerc>
<Created>sample string 10</Created>
<CreatedBy>sample string 11</CreatedBy>
<Channel>sample string 12</Channel>
<ItemStatus>13</ItemStatus>
</OrderLineAddedByDate>
</OrderLinesAddedByDate>