POST api/v1/CustomerCPA
Retrieve customer CPA for a collection of customers
You can send either account numbers or customer ids dending on what you have stored
This is a legacy API feature and should only be used if directed by Caliq
Request Information
URI Parameters
None.
Body Parameters
CustomerCPAParamsName | Description | Type | Additional information |
---|---|---|---|
apiKey |
Please contact Caliq support to get your key |
string |
Required |
CustomerIDs |
The list of customer IDs you want returned, can be empty if using codes. Pipe seperator |
Collection of integer |
None. |
AccountNumbers |
The list of account numbers you want returned, can be empty if using ID's / Codes. Pipe seperator |
Collection of string |
None. |
Request Formats
application/json, text/json
{ "CustomerIDs": [ 1, 2 ], "AccountNumbers": [ "sample string 1", "sample string 2" ], "apiKey": "sample string 1" }
application/xml, text/xml
<CustomerCPAParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CustomerIDs> <int>1</int> <int>2</int> </CustomerIDs> <AccountNumbers> <string>sample string 1</string> <string>sample string 2</string> </AccountNumbers> <apiKey>sample string 1</apiKey> </CustomerCPAParams>
Response Information
Resource Description
Returns:
200 OK Returns a collection of customer CPA data
400 Bad Request - parameters supplied cannot be properly interpreted
401 Not Authorised if supplied api key is not valid
204 No Content if the requested account numbers or customer ids don't exist
503 Service Unavailable
Name | Description | Type | Additional information |
---|---|---|---|
CustCPARulesList | Collection of CPACustomer |
None. |
Response Formats
application/json, text/json
{ "CustCPARulesList": [ { "ID": 1, "AccountNo": "sample string 2", "Currency": "sample string 3", "PriceListID": 4, "PriceListName": "sample string 5", "PriceListStandard": 6, "NormalDisc": 7.0, "AlwaysGetsBulk": "sample string 8", "NeverGetsBulk": "sample string 9", "MarkupOnCost": 10.0, "CPARules": [ { "ID": 1, "Code": "sample string 2", "Price": 3.0 }, { "ID": 1, "Code": "sample string 2", "Price": 3.0 } ] }, { "ID": 1, "AccountNo": "sample string 2", "Currency": "sample string 3", "PriceListID": 4, "PriceListName": "sample string 5", "PriceListStandard": 6, "NormalDisc": 7.0, "AlwaysGetsBulk": "sample string 8", "NeverGetsBulk": "sample string 9", "MarkupOnCost": 10.0, "CPARules": [ { "ID": 1, "Code": "sample string 2", "Price": 3.0 }, { "ID": 1, "Code": "sample string 2", "Price": 3.0 } ] } ] }
application/xml, text/xml
<CPARulesList xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CPACustomer> <ID>1</ID> <AccountNo>sample string 2</AccountNo> <Currency>sample string 3</Currency> <PriceListID>4</PriceListID> <PriceListName>sample string 5</PriceListName> <PriceListStandard>6</PriceListStandard> <NormalDisc>7</NormalDisc> <AlwaysGetsBulk>sample string 8</AlwaysGetsBulk> <NeverGetsBulk>sample string 9</NeverGetsBulk> <MarkupOnCost>10</MarkupOnCost> <CPARules> <CPARule> <ID>1</ID> <Code>sample string 2</Code> <Price>3</Price> </CPARule> <CPARule> <ID>1</ID> <Code>sample string 2</Code> <Price>3</Price> </CPARule> </CPARules> </CPACustomer> <CPACustomer> <ID>1</ID> <AccountNo>sample string 2</AccountNo> <Currency>sample string 3</Currency> <PriceListID>4</PriceListID> <PriceListName>sample string 5</PriceListName> <PriceListStandard>6</PriceListStandard> <NormalDisc>7</NormalDisc> <AlwaysGetsBulk>sample string 8</AlwaysGetsBulk> <NeverGetsBulk>sample string 9</NeverGetsBulk> <MarkupOnCost>10</MarkupOnCost> <CPARules> <CPARule> <ID>1</ID> <Code>sample string 2</Code> <Price>3</Price> </CPARule> <CPARule> <ID>1</ID> <Code>sample string 2</Code> <Price>3</Price> </CPARule> </CPARules> </CPACustomer> </CPARulesList>