SMAO API Documentation
Distributor API v1Billing

Get billing summary for a single organization

GET
/organizations/{organizationId}/billing-summary

Returns usage for the requested date window compared against the organization's current subscription plan. The date range must not exceed 31 days. Usage is compared against the plan's included allowances and any overages are calculated with the plan's per-unit overage cost.

Authorization

DistributorApiKey
AuthorizationBearer <token>

Long-lived distributor API key scoped to a channel partner on the shared smao instance.

In: header

Path Parameters

organizationId*string

MongoDB ObjectId of the organization.

Match^[a-fA-F0-9]{24}$

Query Parameters

from*string

Start date in YYYY-MM-DD format, inclusive.

Formatdate
to*string

End date in YYYY-MM-DD format, inclusive.

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organizations/665abc123def456789012345/billing-summary?from=2019-08-24&to=2019-08-24"
{  "status": "success",  "organization": {    "id": "69c175970f3e28310926a1aa",    "name": "Acme GmbH",    "externalCustomerId": "SYN-4711",    "externalContractId": "CON-2026-0001"  },  "window": {    "from": "2026-03-01",    "to": "2026-03-31"  },  "plan": {    "id": "6967b1c7138bed3e7f6bf7e6",    "slug": "advanced",    "name": "Advanced",    "commitment": "monthly",    "currency": "EUR",    "baseFee": 6900  },  "usage": {    "callMinutes": {      "included": 500,      "used": 623,      "overage": 123,      "costPerUnit": 15,      "overageCost": 1845,      "callCount": 247    },    "forwardingMinutes": {      "included": 100,      "used": 45,      "overage": 0,      "costPerUnit": 25,      "overageCost": 0,      "callCount": 18    },    "sms": {      "included": 200,      "used": 312,      "overage": 112,      "costPerUnit": 10,      "overageCost": 1120,      "messageCount": 298    },    "whatsapp": {      "included": 100,      "used": 0,      "overage": 0,      "costPerUnit": 5,      "overageCost": 0,      "messageCount": 0    },    "additionalAssistants": {      "included": 3,      "used": 5,      "overage": 2,      "costPerUnit": 990,      "overageCost": 1980    }  },  "totals": {    "totalOverageCost": 4945,    "currency": "EUR"  }}