curl --request GET \
--url https://mart.ps/api/v1/reports/summary \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mart.ps/api/v1/reports/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://mart.ps/api/v1/reports/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mart.ps/api/v1/reports/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://mart.ps/api/v1/reports/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mart.ps/api/v1/reports/summary")
.header("Authorization", "Bearer <token>")
.asString();{
"status": "success",
"status_code": 200,
"message": "OK",
"data": {
"summary": {
"order_count": 3,
"order_value": 350.55,
"average_order_value": 116.85,
"by_month": [
{
"month": "2026-08",
"orders": 2,
"value": 300,
"cod_orders": 1,
"card_orders": 1,
"cancelled": 1
},
{
"month": "2026-07",
"orders": 1,
"value": 50.55,
"cod_orders": 1,
"card_orders": 0,
"cancelled": 0
}
],
"top_products": [
{
"product_id": 9597,
"combination_id": 41206,
"name": "Example product",
"quantity": 4,
"orders": 1
},
{
"product_id": 12402,
"combination_id": null,
"name": "Another product",
"quantity": 3,
"orders": 2
}
]
}
},
"meta": null,
"error": null
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}Reports summary
Your own order totals over a recent range: the number and value of orders, the average order value, a breakdown by calendar month (shop-local months, newest first) with the cash-on-delivery and card split and the number cancelled, and the products you order most. Values are order totals, nothing else. Ownership is your key: you never see another account’s orders. An account with no orders in the range gets a normal 200 with zeros and empty lists. months is one of 3, 6 or 12 (default 12); any other value answers 422 invalid_parameter. The range starts on the first day of the earliest month, so months=3 covers this month and the two before it. Full behaviour: https://mart.ps/api/docs#reports/summary.
curl --request GET \
--url https://mart.ps/api/v1/reports/summary \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://mart.ps/api/v1/reports/summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://mart.ps/api/v1/reports/summary"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mart.ps/api/v1/reports/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://mart.ps/api/v1/reports/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mart.ps/api/v1/reports/summary")
.header("Authorization", "Bearer <token>")
.asString();{
"status": "success",
"status_code": 200,
"message": "OK",
"data": {
"summary": {
"order_count": 3,
"order_value": 350.55,
"average_order_value": 116.85,
"by_month": [
{
"month": "2026-08",
"orders": 2,
"value": 300,
"cod_orders": 1,
"card_orders": 1,
"cancelled": 1
},
{
"month": "2026-07",
"orders": 1,
"value": 50.55,
"cod_orders": 1,
"card_orders": 0,
"cancelled": 0
}
],
"top_products": [
{
"product_id": 9597,
"combination_id": 41206,
"name": "Example product",
"quantity": 4,
"orders": 1
},
{
"product_id": 12402,
"combination_id": null,
"name": "Another product",
"quantity": 3,
"orders": 2
}
]
}
},
"meta": null,
"error": null
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}{
"status": "fail",
"status_code": 422,
"message": "<string>",
"data": null,
"meta": null,
"error": {
"code": "missing_api_key",
"details": "<unknown>"
}
}Query Parameters
Response
The summary for the range. Zeros and empty lists when there are no orders.
