GetPurchaseImportStats


 

Overview

Quick Links

This method retrieves statistics regarding imported Purchases. Specifically, it allows us to check the amount of Purchases imported for a specified customer in a specified period. As well as specifying how many of those Purchases were unmapped and what those unmapped Purchases look like.

Resource Information

Request Format XML
Response Format XML

Request Header

Name Type Description
String String Authentication Token

Request Body

Name Type Description
importedFrom String Consider only Purchases imported after this date. This should be in the format YYYY-MM-DD'T'HH:mm:SS
importedTo String Consider only Purchases imported before this date. This should be in the format YYYY-MM-DD'T'HH:mm:SS
customerCode String Consider only Purchases for the specified customer
fetchUnmapped Boolean Whether or not to consider unmapped Purchases

Response

Name Type Description
Result PurchaseImportStatsResult The actual result. Some counts for the specified criteria.
ResultCode String String indicating the result. Either "Success" or "Error".
ResultMessage String Empty when call successful, error message otherwise.

In the case of an internal unhandled fault, a Fault object is returned instead. Providing information on what occurred exactly.

Examples

Request

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Header xmlns:s="System"><s:String>2284e52f-df50-489f-b3e6-4735fcdbeadf</s:String></Header>
    <Body>
        <GetPurchaseImportStats xmlns="http://tempuri.org/">
            <importedFrom>2014-12-01T00:00:00</importedFrom>
            <importedTo>2014-12-31T23:59:59</importedTo>
            <customerCode>6</customerCode>
            <fetchUnmapped>true</fetchUnmapped>
        </GetPurchaseImportStats>
    </Body>
</Envelope>

Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <GetPurchaseImportStatsResponse xmlns="http://tempuri.org/">
            <GetPurchaseImportStatsResult xmlns:a="http://schemas.datacontract.org/2004/07/Kolonel.Public.Service.API.Contracts.V1_0" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <a:Result>
                    <a:PurchaseCount>180</a:PurchaseCount>
                    <a:UnmappedPurchaseCount>1</a:UnmappedPurchaseCount>
                    <a:UnmappedPurchases>
                        <a:PurchaseImportStatsUnmappedItem>
                            <a:CustomerCode>6</a:CustomerCode>
                            <a:CustomerId>52384672ef4f8911c455116c</a:CustomerId>
                            <a:Id>545277bd18ad480968cda8b3</a:Id>
                            <a:ImportedDate>2014-10-30T18:39:09.344+01:00</a:ImportedDate>
                            <a:ProductClusterId i:nil="true"/>
                            <a:ProductLabel>Unmapped Product</a:ProductLabel>
                            <a:PurchaseReference>ff5572a6-d2cf-45b3-8d5a-b1328f35c95c</a:PurchaseReference>
                        </a:PurchaseImportStatsUnmappedItem>
                    </a:UnmappedPurchases>
                </a:Result>
                <a:ResultCode>Success</a:ResultCode>
                <a:ResultMessage/>
            </GetPurchaseImportStatsResult>
        </GetPurchaseImportStatsResponse>
    </s:Body>
</s:Envelope>