Insights Data Activity APIs

The following APIs are available:

POS Sales Summary API

The POS Sales Summary API returns summary POS product sales transactions for the specified request parameters.

Note that pagination is not supported.

 

Path:  `/possalessummary`

Verb:  `GET`

 

The following table describes the query parameters used for the GET method.

Parameter Type Required Description
StartDate string Yes The date range (in YYYY-MM-DD format) to filter transactions by receipt date.
EndDate string Yes The date range (in YYYY-MM-DD format) to filter transactions by receipt date.
Grouping string Yes

Group and total the transactions using one of the following grouping methods:

  • Class
  • Department
  • Sub-Class
  • Product
ProductSite string   Names of product sites
TransSite string   Names of transaction sites
CenterID string   Transaction center IDs
StationID string   Transaction workstation IDs

 

The following table describes the data returned by the API:

Key Description

groupname

Group name.

groupid

Group ID.

gross_QTY

The gross quantity of products sold within this department/class/sub-class/product group.

rfnd_QTY

The quantity of products refunded within this department/class/sub-class/product group, if it is not zero.

net_QTY

The net quantity of products sold within this department/class/sub-class/product group.

gross_AMOUNT

The gross amount sold within this department/class/sub-class/product group.

rfnd_AMOUNT

The total amount refunded within this department/class/sub-class/product group, if it is not zero.

net_AMOUNT

The net amount sold within this department/class/sub-class/product group.

discount

The total discount applied to sales within this department/class/sub-class/product group.

sortOrder

This field displays 1 when groupname is not blank and displays 2 when groupname is blank.

Responses

This API will retrieve multiple records per API call depending on the specified request parameters. All results are returned in a single API response.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/possalessummary?StartDate=2017-1-1&EndDate=2018-1-31&Grouping=class&api_key=xxx

Example response

[

    {

        "groupname": "Class 1",

        "groupid": 11,

        "gross_QTY": "1.0000",

        "rfnd_QTY": "-1.0000",

        "net_QTY": "0.0000",

        "gross_AMOUNT": "42.5000",

        "rfnd_AMOUNT": "30.5000",

        "net_AMOUNT": "73.0000",

        "discount": "0.0000",

        "sortOrder": 1

    },

    {

        "groupname": "Class 2",

        "groupid": 12,

        "gross_QTY": "3.0000",

        "rfnd_QTY": "-1.0000",

        "net_QTY": "2.0000",

        "gross_AMOUNT": "12.8600",

        "rfnd_AMOUNT": "-5.4700",

        "net_AMOUNT": "7.3900",

        "discount": "-5.4700",

        "sortOrder": 1

    },

]

 

POS Sales Detail API

The POS Sales Detail API returns detailed POS product sales transactions for the specified request parameters.

Note that pagination is not supported.

 

Path:  `/possalesdetail`

Verb:  `GET`

 

The following table describes the query parameters used for the GET method.

Parameter Type Required Description
StartDate string Yes The date range (in YYYY-MM-DD format) to filter transactions by receipt date.
EndDate string Yes The date range (in YYYY-MM-DD format) to filter transactions by receipt date.
Grouping string Yes

Group and total the transactions using one of the following grouping methods:

  • Class
  • Department
  • Sub-Class
  • Product
GroupingID string  

ID of the grouping method

ProductSite string   Names of product sites
TransSite string   Names of transaction sites
CenterID string   Transaction center IDs
StationID string   Transaction workstation IDs

 

The following table describes the data returned by the API:

 

