curl --request POST \
--url https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"merchantId": "<string>",
"channelId": "<string>",
"reportOptions": {
"fromDate": 123,
"toDate": 123,
"priorFromDate": 123,
"priorToDate": 123,
"timezone": "<string>"
},
"asins": [
"<string>"
]
}
'import requests
url = "https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod"
payload = {
"merchantId": "<string>",
"channelId": "<string>",
"reportOptions": {
"fromDate": 123,
"toDate": 123,
"priorFromDate": 123,
"priorToDate": 123,
"timezone": "<string>"
},
"asins": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchantId: '<string>',
channelId: '<string>',
reportOptions: {
fromDate: 123,
toDate: 123,
priorFromDate: 123,
priorToDate: 123,
timezone: '<string>'
},
asins: ['<string>']
})
};
fetch('https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantId' => '<string>',
'channelId' => '<string>',
'reportOptions' => [
'fromDate' => 123,
'toDate' => 123,
'priorFromDate' => 123,
'priorToDate' => 123,
'timezone' => '<string>'
],
'asins' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod"
payload := strings.NewReader("{\n \"merchantId\": \"<string>\",\n \"channelId\": \"<string>\",\n \"reportOptions\": {\n \"fromDate\": 123,\n \"toDate\": 123,\n \"priorFromDate\": 123,\n \"priorToDate\": 123,\n \"timezone\": \"<string>\"\n },\n \"asins\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": \"<string>\",\n \"channelId\": \"<string>\",\n \"reportOptions\": {\n \"fromDate\": 123,\n \"toDate\": 123,\n \"priorFromDate\": 123,\n \"priorToDate\": 123,\n \"timezone\": \"<string>\"\n },\n \"asins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchantId\": \"<string>\",\n \"channelId\": \"<string>\",\n \"reportOptions\": {\n \"fromDate\": 123,\n \"toDate\": 123,\n \"priorFromDate\": 123,\n \"priorToDate\": 123,\n \"timezone\": \"<string>\"\n },\n \"asins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"currency": "<string>",
"formattedChartData": [
{
"startTime": "<string>",
"endTime": "<string>",
"glanceViews": 123,
"priorGlanceViews": 123,
"orderedRevenue": "<string>",
"priorOrderedRevenue": "<string>",
"orderedUnits": 123,
"priorOrderedUnits": 123,
"conversionRate": "<string>",
"priorConversionRate": "<string>",
"retailPrice": "<string>",
"priorRetailPrice": "<string>",
"shippedRevenue": "<string>",
"priorShippedRevenue": "<string>",
"shippedRevenueManufacturing": "<string>",
"priorShippedRevenueManufacturing": "<string>",
"shippedCogs": "<string>",
"priorShippedCogs": "<string>",
"shippedCogsManufacturing": "<string>",
"priorShippedCogsManufacturing": "<string>",
"shippedUnits": 123,
"priorShippedUnits": 123,
"shippedUnitsManufacturing": 123,
"priorShippedUnitsManufacturing": 123,
"adSales": "<string>",
"priorAdSales": "<string>",
"adSpend": "<string>",
"priorAdSpend": "<string>",
"acos": "<string>",
"priorAcos": "<string>",
"tacosOrderedRevenue": "<string>",
"priorTacosOrderedRevenue": "<string>",
"tacosShippedRevenue": "<string>",
"priorTacosShippedRevenue": "<string>",
"tacosManufacturing": "<string>",
"priorTacosManufacturing": "<string>",
"impressions": 123,
"priorImpressions": 123,
"clicks": 123,
"priorClicks": 123,
"clickThroughRate": "<string>",
"priorClickThroughRate": "<string>",
"currency": "<string>"
}
]
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}Retrieve vendor sales-by-period performance
Retrieve aggregated revenue with advertising metrics for a merchant over the selected date range, grouped by the requested interval.
curl --request POST \
--url https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"merchantId": "<string>",
"channelId": "<string>",
"reportOptions": {
"fromDate": 123,
"toDate": 123,
"priorFromDate": 123,
"priorToDate": 123,
"timezone": "<string>"
},
"asins": [
"<string>"
]
}
'import requests
url = "https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod"
payload = {
"merchantId": "<string>",
"channelId": "<string>",
"reportOptions": {
"fromDate": 123,
"toDate": 123,
"priorFromDate": 123,
"priorToDate": 123,
"timezone": "<string>"
},
"asins": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchantId: '<string>',
channelId: '<string>',
reportOptions: {
fromDate: 123,
toDate: 123,
priorFromDate: 123,
priorToDate: 123,
timezone: '<string>'
},
asins: ['<string>']
})
};
fetch('https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantId' => '<string>',
'channelId' => '<string>',
'reportOptions' => [
'fromDate' => 123,
'toDate' => 123,
'priorFromDate' => 123,
'priorToDate' => 123,
'timezone' => '<string>'
],
'asins' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod"
payload := strings.NewReader("{\n \"merchantId\": \"<string>\",\n \"channelId\": \"<string>\",\n \"reportOptions\": {\n \"fromDate\": 123,\n \"toDate\": 123,\n \"priorFromDate\": 123,\n \"priorToDate\": 123,\n \"timezone\": \"<string>\"\n },\n \"asins\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": \"<string>\",\n \"channelId\": \"<string>\",\n \"reportOptions\": {\n \"fromDate\": 123,\n \"toDate\": 123,\n \"priorFromDate\": 123,\n \"priorToDate\": 123,\n \"timezone\": \"<string>\"\n },\n \"asins\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/reports/view/vendorSalesByPeriod")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchantId\": \"<string>\",\n \"channelId\": \"<string>\",\n \"reportOptions\": {\n \"fromDate\": 123,\n \"toDate\": 123,\n \"priorFromDate\": 123,\n \"priorToDate\": 123,\n \"timezone\": \"<string>\"\n },\n \"asins\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"currency": "<string>",
"formattedChartData": [
{
"startTime": "<string>",
"endTime": "<string>",
"glanceViews": 123,
"priorGlanceViews": 123,
"orderedRevenue": "<string>",
"priorOrderedRevenue": "<string>",
"orderedUnits": 123,
"priorOrderedUnits": 123,
"conversionRate": "<string>",
"priorConversionRate": "<string>",
"retailPrice": "<string>",
"priorRetailPrice": "<string>",
"shippedRevenue": "<string>",
"priorShippedRevenue": "<string>",
"shippedRevenueManufacturing": "<string>",
"priorShippedRevenueManufacturing": "<string>",
"shippedCogs": "<string>",
"priorShippedCogs": "<string>",
"shippedCogsManufacturing": "<string>",
"priorShippedCogsManufacturing": "<string>",
"shippedUnits": 123,
"priorShippedUnits": 123,
"shippedUnitsManufacturing": 123,
"priorShippedUnitsManufacturing": 123,
"adSales": "<string>",
"priorAdSales": "<string>",
"adSpend": "<string>",
"priorAdSpend": "<string>",
"acos": "<string>",
"priorAcos": "<string>",
"tacosOrderedRevenue": "<string>",
"priorTacosOrderedRevenue": "<string>",
"tacosShippedRevenue": "<string>",
"priorTacosShippedRevenue": "<string>",
"tacosManufacturing": "<string>",
"priorTacosManufacturing": "<string>",
"impressions": 123,
"priorImpressions": 123,
"clicks": 123,
"priorClicks": 123,
"clickThroughRate": "<string>",
"priorClickThroughRate": "<string>",
"currency": "<string>"
}
]
}{
"status": "error",
"error": "<string>"
}{
"status": "error",
"error": "<string>"
}Authorizations
Body
Report filters that identify the merchant, time range, and marketplace scope to evaluate.
Payload used to request the vendor sales-by-period view report.
MerchantSpring merchant identifier for the account whose performance should be returned.
MerchantSpring channel identifier for the account whose performance should be returned.
Defines the reporting window and comparison period that should be analysed.
Show child attributes
Show child attributes
Optional list of ASINs to restrict the dataset to specific products.
Response
Aggregated performance data grouped to match the requested interval.
Successful response returned by the sales-by-period report endpoint.
Indicates that the request completed successfully.
success Currency code associated with the returned metrics.
Display-ready metrics including formatted strings and comparison values for each interval.
Show child attributes
Show child attributes
Was this page helpful?