API变更–带有分页的GetReceipts

根据客户反馈对会计软件进行的另一项改进:

作为对我们API的进一步改进的一部分,并且为了确保为所有API使用者提供更快,更高效的结果,我们不久将引入一种新的方法来获取回执和分页参数 ( 获取收据 WithPaging)。请注意,此分页方法将在 2013年8月1日 因此,我们建议所有使用此方法的API用户相应地更新其代码。尽管不会对现有接口进行任何更改  获取收据  方法,它只会返回最近的100条收据记录(按‘ReceiptNumber’降序排列)。将向用户显示以下消息,以帮助他获取剩余的记录:

“现在已修改此功能以返回最近创建的100张收据。那里’s a total of <TotalRecords> 收据中包含 <TotalPages> 页面。如果您想获取其他收据,则需要使用  获取收据 WithPaging 服务方法并传递适当的参数”

新请求对象

的新SOAP请求对象 获取收据 WithPaging 方法如下所示:


<GetReceiptsWithPaging xmlns=" 卡什流 ">
  <UserName>string</UserName>
  <Password>string</Password>
  <Page>string</Page>
  <PerPage>string</PerPage>
  <FilterBy>string</FilterBy>
</GetReceiptsWithPaging>

收据清单 获取收据 WithPaging 现在将以分页方式返回。以下是有关引入的新参数的详细信息:

参数名称 描述  Acceptable Values 默认值
1.要获取的收货清单的页码。
  • 数值(例如1,2,3… )
1
2. 每页 每页要获取的记录数。
  • 数值(例如10,20,30…)此字段的最大可接受值为100。如果指定的值大于100,则仅返回100条记录
100
3. 过滤 T
  • 所有
  • 未付
  • 逾期
  • 多付的
  • 已付费
  • 这个月
所有

响应对象

会员 描述
1. 获取收据 WithPagingResult这是收据对象的列表
2. 页码 返回的页面索引。
3. 总页数 根据所选过滤器和PerPage值而存在的收据记录的总页数。
4. 总记录 根据所选过滤器存在的收据记录总数。

 

示例请求


<GetReceiptsWithPaging xmlns=" 卡什流 ">
  <UserName>aatish</UserName>
  <Password>kashflow</Password>
  <Page>1</Page>
  <PerPage>2</PerPage>
  <FilterBy>All</FilterBy>
</GetReceiptsWithPaging >

范例回应

  1. 如果未指定参数,则使用默认参数获取收货清单。
  2. 如果传递了无效的参数,则返回适当的消息。

<?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  已付费 : 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  已付费 : 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 卡什流works with your business and your books