curl --request GET \
--url https://api.interchange.io/api/v2/storefront/reporting/margin \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/storefront/reporting/margin"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/storefront/reporting/margin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"buyers": [
{
"buyerCustomerId": 0,
"buyerName": "<string>",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
},
"mediaBuys": [
{
"mediaBuyId": "<string>",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
},
"packages": [
{
"packageId": "<string>",
"productId": "<string>",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
},
"sources": [
{
"sourceId": "<string>",
"upstreamMediaBuyId": "<string>",
"upstreamPackageId": "<string>",
"settlementStatus": "booked",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
}
}
]
}
]
}
]
}
],
"totals": [
{
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
}
],
"periodStart": "<string>",
"periodEnd": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Get Seller Account margin (P&L) reporting
The curator’s resale P&L from the spread ledger: booked vs realized buy/sell/spread and margin %, rolled up buyer → media buy → package → source leg. Sourced from the Seller Account spread ledger (not BigQuery delivery); amounts are signed and never summed across settlement currencies. Cumulative as-of snapshot — there is no per-day timeseries.
curl --request GET \
--url https://api.interchange.io/api/v2/storefront/reporting/margin \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.interchange.io/api/v2/storefront/reporting/margin"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.interchange.io/api/v2/storefront/reporting/margin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"buyers": [
{
"buyerCustomerId": 0,
"buyerName": "<string>",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
},
"mediaBuys": [
{
"mediaBuyId": "<string>",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
},
"packages": [
{
"packageId": "<string>",
"productId": "<string>",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
},
"sources": [
{
"sourceId": "<string>",
"upstreamMediaBuyId": "<string>",
"upstreamPackageId": "<string>",
"settlementStatus": "booked",
"amounts": {
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
}
}
]
}
]
}
]
}
],
"totals": [
{
"settlementCurrency": "<string>",
"sellBooked": 123,
"sellRealized": 123,
"buyBooked": 123,
"buyRealized": 123,
"spreadBooked": 123,
"spreadRealized": 123,
"marginBookedPct": 123,
"marginRealizedPct": 123,
"bookedComplete": true,
"realizedComplete": true
}
],
"periodStart": "<string>",
"periodEnd": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Query Parameters
Narrow to the buy legs sourced from a single inventory source (storefront_spread_ledger.source_id). When omitted, includes every source on the storefront.
Narrow to a single buyer customer. Can only narrow within the calling storefront — it never widens scope.
1 <= x <= 9007199254740991Response
Get Seller Account margin (P&L) reporting
Hierarchical storefront margin (P&L) response: buyer → media buy → package → source leg
Buyer-level P&L data
Show child attributes
Show child attributes
Aggregated totals, one entry per settlement currency (amounts are never summed across currencies)
Show child attributes
Show child attributes
As-of start: earliest booked_at of the included edges (YYYY-MM-DD), null when empty
^\d{4}-\d{2}-\d{2}$As-of end: latest realized_through (or booked_at) of the included edges (YYYY-MM-DD), null when empty
^\d{4}-\d{2}-\d{2}$