POST api/v1/TopSellersCustCategory

Retrieve a list of all top selling items by customer category
Data can be based on sales qty, value or margin
Only items in stock will be included

Request Information

URI Parameters

None.

Body Parameters

TopSellersCCParams
NameDescriptionTypeAdditional information
apiKey

Please contact Caliq support to get your key

string

Required

Category

Get top sellers for thsi customer category code, leave null for all

string

None.

ProductCount

How many products to return for each category

integer

None.

RankBy

(Q)ty sold, sales (V)alue, (M)argin made

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Category": "sample string 1",
  "ProductCount": 2,
  "RankBy": "sample string 3",
  "apiKey": "sample string 1"
}

application/xml, text/xml

Sample:
<TopSellersCCParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Category>sample string 1</Category>
  <ProductCount>2</ProductCount>
  <RankBy>sample string 3</RankBy>
  <apiKey>sample string 1</apiKey>
</TopSellersCCParams>

Response Information

Resource Description

Returns:
200 OK Returns a collection of top sellers
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 customer did not buy anything or doesnt exist 503 Service Unavailable

TopSellersCategories
NameDescriptionTypeAdditional information
TopSellersCategoriesList

Collection of TopSellersCategory

None.

Response Formats

application/json, text/json

Sample:
{
  "TopSellersCategoriesList": [
    {
      "Code": "sample string 1",
      "Description": "sample string 2",
      "TopSellerList": {
        "TopSellersList": [
          {
            "ID": 1,
            "Code": "sample string 2",
            "Description": "sample string 3",
            "Ranking": 4,
            "QtySold": 5,
            "ValueSold": 6.0
          },
          {
            "ID": 1,
            "Code": "sample string 2",
            "Description": "sample string 3",
            "Ranking": 4,
            "QtySold": 5,
            "ValueSold": 6.0
          }
        ]
      }
    },
    {
      "Code": "sample string 1",
      "Description": "sample string 2",
      "TopSellerList": {
        "TopSellersList": [
          {
            "ID": 1,
            "Code": "sample string 2",
            "Description": "sample string 3",
            "Ranking": 4,
            "QtySold": 5,
            "ValueSold": 6.0
          },
          {
            "ID": 1,
            "Code": "sample string 2",
            "Description": "sample string 3",
            "Ranking": 4,
            "QtySold": 5,
            "ValueSold": 6.0
          }
        ]
      }
    }
  ]
}

application/xml, text/xml

Sample:
<TopSellersCategories xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <TopSellersCategory>
    <Code>sample string 1</Code>
    <Description>sample string 2</Description>
    <TopSellerList>
      <TopSeller>
        <ID>1</ID>
        <Code>sample string 2</Code>
        <Description>sample string 3</Description>
        <Ranking>4</Ranking>
        <QtySold>5</QtySold>
        <ValueSold>6</ValueSold>
      </TopSeller>
      <TopSeller>
        <ID>1</ID>
        <Code>sample string 2</Code>
        <Description>sample string 3</Description>
        <Ranking>4</Ranking>
        <QtySold>5</QtySold>
        <ValueSold>6</ValueSold>
      </TopSeller>
    </TopSellerList>
  </TopSellersCategory>
  <TopSellersCategory>
    <Code>sample string 1</Code>
    <Description>sample string 2</Description>
    <TopSellerList>
      <TopSeller>
        <ID>1</ID>
        <Code>sample string 2</Code>
        <Description>sample string 3</Description>
        <Ranking>4</Ranking>
        <QtySold>5</QtySold>
        <ValueSold>6</ValueSold>
      </TopSeller>
      <TopSeller>
        <ID>1</ID>
        <Code>sample string 2</Code>
        <Description>sample string 3</Description>
        <Ranking>4</Ranking>
        <QtySold>5</QtySold>
        <ValueSold>6</ValueSold>
      </TopSeller>
    </TopSellerList>
  </TopSellersCategory>
</TopSellersCategories>