Skip to main content
POST
/
reports
/
view
/
salesByProduct
View sales by product report
curl --request POST \
  --url https://mm-api.merchantspring.io/reports/view/salesByProduct \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "channelId": "<string>",
  "merchantId": "<string>",
  "fromDate": 123,
  "toDate": 123,
  "priorFromDate": 123,
  "priorToDate": 123,
  "timezone": "<string>",
  "pageSize": 123,
  "pageIndex": 123,
  "sortKey": "totalSales",
  "sortOrder": "desc",
  "searchText": "",
  "includeNoSales": false,
  "includeNoInventory": false,
  "includeTax": false
}
'
{
  "rows": [
    {
      "current": {
        "productId": "<string>",
        "totalSales": 123,
        "unitsSold": 123,
        "title": "<string>",
        "sku": "<string>",
        "productSku": "<string>",
        "linkUrl": "<string>",
        "imageUrl": "<string>",
        "price": 123,
        "avPrice": 123,
        "lastSold": "<string>",
        "noQuantitySinceTime": "<string>",
        "acos": 123,
        "tacos": 123,
        "directFulfillmentPOValue": 123,
        "directFulfillmentUnits": 123,
        "directFulfillmentPOValuePercent": 123,
        "directFulfillmentUnitsPercent": 123
      },
      "prior": {
        "productId": "<string>",
        "totalSales": 123,
        "unitsSold": 123,
        "title": "<string>",
        "sku": "<string>",
        "productSku": "<string>",
        "linkUrl": "<string>",
        "imageUrl": "<string>",
        "price": 123,
        "avPrice": 123,
        "lastSold": "<string>",
        "noQuantitySinceTime": "<string>",
        "acos": 123,
        "tacos": 123,
        "directFulfillmentPOValue": 123,
        "directFulfillmentUnits": 123,
        "directFulfillmentPOValuePercent": 123,
        "directFulfillmentUnitsPercent": 123
      }
    }
  ],
  "count": 123
}

Authorizations

x-api-key
string
header
required

Body

application/json

Sales by product report criteria

channelId
string
required
merchantId
string
required
fromDate
integer
required

Unix epoch time (seconds) representing the start of the reporting period

toDate
integer
required

Unix epoch time (seconds) representing the end of the reporting period

priorFromDate
integer
required

Unix epoch time (seconds) representing the start of the prior comparison period

priorToDate
integer
required

Unix epoch time (seconds) representing the end of the prior comparison period

timezone
string
pageSize
integer
pageIndex
integer
sortKey
string
default:totalSales
sortOrder
enum<string>
default:desc
Available options:
asc,
desc
searchText
string
default:""
includeNoSales
boolean
default:false

Whether products with no sales should be included

includeNoInventory
boolean
default:false

Whether products with zero inventory should be included

includeTax
boolean
default:false

Whether tax should be included in sales figures

Response

Successful operation

JSON response for the sales by product view endpoint

rows
object[]

Array of product rows with current and prior period metrics

count
integer

Total number of rows matching the query