POST api/Barcode/GetInfo

Retrieves info about a barcode. How many sold and inwarded for the last three years as well as current stock information. This is useful for a handheld device or similar.

Request Information

URI Parameters

None.

Body Parameters

EskimoClassLibraries.BarcodeArguments
NameDescriptionTypeAdditional information
Barcode

The barcode number scanned

string

Required

StartDay

The day of the month to start the query from

integer

Required

Range: inclusive between 1 and 31

StartMonth

The month of the year to start the query from

integer

Required

Range: inclusive between 1 and 12

EndDay

The day of the month to end the query from

integer

Required

Range: inclusive between 1 and 31

EndMonth

The month of the year to end the query from

integer

Required

Range: inclusive between 1 and 12

Request Formats

application/json, text/json

Sample:
{
  "Barcode": "sample string 1",
  "StartDay": 2,
  "StartMonth": 3,
  "EndDay": 4,
  "EndMonth": 5
}

application/xml, text/xml

Sample:
<BarcodeArguments xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EskimoClassLibraries">
  <Barcode>sample string 1</Barcode>
  <EndDay>4</EndDay>
  <EndMonth>5</EndMonth>
  <StartDay>2</StartDay>
  <StartMonth>3</StartMonth>
</BarcodeArguments>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

EskimoClassLibraries.clsBarcodeInfo
NameDescriptionTypeAdditional information
ProductInfo

Information about the product itself

EskimoClassLibraries.clsProductCode

None.

CurrentYear

Sales and Inward counts for the Current Year

EskimoClassLibraries.clsTotals

None.

PreviousYear

Sales and Inward counts for the Previous Year

EskimoClassLibraries.clsTotals

None.

MinusTwoYears

Sales and Inward counts for two years ago

EskimoClassLibraries.clsTotals

None.

CurrentStock1

The current stock level in Stock Location 1

integer

None.

CurrentStock2

The current stock level in Stock Location 2

integer

None.

CurrentStock3

The current stock level in Stock Location 3

integer

None.

GroupStock

The amount of stock available in other branches/outlets

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "ProductInfo": {
    "BarCodes": [
      "sample string 1",
      "sample string 2"
    ],
    "Description": "sample string 1",
    "Colour": "sample string 2",
    "Size": "sample string 3",
    "CaseQty": 4,
    "InnerQty": 5
  },
  "CurrentYear": {
    "SalesTotal": 1,
    "GoodsInwardTotal": 2
  },
  "PreviousYear": {
    "SalesTotal": 1,
    "GoodsInwardTotal": 2
  },
  "MinusTwoYears": {
    "SalesTotal": 1,
    "GoodsInwardTotal": 2
  },
  "CurrentStock1": 1,
  "CurrentStock2": 2,
  "CurrentStock3": 3,
  "GroupStock": 4
}

application/xml, text/xml

Sample:
<clsBarcodeInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EskimoClassLibraries">
  <CurrentStock1>1</CurrentStock1>
  <CurrentStock2>2</CurrentStock2>
  <CurrentStock3>3</CurrentStock3>
  <CurrentYear>
    <GoodsInwardTotal>2</GoodsInwardTotal>
    <SalesTotal>1</SalesTotal>
  </CurrentYear>
  <GroupStock>4</GroupStock>
  <MinusTwoYears>
    <GoodsInwardTotal>2</GoodsInwardTotal>
    <SalesTotal>1</SalesTotal>
  </MinusTwoYears>
  <PreviousYear>
    <GoodsInwardTotal>2</GoodsInwardTotal>
    <SalesTotal>1</SalesTotal>
  </PreviousYear>
  <ProductInfo>
    <BarCodes xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </BarCodes>
    <CaseQty>4</CaseQty>
    <Colour>sample string 2</Colour>
    <Description>sample string 1</Description>
    <InnerQty>5</InnerQty>
    <Size>sample string 3</Size>
  </ProductInfo>
</clsBarcodeInfo>