API Results

From Developer's API

Revision as of 20:07, 16 January 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The results returned from the API are always in XML format as shown in the following samples.

List Data

Example list response (Orders)

<Response success="true" xmlns:xlink="http://www.w3.org/1999/xlink">
    <NextRecordSet>
        <LimitCount>10</LimitCount>
        <LimitOffset>20</LimitOffset>
        <LimitStartDate>01/01/2007</LimitStartDate>
        <LimitEndDate>12/31/2007 23:59:59</LimitEndDate>
        <SortColumn>SomeField</SortColumn>
        <SortOrder>DESC</SortOrder>
    </NextRecordSet>
    <Orders>
        <Order xlink:href="https://localhost/API/118303/Orders/173459428">173459428</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459427">173459427</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459426">173459426</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459421">173459421</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459419">173459419</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459415">173459415</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459413">173459413</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459315">173459315</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459278">173459278</Order>
        <Order xlink:href="https://localhost/API/118303/Orders/173459276">173459276</Order>
    </Orders>
</Response>

Detail Data

Example read response (Clients)

<Response success="true" xmlns:xlink="http://www.w3.org/1999/xlink">
    <ClientInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <Id>173457260</Id>
        <MerchantId>118303</MerchantId>
        <Email>test@gmail.com</Email>
        <FirstName>John</FirstName>
        <LastName>Smith</LastName>
        <Address1>1 Shop St.</Address1>
        <City>Barrie</City>
        <Zip>L0L 1L0</Zip>
        <StateName>Ontario</StateName>
        <CountryName>Canada</CountryName>
        <WorkPhone>999-9999</WorkPhone>
        <EmailOptIn>true</EmailOptIn>
    </ClientInfo>
</Response>

Error Data

Example error response

<Response success="false">
   <Error code="1001">No data found</Error>
</Response>