API Change – GetReceipts with Paging

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 parameterDescription Acceptable ValuesDefault Value
1.PageThe page number of the receipt list to be fetched.
  • Numeric values (eg, 1,2,3… )
1
2.PerPageNumber of records to be fetched per page.
  • Numeric values (eg, 10,20,30… ) The maximum acceptable value for this field is 100. If a value greater than 100 is specified, only 100 records will be returned
100
3.FilterByT
  • All
  • Unpaid
  • Overdue
  • Overpaid
  • Paid
  • ThisMonth
All

Response Object

MemberDescription
1.GetReceiptsWithPagingResultThis is the list of receipt objects
2.PageNumberThe index of the page being returned.
3.TotalPagesThe total number of pages of receipt records existing as per the selected filter and PerPage value.
4.TotalRecordsThe 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

  1. If the parameters are not specified, the receipt list is fetched with the default parameters.
  2. 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>

See how IRIS KashFlow works with your business and your books