Retrieve profit and loss per ASIN for a vendor channel
curl --request GET \
--url https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss \
--header 'x-api-key: <api-key>'import requests
url = "https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss', 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/profitability/vendorProductProfitAndLoss",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"asin": "B0XXXXXXXX",
"title": "Classic Eau de Toilette for Men",
"linkUrl": "https://amazon.com/dp/B0XXXXXXXX",
"imageUrl": "https://m.media-amazon.com/images/I/XXXX.jpg",
"shippedCogs": 12400,
"shippedUnits": 480,
"snsUnits": 35,
"advertisingSpend": 900,
"cogs": 6100,
"deductions": 420,
"chargebacks": 15,
"totalExpenses": 7435,
"totalProfit": 4965,
"inventoryQuantity": 1200
}
],
"pagination": {
"pageIndex": 0,
"pageSize": 20,
"count": 123
},
"meta": {
"currency": "USD",
"sellType": "SELL_OUT"
}
}Profitability
Retrieve profit and loss per ASIN for a vendor channel
Vendor only. Returns the profit and loss per ASIN for a sell type.
GET
/
profitability
/
vendorProductProfitAndLoss
Retrieve profit and loss per ASIN for a vendor channel
curl --request GET \
--url https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss \
--header 'x-api-key: <api-key>'import requests
url = "https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss', 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/profitability/vendorProductProfitAndLoss",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mm-api.merchantspring.io/profitability/vendorProductProfitAndLoss")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"asin": "B0XXXXXXXX",
"title": "Classic Eau de Toilette for Men",
"linkUrl": "https://amazon.com/dp/B0XXXXXXXX",
"imageUrl": "https://m.media-amazon.com/images/I/XXXX.jpg",
"shippedCogs": 12400,
"shippedUnits": 480,
"snsUnits": 35,
"advertisingSpend": 900,
"cogs": 6100,
"deductions": 420,
"chargebacks": 15,
"totalExpenses": 7435,
"totalProfit": 4965,
"inventoryQuantity": 1200
}
],
"pagination": {
"pageIndex": 0,
"pageSize": 20,
"count": 123
},
"meta": {
"currency": "USD",
"sellType": "SELL_OUT"
}
}Query Parameters
Field to sort by (default shippedCogs for SELL_OUT, netReceipts for SELL_IN). shippedCogs and shippedUnits are SELL_OUT only; netReceipts, receivedUnits, cancelledUnits, rejectedUnits, cancelledValue and rejectedValue are SELL_IN only. A key for the other sell type returns 400.
Available options:
shippedCogs, shippedUnits, netReceipts, receivedUnits, cancelledUnits, rejectedUnits, cancelledValue, rejectedValue, advertisingSpend, inventoryQuantity, chargebacks, cogs, deductions, totalExpenses, totalProfit Was this page helpful?