curl --request GET \
--url https://omnicommerce.sg/api/v1/analytics/profit \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omnicommerce.sg/api/v1/analytics/profit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/analytics/profit"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"ok": true,
"apiVersion": "developer_v1",
"operationId": "<string>",
"status": "accepted",
"warnings": [
"<string>"
],
"recommendations": [
"<string>"
],
"links": {},
"data": {
"filters": {
"from": "<string>",
"to": "<string>",
"marketplace": "<string>",
"country": "<string>",
"store": "<string>",
"currency": "<string>",
"timeZone": "<string>",
"sku": "<string>"
},
"reportingBasis": "earnings",
"currentRange": {
"from": "<string>",
"to": "<string>"
},
"previousRange": {
"from": "<string>",
"to": "<string>"
},
"metricCards": [
{
"id": "net_revenue",
"label": "<string>",
"value": 123,
"unit": "currency",
"changePercent": 123
}
],
"dailyTrend": [
{
"date": "<string>",
"netRevenue": 123,
"netProfit": 123,
"earningsAfterFees": 123
}
],
"waterfall": [
{
"id": "gross_sales",
"label": "<string>",
"amount": 123,
"kind": "positive"
}
],
"breakdownSections": [
{
"id": "revenue",
"title": "<string>",
"total": 123,
"rows": [
{
"id": "<string>",
"label": "<string>",
"amount": 123,
"unit": "currency"
}
]
}
],
"insights": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"tone": "positive"
}
],
"profitabilitySnapshot": {
"marketplaceCosts": 123,
"earningsAfterFees": 123,
"earningsRate": 123,
"totalKnownCosts": 123,
"ordersInRange": 0,
"costRatio": 123,
"shippingRatio": 123,
"uncostedUnits": 123
},
"missingCostProducts": [
{
"productId": "<string>",
"variantId": "<string>",
"name": "<string>",
"variantName": "<string>",
"thumbnailUrl": "<string>",
"sku": "<string>",
"soldUnits": 123,
"marketplaces": [
"<string>"
],
"countries": [
"<string>"
]
}
],
"topProducts": [
{
"productId": "<string>",
"variantId": "<string>",
"name": "<string>",
"variantName": "<string>",
"thumbnailUrl": "<string>",
"sku": "<string>",
"unitsSold": 123,
"totalRevenue": 123,
"totalCogs": 123,
"totalFees": 123,
"earningsAfterFees": 123,
"earningsRate": 123,
"totalProfit": 123,
"profitMargin": 123,
"knownCostProfit": 123,
"knownCostMargin": 123,
"costCoverage": 123,
"marketplaces": [
"<string>"
]
}
],
"underperformingProducts": [
{
"productId": "<string>",
"variantId": "<string>",
"name": "<string>",
"variantName": "<string>",
"thumbnailUrl": "<string>",
"sku": "<string>",
"unitsSold": 123,
"totalRevenue": 123,
"totalCogs": 123,
"totalFees": 123,
"earningsAfterFees": 123,
"earningsRate": 123,
"totalProfit": 123,
"profitMargin": 123,
"knownCostProfit": 123,
"knownCostMargin": 123,
"costCoverage": 123,
"marketplaces": [
"<string>"
]
}
],
"retailUplift": {
"currency": "<string>",
"soldUnits": 123,
"coveredUnits": 123,
"missingBaselineUnits": 123,
"priceBookRecordedUnits": 123,
"retailValue": 123,
"salesValue": 123,
"upliftAmount": 123,
"markupRate": 123
},
"notes": [
"<string>"
]
},
"jobId": "<string>",
"productId": "<string>"
}Get Profit Analytics
Revenue, costs, fees, and profit with a waterfall, cost breakdowns, a daily trend, the most and least profitable products, and products missing a cost price. Session members also need finance access. Matches the P&L Analysis page. Requires analytics:read.
Amounts are in data.filters.currency. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
curl --request GET \
--url https://omnicommerce.sg/api/v1/analytics/profit \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omnicommerce.sg/api/v1/analytics/profit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omnicommerce.sg/api/v1/analytics/profit"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"ok": true,
"apiVersion": "developer_v1",
"operationId": "<string>",
"status": "accepted",
"warnings": [
"<string>"
],
"recommendations": [
"<string>"
],
"links": {},
"data": {
"filters": {
"from": "<string>",
"to": "<string>",
"marketplace": "<string>",
"country": "<string>",
"store": "<string>",
"currency": "<string>",
"timeZone": "<string>",
"sku": "<string>"
},
"reportingBasis": "earnings",
"currentRange": {
"from": "<string>",
"to": "<string>"
},
"previousRange": {
"from": "<string>",
"to": "<string>"
},
"metricCards": [
{
"id": "net_revenue",
"label": "<string>",
"value": 123,
"unit": "currency",
"changePercent": 123
}
],
"dailyTrend": [
{
"date": "<string>",
"netRevenue": 123,
"netProfit": 123,
"earningsAfterFees": 123
}
],
"waterfall": [
{
"id": "gross_sales",
"label": "<string>",
"amount": 123,
"kind": "positive"
}
],
"breakdownSections": [
{
"id": "revenue",
"title": "<string>",
"total": 123,
"rows": [
{
"id": "<string>",
"label": "<string>",
"amount": 123,
"unit": "currency"
}
]
}
],
"insights": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"tone": "positive"
}
],
"profitabilitySnapshot": {
"marketplaceCosts": 123,
"earningsAfterFees": 123,
"earningsRate": 123,
"totalKnownCosts": 123,
"ordersInRange": 0,
"costRatio": 123,
"shippingRatio": 123,
"uncostedUnits": 123
},
"missingCostProducts": [
{
"productId": "<string>",
"variantId": "<string>",
"name": "<string>",
"variantName": "<string>",
"thumbnailUrl": "<string>",
"sku": "<string>",
"soldUnits": 123,
"marketplaces": [
"<string>"
],
"countries": [
"<string>"
]
}
],
"topProducts": [
{
"productId": "<string>",
"variantId": "<string>",
"name": "<string>",
"variantName": "<string>",
"thumbnailUrl": "<string>",
"sku": "<string>",
"unitsSold": 123,
"totalRevenue": 123,
"totalCogs": 123,
"totalFees": 123,
"earningsAfterFees": 123,
"earningsRate": 123,
"totalProfit": 123,
"profitMargin": 123,
"knownCostProfit": 123,
"knownCostMargin": 123,
"costCoverage": 123,
"marketplaces": [
"<string>"
]
}
],
"underperformingProducts": [
{
"productId": "<string>",
"variantId": "<string>",
"name": "<string>",
"variantName": "<string>",
"thumbnailUrl": "<string>",
"sku": "<string>",
"unitsSold": 123,
"totalRevenue": 123,
"totalCogs": 123,
"totalFees": 123,
"earningsAfterFees": 123,
"earningsRate": 123,
"totalProfit": 123,
"profitMargin": 123,
"knownCostProfit": 123,
"knownCostMargin": 123,
"costCoverage": 123,
"marketplaces": [
"<string>"
]
}
],
"retailUplift": {
"currency": "<string>",
"soldUnits": 123,
"coveredUnits": 123,
"missingBaselineUnits": 123,
"priceBookRecordedUnits": 123,
"retailValue": 123,
"salesValue": 123,
"upliftAmount": 123,
"markupRate": 123
},
"notes": [
"<string>"
]
},
"jobId": "<string>",
"productId": "<string>"
}Authorizations
Bearer API key for server-to-server access. Session auth is also supported in first-party UI flows.
Query Parameters
Required for session auth. API keys already belong to one organization.
160First day of the range (YYYY-MM-DD). Defaults to 29 days before to.
^\d{4}-\d{2}-\d{2}$Last day of the range, inclusive (YYYY-MM-DD). Defaults to today.
^\d{4}-\d{2}-\d{2}$IANA time zone that defines each day, for example Asia/Kuala_Lumpur. Defaults to Asia/Singapore.
80Comma-separated marketplaces, for example shopee,lazada.
200Comma-separated countries. One country selects its currency.
200Comma-separated store (account) ids from GET /api/v1/marketplaces/connected.
1000ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD.
3Comma-separated SKUs to report only those products.
1000Response
Get Profit Analytics
"developer_v1"accepted, completed, failed Show child attributes
Show child attributes
Show child attributes
Show child attributes