Key Description
groupname Name of the grouping method
gross_QTY The gross quantity sold (including zero).
net_QTY The net quantity sold (including zero).
gross_AMOUNT The gross amount sold (including zero). This is the amount after discount: the actual paid amount.
rfnd_AMOUNT Quantity refunded if not zero.
net_AMOUNT The net amount sold (including zero).
discount The discount applied to the sale.
receiptNumber Receipt number
transactionSiteID The ID of the transaction site.
transactionSite The name of the transaction site.
productSiteID The ID of the product site.
station_ID The ID of the workstation where this transaction took place.
workstationname The workstation where this transaction took place.
transactionCenterID The transaction center for which to report sales.
productType The product type linked to this product.
productdepartment_ID The ID of the department to which this product belongs.
department The name of the department to which this product belongs.
productclass_ID The ID of the class category to which this product belongs.
class The Name of the class category to which this product belongs.
productsubclass_ID The ID of the Sub-class category to which this product belongs.
subclass The Name of the sub-class category to which this product belongs.
posproduct_ID The ID of the POS product.
productname The name of the POS product.
upc The Universal Product Code configured for the POS product
customer_ID Customer ID
receiptDate Receipt date
receiptTime Receipt time

 

Responses

This API will retrieve multiple records per API call depending on the specified request parameters. All results are returned in a single API response.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/possalesdetail?StartDate=2017-1-1&EndDate=2018-1-31&Grouping=class&api_key=xxx

Example response

[

    {

        "groupname": "Class A",

        "gross_QTY": "1.0000",

        "net_QTY": "1.0000",

        "gross_AMOUNT": "42.5000",

        "rfnd_AMOUNT": "0.0000",

        "net_AMOUNT": "42.5000",

        "discount": "0.0000",

        "receiptNumber": "1005370.0060",

        "transactionSiteID": 6,

        "transactionSite": "Site A",

        "productSiteID": 0,

        "station_ID": 25,

        "workstationname": "Workstation A",

        "transactionCenterID": 5,

        "transactionCenter": "Center A",

        "productType": "Standard POS Product",

        "productdepartment_ID": 11,

        "department": "Department A",

        "productclass_ID": 11,

        "class": "Class A",

        "productsubclass_ID": 8,

        "subclass": "Subclass A",

        "posproduct_ID": 46,

        "productname": "Product Test",

        "upc": "126",

        "customer_ID": 1,

        "receiptDate": "2017-01-04",

        "receiptTime": "22:58:30"

    }

]

 

 

POS YTD Summary API

The POS YTD (Year to Date) Summary API returns Year-to-Date (YTD) POS product sales transactions for the specified request parameters.

Note that pagination is not supported.

 

Path:  `/posytdsummary`

Verb:  `GET`

 

The following table describes the query parameters used for the GET method.

Parameter Type Required Description
StartDate string Yes

The date (in YYYY-MM-DD format) to filter transactions by transaction date of POS receipts.

TransSite string   Names of transaction sites.
CenterID string   Transaction center IDs.

 

The following table describes the data returned by the API:

 

Key Description
productname

Name of the POS Product.

department The name of the department to which this product belongs.
subclass The Name of the sub-class category to which this product belongs.
net_AMOUNT The net amount sold (including zero).
Class The Name of the class category to which this product belongs.
transactionSiteID The ID of the transaction site.
transactionSite The name of the transaction site.
transYear The year in which this transaction occurred.
transMonth The month in which this transaction occurred.

 

Responses

This API will retrieve multiple records per API call depending on the specified request parameters. All results are returned in a single API response.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/posytdsummary?StartDate=2017-1-1&api_key=xxx

Example response

[

    {

        "productname": "Product A",

        "department": "Department A",

        "subclass": "Subclass A",

        "net_AMOUNT": "5.5000",

        "class": "Class A",

        "transSite_ID": 6,

        "transSite_NM": "Site test",

        "transYear": "2017",

        "transMonth": "1"

    },

    {

        "productname": "Product B",

        "department": "Department B",

        "subclass": "Subclass B",

        "net_AMOUNT": "56.6700",

        "class": "Class B",

        "transSite_ID": 23,

        "transSite_NM": "Site B",

        "transYear": "2017",

        "transMonth": "7"

    }

]

 

Related topics

Getting Started Guide

Authentication

Retrieving data from ACTIVE Net Insights

Common parameters

Error handling