POST api/v1/Ledger
Retrieve a list of sales ledger transactions for a specific customer account
You can send either account number or customer id dending on what you have stored
Request Information
URI Parameters
None.
Body Parameters
LedgerParams| Name | Description | Type | Additional information |
|---|---|---|---|
| apiKey |
Please contact Caliq support to get your key |
string |
Required |
| ChangesSince |
List transactions made on and since YYYYMMDD. If supplied empty then all transactions will be returned |
string |
None. |
| AccountNo |
Customer account number to return transactions for |
string |
None. |
| CustomerID |
Customer ID to return transactions for |
integer |
None. |
| OutstandingOnly |
Only return outstanding transactions |
boolean |
None. |
| IncludeProFormas |
Include outstanding proformas in the results |
boolean |
None. |
Request Formats
application/json, text/json
{
"ChangesSince": "sample string 1",
"AccountNo": "sample string 2",
"CustomerID": 3,
"OutstandingOnly": true,
"IncludeProFormas": true,
"apiKey": "sample string 1"
}
application/xml, text/xml
<LedgerParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ChangesSince>sample string 1</ChangesSince> <AccountNo>sample string 2</AccountNo> <CustomerID>3</CustomerID> <OutstandingOnly>true</OutstandingOnly> <IncludeProFormas>true</IncludeProFormas> <apiKey>sample string 1</apiKey> </LedgerParams>
Response Information
Resource Description
Returns:
200 OK Returns a collection of ledger transactions
400 Bad Request - parameters supplied cannot be properly interpreted
401 Not Authorised if supplied api key is not valid
204 No Content if the requested filters dont match any data
503 Service Unavailable
| Name | Description | Type | Additional information |
|---|---|---|---|
| Transactions | Collection of Trans |
None. |
Response Formats
application/json, text/json
{
"Transactions": [
{
"DocumentNo": "sample string 1",
"Ref": "sample string 2",
"Type": "sample string 3",
"Amount": 4.0,
"Paid": 5.0,
"Date": "sample string 6",
"Due": "sample string 7",
"Curr": "sample string 8",
"DocumentID": 9,
"Outstanding": true,
"TransID": 1,
"SubID": 1,
"SurchargeAmount": 11.0
},
{
"DocumentNo": "sample string 1",
"Ref": "sample string 2",
"Type": "sample string 3",
"Amount": 4.0,
"Paid": 5.0,
"Date": "sample string 6",
"Due": "sample string 7",
"Curr": "sample string 8",
"DocumentID": 9,
"Outstanding": true,
"TransID": 1,
"SubID": 1,
"SurchargeAmount": 11.0
}
]
}
application/xml, text/xml
<Ledger xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Trans>
<DocumentNo>sample string 1</DocumentNo>
<Ref>sample string 2</Ref>
<Type>sample string 3</Type>
<Amount>4</Amount>
<Paid>5</Paid>
<Date>sample string 6</Date>
<Due>sample string 7</Due>
<Curr>sample string 8</Curr>
<DocumentID>9</DocumentID>
<Outstanding>true</Outstanding>
<TransID>1</TransID>
<SubID>1</SubID>
<SurchargeAmount>11</SurchargeAmount>
</Trans>
<Trans>
<DocumentNo>sample string 1</DocumentNo>
<Ref>sample string 2</Ref>
<Type>sample string 3</Type>
<Amount>4</Amount>
<Paid>5</Paid>
<Date>sample string 6</Date>
<Due>sample string 7</Due>
<Curr>sample string 8</Curr>
<DocumentID>9</DocumentID>
<Outstanding>true</Outstanding>
<TransID>1</TransID>
<SubID>1</SubID>
<SurchargeAmount>11</SurchargeAmount>
</Trans>
</Ledger>