organizationStats
Requires an authenticated session.
Returns company-wide figures for your own organization, such as revenue and document counts. Only callers allowed to see organization-wide figures can read them; any other organization ID is refused.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query OrganizationStats($organizationId: String!) {
organizationStats(organizationId: $organizationId) {
activeWarehhouses
lastOrderDate
totalOrders
totalProducts
totalRevenue
totalUsers
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query OrganizationStats($organizationId: String!) {\n organizationStats(organizationId: $organizationId) {\n activeWarehhouses\n lastOrderDate\n totalOrders\n totalProducts\n totalRevenue\n totalUsers\n }\n}",
"variables": {
"organizationId": "string"
}
}
EOF
Variables:
{
"organizationId": "string"
}
Response:
{
"data": {
"organizationStats": {
"activeWarehhouses": 0,
"lastOrderDate": "2025-01-15T00:00:00Z",
"totalOrders": 0,
"totalProducts": 0,
"totalRevenue": 0,
"totalUsers": 0
}
}
}
organizationStats(
organizationId: String!
): OrganizationStats!
Arguments
organizationStats.organizationId ● String! non-null scalar
Your own organization's ID.
Type
OrganizationStats object
Headline figures about an organization.