SHOP DESKDevelopers
shopdeskbd.com

Reports

Sales figures for a window: a summary on every plan with API access; comparisons and top products with Advanced Reports.

Paste a key and every snippet on this page switches from the placeholder to your key — and the Try it panel under each endpoint is ready to send. It is stored in this browser only and goes nowhere except, if you press Send, straight to the API host you pick there.

Get a sales summary for a window

GET/ext/v1/reports/sales-summaryreports:read

Orders, gross and net sales, net revenue and average order value for the orders DELIVERED in the window, the money received (payments settled in the window) and the cash on delivery still to collect (as of today) — each figure the same number the Reports pages in the dashboard show, with its basis stated in basis. Available on every plan with API access; compare=previous_period needs Advanced Reports. The window spans at most 366 days; answers are cached for 5 minutes. A call counts as 5 reads against the key's read limit. Company-scoped keys must pass store_id.

Query parameters

NameTypeDescription
periodstringA named window instead of from/to, resolved on the store's own calendar: today, yesterday, last_7_days (today and the six days before), last_30_days, this_month (the 1st to today) or last_month. The response echoes the concrete from and to. Not combinable with from or to.todayyesterdaylast_7_dayslast_30_daysthis_monthlast_month
fromstringFirst day of the window (inclusive, a store-local calendar day). Defaults to the first day of the current month.
tostringLast day of the window (inclusive). Defaults to today. The window may span at most 366 days.
store_iduuidThe store to report on. REQUIRED with a company-scoped key (a report answers for one store); with a store-scoped key it may only repeat the key's own store.
channelstringOnly this sales channel (its SLUG, from GET /channels). With a channel filter, money_received and cod_outstanding are null: payments are not split by channel.
comparestringprevious_period adds previous_period: the same figures for the window of equal length just before. Needs a plan with Advanced Reports.previous_period

Request

export SHOPDESK_API_KEY="shopdesk_sk_YOUR_API_KEY"

curl -sS "https://api.shopdeskbd.com/ext/v1/reports/sales-summary" \
  -H "Authorization: Bearer $SHOPDESK_API_KEY"
Try itruns from your browser
GEThttps://api.shopdeskbd.com/ext/v1/reports/sales-summary?period=last_7_days&from=2026-09-01&to=2026-09-30&channel=facebook

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Query parameters

Blank fields are left out of the request.

Paste a key above to enable Send.

Responses

  • 200The summary.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403FORBIDDEN_SCOPE: the key's scopes do not cover this endpoint. PLAN_FEATURE_REQUIRED: compare was asked for on a plan without Advanced Reports.
  • 404Store not found (a store_id outside this key).
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "from": "2026-09-01",
  "to": "2026-09-30",
  "orders": 42,
  "gross_sales": "1250.00",
  "net_sales": "1250.00",
  "net_revenue": "1250.00",
  "average_order_value": "1250.00",
  "money_received": "1250.00",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "time_zone": "Asia/Dhaka",
  "channel": null,
  "basis": {
    "sales": "delivered",
    "money_received": "settled",
    "cod_outstanding": "as_of_today"
  },
  "cod_outstanding": {
    "as_of": "2026-09-29",
    "amount": "1250.00",
    "orders": 11,
    "not_shipped": {
      "orders": 3,
      "amount": "1250.00"
    },
    "with_courier": {
      "orders": 3,
      "amount": "1250.00"
    },
    "delivered_unpaid": {
      "orders": 3,
      "amount": "1250.00"
    }
  },
  "previous_period": {
    "from": "2026-09-01",
    "to": "2026-09-30",
    "orders": 42,
    "gross_sales": "1250.00",
    "net_sales": "1250.00",
    "net_revenue": "1250.00",
    "average_order_value": "1250.00",
    "money_received": "1250.00"
  }
}

List the top products for a window

GET/ext/v1/reports/top-productsreports:read

Product variants ranked by the revenue of units delivered in the window and KEPT (returns netted) — the Products report ranking in the dashboard, with revenue and units only: no cost, profit or margin is ever returned. Needs a plan with Advanced Reports. The window spans at most 366 days; answers are cached for 5 minutes. A call counts as 5 reads against the key's read limit. Company-scoped keys must pass store_id.

Query parameters

NameTypeDescription
periodstringA named window instead of from/to, resolved on the store's own calendar: today, yesterday, last_7_days (today and the six days before), last_30_days, this_month (the 1st to today) or last_month. The response echoes the concrete from and to. Not combinable with from or to.todayyesterdaylast_7_dayslast_30_daysthis_monthlast_month
fromstringFirst day of the window (inclusive, a store-local calendar day). Defaults to the first day of the current month.
tostringLast day of the window (inclusive). Defaults to today. The window may span at most 366 days.
store_iduuidThe store to report on. REQUIRED with a company-scoped key (a report answers for one store); with a store-scoped key it may only repeat the key's own store.
limitnumberdefault 10max 50How many products to rank.

Request

export SHOPDESK_API_KEY="shopdesk_sk_YOUR_API_KEY"

curl -sS "https://api.shopdeskbd.com/ext/v1/reports/top-products?limit=25" \
  -H "Authorization: Bearer $SHOPDESK_API_KEY"
Try itruns from your browser
GEThttps://api.shopdeskbd.com/ext/v1/reports/top-products?period=last_7_days&from=2026-09-01&to=2026-09-30

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Query parameters

Blank fields are left out of the request.

Paste a key above to enable Send.

Responses

  • 200The ranking.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403FORBIDDEN_SCOPE: the key's scopes do not cover this endpoint. PLAN_FEATURE_REQUIRED: the plan does not include Advanced Reports.
  • 404Store not found (a store_id outside this key).
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "from": "2026-09-01",
  "to": "2026-09-30",
  "time_zone": "Asia/Dhaka",
  "basis": {
    "revenue": "delivered_kept"
  },
  "data": [
    {
      "product_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "variant_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "product_name": "Classic Cotton T-Shirt",
      "variant_name": "Red / M",
      "sku": "TSHIRT-RED-M",
      "units_sold": 18,
      "units_returned": 2,
      "revenue": "1250.00"
    }
  ]
}