Another improvement to our accounting software based on feedback from our customers:
As part of further improvements to our API and to ensure quicker and more efficient results for all API consumers we will shortly be introducing a new method for fetching receipts along with paging parameters (GetReceiptsWithPaging). Please be aware that this paging method will be introduced on August 1st 2013 and so we are advising all API users using this method to update their code accordingly. Though no interface changes will be made to the existing GetReceipts method, it will only return the most recent 100 receipt records (sorted by ‘ReceiptNumber’ in descending order). The user will be shown the following message to help him fetch the remaining records:
“This function has now been modified to return the last 100 receipts created. There’s a total of <TotalRecords> receipts contained in <TotalPages> pages. If you want to get other receipts you need to use the GetReceiptsWithPaging service method and pass the appropriate parameters”
New Request Object
The new SOAP request object for GetReceiptsWithPaging method would look like the following:
<GetReceiptsWithPaging xmlns="KashFlow">
<UserName>string</UserName>
<Password>string</Password>
<Page>string</Page>
<PerPage>string</PerPage>
<FilterBy>string</FilterBy>
</GetReceiptsWithPaging>
The receipt list from GetReceiptsWithPaging will now be returned in a paged manner. Following are the details regarding new parameters being introduced:
Name of parameter | Description | Acceptable Values | Default Value | |
1. | Page | The page number of the receipt list to be fetched. |
| 1 |
2. | PerPage | Number of records to be fetched per page. |
| 100 |
3. | FilterBy | T |
| All |
Response Object
Member | Description | |
1. | GetReceiptsWithPagingResult | This is the list of receipt objects |
2. | PageNumber | The index of the page being returned. |
3. | TotalPages | The total number of pages of receipt records existing as per the selected filter and PerPage value. |
4. | TotalRecords | The total number of receipt records existing as per the selected filter. |
Example Request
<GetReceiptsWithPaging xmlns="KashFlow">
<UserName>aatish</UserName>
<Password>kashflow</Password>
<Page>1</Page>
<PerPage>2</PerPage>
<FilterBy>All</FilterBy>
</GetReceiptsWithPaging >
Example Response
- If the parameters are not specified, the receipt list is fetched with the default parameters.
- In case invalid parameters are passed, appropriate message is returned.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope>
<soap:Body>
<GetReceiptsWithPagingResponse>
<GetReceiptsWithPagingResult>
<Invoice>
<InvoiceDBID>2210500</InvoiceDBID>
<InvoiceNumber>1</InvoiceNumber>
<InvoiceDate>2010-03-23T00:00:00</InvoiceDate>
<DueDate>2010-04-22T00:00:00</DueDate>
<Customer>08C</Customer>
<CustomerID>433398</CustomerID>
<Paid>1</Paid>
<CustomerReference>585568</CustomerReference>
<SuppressTotal>0</SuppressTotal>
<ProjectID>0</ProjectID>
<CurrencyCode>GBP</CurrencyCode>
<ExchangeRate>1.0000</ExchangeRate>
<ReadableString>Invoice Number : 1 DBID: 2210500 Date: 3/23/2010 12:00:00 AM Due: 4/22/2010 12:00:00 AM Customer: 08C Paid: 1 Cust Ref: 585568 Line 1 : 1926507,Materials,2210500,1.0000,839.0000,0.0000</ReadableString>
<Lines>
<anyType xsi:type="InvoiceLine">
<Quantity>1.0000</Quantity>
<Description>Materials</Description>
<Rate>839.0000</Rate>
<ChargeType>1926507</ChargeType>
<VatRate>0.0000</VatRate>
<VatAmount>0.0000</VatAmount>
<ProductID>0</ProductID>
<Sort>1</Sort>
<ProjID>0</ProjID>
<LineID>2210500</LineID>
</anyType>
</Lines>
<NetAmount>839.0000</NetAmount>
<VATAmount>0.0000</VATAmount>
<AmountPaid>839.0000</AmountPaid>
<CustomerName>Honda Suppliers</CustomerName>
</Invoice>
<Invoice>
<InvoiceDBID>2238072</InvoiceDBID>
<InvoiceNumber>2</InvoiceNumber>
<InvoiceDate>2010-03-29T00:00:00</InvoiceDate>
<DueDate>2010-04-28T00:00:00</DueDate>
<Customer>08C</Customer>
<CustomerID>433398</CustomerID>
<Paid>1</Paid>
<CustomerReference>dfd</CustomerReference>
<SuppressTotal>0</SuppressTotal>
<ProjectID>0</ProjectID>
<CurrencyCode>GBP</CurrencyCode>
<ExchangeRate>1.0000</ExchangeRate>
<ReadableString>Invoice Number : 2 DBID: 2238072 Date: 3/29/2010 12:00:00 AM Due: 4/28/2010 12:00:00 AM Customer: 08C Paid: 1 Cust Ref: dfd Line 1 : 1926511,,2238072,1.0000,43.0000,0.0000 Line 2 : 1926506,,2238072,1.0000,34.0000,0.0000 Line 3 : 1926505,,2238072,2.0000,45.0000,0.0000</ReadableString>
<Lines>
<anyType xsi:type="InvoiceLine">
<Quantity>1.0000</Quantity>
<Description />
<Rate>43.0000</Rate>
<ChargeType>1926511</ChargeType>
<VatRate>0.0000</VatRate>
<VatAmount>0.0000</VatAmount>
<ProductID>0</ProductID>
<Sort>1</Sort>
<ProjID>0</ProjID>
<LineID>2238072</LineID>
</anyType>
<anyType xsi:type="InvoiceLine">
<Quantity>1.0000</Quantity>
<Description />
<Rate>34.0000</Rate>
<ChargeType>1926506</ChargeType>
<VatRate>0.0000</VatRate>
<VatAmount>0.0000</VatAmount>
<ProductID>0</ProductID>
<Sort>2</Sort>
<ProjID>0</ProjID>
<LineID>2238072</LineID>
</anyType>
<anyType xsi:type="InvoiceLine">
<Quantity>2.0000</Quantity>
<Description />
<Rate>45.0000</Rate>
<ChargeType>1926505</ChargeType>
<VatRate>0.0000</VatRate>
<VatAmount>0.0000</VatAmount>
<ProductID>0</ProductID>
<Sort>3</Sort>
<ProjID>0</ProjID>
<LineID>2238072</LineID>
</anyType>
</Lines>
<NetAmount>167.0000</NetAmount>
<VATAmount>0.0000</VATAmount>
<AmountPaid>167.0000</AmountPaid>
<CustomerName>Honda Suppliers</CustomerName>
</Invoice>
</GetReceiptsWithPagingResult>
<Status>OK</Status>
<StatusDetail />
<PageNumber>1</PageNumber>
<TotalPages>53</TotalPages>
<TotalRecords>106</TotalRecords>
</GetReceiptsWithPagingResponse>
</soap:Body>
</soap:Envelope>