ProAudits
Getting started
ProAudits API · v1.0

ProAudits data for AI assistants and your programs

AI assistants connect to ProAudits through its MCP server: an employee adds the address in the assistant, signs in to ProAudits and gives consent. The same set of operations is open to other programs through the public REST API: the structure and the stores, reference data, aggregated figures of audits, deviations, the action plan and photo checks, and the store checklists. Every answer is computed inside the reach of whoever asks and gives the same figures as the dashboards and the “Stores” view of the tasks.

Connection
MCPhttps://api.proaudits.com/mcp
RESThttps://api.proaudits.com/api/public/v1
KeyAuthorization: Bearer pak_…
MCPMCP server

For AI assistants and your own agents. An employee connects an assistant themselves through OAuth; an agent on a server may come with an API key.

RESTPublic API

For BI, exports, server-to-server integrations and your scripts. A call is an HTTPS request with an API key in a header; the answer is JSON.

TaskWhat to useHow to sign in
Questions about the figures in an AI assistantMCPOAuth: the employee signs in to ProAudits and gives consent
Your own agent on a serverMCP or RESTAn API key in the Authorization header
Power BI reports, an export to a warehouse, an integration with your systemRESTA service key: explicit scopes and reach, independent of any employee
Your own script or spreadsheet that works as youRESTA personal key: your role and your stores

This version only reads. It returns no employees' names, comments or photos: the breakdowns by auditor and auditee are closed (answer DATA_CATEGORY_DISABLED). API keys are free; the requests of connected assistants spend the company's AI credits — see “Cost”. A company administrator switches access on.

Connecting assistants is switched on per ProAudits installation. If the “Account” page has no “My AI connections” block, your installation runs keys and REST only.

Loading data into ProAudits and the company integration token are a separate integration API with its own documentation; this page does not describe it.

AI assistants

Five steps with no code and no keys: you add the address in the assistant, sign in to ProAudits and give consent.

  1. An administrator prepares the company

    Everything in the access conditions, plus the assistant switched on in the “Allowed applications” block. The role permission “Can connect AI assistants and API keys” is needed to connect an assistant too.

  2. The employee copies the address

    “Account” → “My AI connections” → “Connection address”: https://api.proaudits.com/mcp.

  3. Adds the server in the assistant

    In the assistant's settings add a custom MCP connector with this address and OAuth sign-in. Assistants rename their menus from time to time; in workspaces, adding connectors may be allowed to the workspace administrator only.

  4. Signs in and gives consent

    The assistant opens ProAudits in the browser: sign in and check the consent screen — which application asks for access, where the answer returns to and which data it will be able to read. Untick what is not needed and press “Allow”.

  5. Asks

    For example: “The average audit score by store for last month”. The connection shows in “My AI connections”, and to an administrator in “Employees' connections”.

Any MCP client that speaks Streamable HTTP and OAuth 2.1 sign-in with PKCE and introduces itself in one of two ways: by a client metadata document at its own address (this is how ChatGPT and Claude connect) or by dynamic registration. An application introduced by a document at its own address counts as verified; one that registered itself counts as unverified and can be connected only if an administrator switched “Unverified applications” on.

Which applications an installation offers is its owner's decision; which of them employees may connect is the company administrator's, in the “Allowed applications” block.

“Disconnect” in “My AI connections” (or, for an administrator, in “Employees' connections”) takes effect at once: the assistant's next call gets a 401. Removing the connector in the assistant itself does not necessarily revoke access in ProAudits — disconnect it here as well.

Connection address
https://api.proaudits.com/mcp
“Account” → “My AI connections”
Example questions to an assistant
  • The average audit score by store for last month.
  • Which stores missed checklists today?
  • Which stores had the most deviations in the last 30 days?

The MCP server gives AI assistants the same operations as REST, as tools. The assistant picks the tool itself and gets the answer in the same { data, meta, page } envelope.

Addresshttps://api.proaudits.com/mcp
TransportStreamable HTTP, POST only; no session — every request stands alone. Clients of the 2025 protocol revisions and of revision 2026-07-28 are accepted.
Sign-inOAuth 2.1 (this is how assistants connect) or an API key in Authorization
Toolsget_context, search_directory, list_metrics, query_metrics, get_checklist_status — read only
Server nameproaudits

An assistant acts as the employee who connected it: with their role and their stores. The tool list depends on the scopes that were granted; a client may keep it for 300 seconds.

A client finds the authorization server by itself: a request to /mcp without sign-in gets a 401 with the address of the resource metadata in WWW-Authenticate:

WWW-Authenticate: Bearer resource_metadata="https://api.proaudits.com/.well-known/oauth-protected-resource/mcp", scope="org:read analytics:read checklists:read"
  • Metadata: /.well-known/oauth-protected-resource/mcp (the resource) and /.well-known/oauth-authorization-server (the authorization server).
  • Flow: authorization code with PKCE (S256 is required). The return address is https, or http on this computer (loopback); applications' own schemes are not accepted.
  • How a client introduces itself: by a client metadata document at its own address, or by dynamic registration at /oauth/register — at most 10 registrations an hour from one address. Dynamic registration is switched on per installation.
  • Scopes: org:read, analytics:read, checklists:read. On the consent screen the employee may untick any of them.
  • Lifetimes: an access token lives 60 minutes; a refresh token 30 days from its last use, and it changes at every refresh (presenting an old one again ends the connection); a consent lasts 180 days, after which it is asked again.
  • How many connections: up to 10 active ones per employee. Two consents to one application are two connections.
  • A token is issued for /mcp only: on REST the token of a live connection gets INVALID_CREDENTIAL.

The authorization server answers with the standard OAuth errors (RFC 6749): in the error parameter of the return address or in a JSON body. In practice a client meets these:

errorWhereWhat happened
access_deniedReturn addressThe employee pressed “Deny” or cannot connect an assistant: the plan does not include AI connections, external access is switched off, the consent is not accepted, the application is not allowed, the role has no permission, or there are already 10 active connections.
invalid_targetReturn addressThe request names a resource other than https://api.proaudits.com/mcp.
invalid_redirect_uriRegistration, 400The return address is neither https nor http on this computer. A sign-in request with somebody else's return address ends on ProAudits' error page and is not returned to the client.
invalid_grant/oauth/token, 400The code was already used or has expired; a refresh token was presented a second time (the connection is ended after that); the connection was disconnected in ProAudits.
temporarily_unavailableRegistration, 429 or 503More than 10 registrations an hour from one address (429), or the client registry is full (503). Retry after Retry-After seconds.
invalid_requestReturn address; 403A sign-in request without code_challenge: PKCE with S256 is required. With HTTP 403 — the request came to a host name this server does not serve.

Your own agent on a server may come to /mcp with an API key in Authorization: Bearer pak_…. It sees the tools of its scopes and the data of its reach, and its limits are shared with the same key's REST calls. Calls made with a key spend no AI credits.

A tool is the same operation as in REST: the tool's name is the operationId, its arguments are the parameters or the request body, its result is the response. Below are the descriptions an assistant receives and the argument schemas.

MCPget_context
any scopereadOnlyHintidempotentHintREST: GET/me

Who the credential acts as and what it can see: the company's language and time zone, today's date there, the credential's scopes and expiry, the caller's role, the reach in the structure (the whole company, or the listed root nodes and everything below them), the data categories the company has opened and the features it uses. Call it first: every other operation answers inside this reach. today is the date in the company's time zone, or in UTC when the company has none; weeks start on Monday. A person with no structure keys has an empty roots list and sees no stores.

Example questions to an assistant

  • What can you see in ProAudits on my behalf?
  • Which scopes does this connection have?

Arguments

The tool takes no arguments.

Result

structuredContent is the same { data, meta, page } envelope that answers GET/api/public/v1/me.

Call tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_context",
    "arguments": {}
  }
}
Answer
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "…"
      }
    ],
    "structuredContent": {
      "data": {
        "company": {
          "locale": "ru",
          "timeZone": "Asia/Almaty",
          "weekStartsOn": "monday"
        },
        "today": {
          "date": "2026-11-18",
          "timeZone": "Asia/Almaty"
        },
        "credential": {
          "kind": "personal_key",
          "name": "Power BI reports",
          "keyId": "1a2b3c4d5e6f7a8b",
          "scopes": [
            "org:read",
            "analytics:read",
            "checklists:read"
          ],
          "expiresAt": "2027-02-16T09:30:00.000Z"
        },
        "subject": {
          "kind": "person",
          "name": "Aigerim Seitkali",
          "role": {
            "id": "5",
            "name": "Area manager",
            "level": "area_manager"
          },
          "isAdministrator": false
        },
        "reach": {
          "kind": "nodes",
          "roots": [
            {
              "id": "almaty",
              "name": "Almaty",
              "isStore": false
            }
          ]
        },
        "access": {
          "peopleData": false,
          "freeText": false
        },
        "features": {
          "storeChecklists": true,
          "adHocTasks": false
        }
      },
      "meta": {
        "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
        "generatedAt": "2026-11-18T09:30:00.000Z"
      }
    }
  }
}
MCPsearch_directory
org:readreadOnlyHintidempotentHintREST: GET/directory/search

Turns a name into an id. Searches the names of stores, structure nodes (a node is a group of the structure, such as a region or a city; a store is its own type), processes, checklists (template), roles, store concepts and checklist groups (group, whose id is its name), and returns the closest matches with a score from 0 to 1, best first. Use the ids in the filters of the other operations. Stores and nodes are searched inside the credential's reach only; context is the name of the parent node within that reach, or null. The match is fuzzy: it ignores case and word endings and tolerates small typos; a name with no close match returns an empty list. types narrows the search (a comma list, default all); limit is 1 to 50, default 10.

Example questions to an assistant

  • Find the store “Chilanzar”.
  • Which audit checklists does the company have?

Arguments

  • qstringrequired
    The name to look for, or a part of it.
    length 1–100
  • typesarray<string>
    What to search, as a comma list. Default: every type.
    items one of store node process template role store_concept groupitems 1–7default ["store","node","process","template","role","store_concept","group"]
  • limitinteger
    The most results to return.
    range 1–50default 10

Result

structuredContent is the same { data, meta, page } envelope that answers GET/api/public/v1/directory/search.

Call tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_directory",
    "arguments": {
      "q": "абай",
      "types": [
        "store"
      ]
    }
  }
}
Answer
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "…"
      }
    ],
    "structuredContent": {
      "data": {
        "results": [
          {
            "type": "store",
            "id": "store-184",
            "name": "Абай 10",
            "context": "Алматы",
            "score": 0.9
          }
        ]
      },
      "meta": {
        "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
        "generatedAt": "2026-11-18T09:30:00.000Z"
      }
    }
  }
}
MCPlist_metrics
analytics:readreadOnlyHintidempotentHintREST: GET/metrics/catalog

The catalogue of the metrics query: every measure with its value format (count; fraction, a share from 0 to 1; minutes), whether its values add up (additive), whether a higher value is better, and the dimensions and filters it takes; every dimension and filter; the preset periods and the comparisons; and the limits of one query. Call it before the first query, and build queries from these ids only. It lists what this credential may use: the cuts by auditor and auditee appear only for a company that has opened people data to the API. Labels come in English or Russian (lang, default en); descriptions are in English. filters[].directoryType is the types value of the directory search that finds the values for that filter.

Example questions to an assistant

  • Which metrics can be requested about audits?
  • Which dimensions can deviations be broken down by?

Arguments

  • langstring
    The language of the labels.
    one of en rudefault "en"

Result

structuredContent is the same { data, meta, page } envelope that answers GET/api/public/v1/metrics/catalog.

Call tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_metrics",
    "arguments": {
      "lang": "en"
    }
  }
}
Answer
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "…"
      }
    ],
    "structuredContent": {
      "data": {
        "measures": [
          {
            "id": "audits.avg_score",
            "label": "Average score",
            "description": "Average audit result (0-100%). 'Средний балл', 'результат', 'оценка'.",
            "format": "fraction",
            "additive": false,
            "higherIsBetter": true,
            "dimensions": [
              "time.day",
              "time.week",
              "time.month",
              "time.quarter",
              "store",
              "node",
              "template",
              "process",
              "role",
              "store_concept",
              "audit_type"
            ],
            "filters": [
              "processIds",
              "templateIds",
              "nodeIds",
              "storeIds",
              "storeConceptIds",
              "auditTypes",
              "roleIds"
            ]
          }
        ],
        "dimensions": [
          {
            "id": "store",
            "label": "Store",
            "description": "The store the audit was made at.",
            "kind": "category"
          }
        ],
        "filters": [
          {
            "key": "storeIds",
            "label": "Stores",
            "description": "Ids of stores (GET /stores).",
            "valueKind": "id",
            "directoryType": "store"
          },
          {
            "key": "auditTypes",
            "label": "Audit types",
            "description": "Checklist types.",
            "valueKind": "enum",
            "directoryType": null,
            "values": [
              "one_page_checklist",
              "detailed_audit",
              "certification"
            ]
          }
        ],
        "periods": [
          "last_7d",
          "last_30d",
          "last_90d",
          "last_3_months",
          "last_12_months",
          "this_month",
          "prev_month",
          "this_year"
        ],
        "comparisons": [
          "previous_period",
          "same_period_last_year"
        ],
        "limits": {
          "maxMeasures": 6,
          "maxDimensions": 3,
          "defaultRows": 50,
          "maxRows": 200,
          "maxCustomPeriodDays": 1830,
          "maxFilterValues": 50,
          "maxItemAnswers": 200000
        }
      },
      "meta": {
        "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
        "generatedAt": "2026-11-18T09:30:00.000Z"
      }
    }
  }
}
MCPquery_metrics
analytics:readreadOnlyHintidempotentHintREST: POST/metrics/query

Computes measures over a period, broken down by up to 3 dimensions, inside the credential's reach — the figures the dashboards show. Take the ids of measures, dimensions and filters from the metrics catalogue, and the ids of stores, nodes, processes, checklists, roles and concepts from the directory. An audit counts in a period when it was started or finished in it (finished audits only); an action of the action plan when its plan month overlaps it. period is a preset ({ "preset": "prev_month" }) or the caller's own dates ({ "from", "to" }, both included, at most 1830 days); presets are counted from today (the caller's local date; default the UTC date). compareWith adds the same measures for the previous period or the same period a year earlier. The answer is a table: columns says what each cell of a row is — a dimension cell is { id, label }, a measure or comparison cell is a number or null; a fraction is a share from 0 to 1. Rows are ordered by sort (default: the first measure, largest first) and cut at limit (default 50, at most 200); meta.truncated is true when there were more rows than that. A time bucket is always the first dimension, and such a query is a calendar: its rows go by the bucket, earliest first, it takes no sort, and a cut at limit leaves out the latest rows. A bucket too fine for the period is replaced by the next one that fits — columns names the one used. With a time bucket and another dimension together the comparison cells are null. Without dimensions the answer is one row of totals. A filter that a measure does not take is ignored for it and listed in meta.ignoredFilters. A store or node id that does not exist or lies outside the reach answers 404; the cuts by auditor and auditee answer 403 DATA_CATEGORY_DISABLED until the company opens people data. An item measure by item, group or tag, or under the groups or tagIds filter, reads every item answer of the audits it covers, unless it counts failed items alone in the default order; such a query over more item answers than limits.maxItemAnswers of the metrics catalogue answers 422 INVALID_QUERY, saying how many it covers: shorten the period or narrow it with storeIds, nodeIds or templateIds.

Example questions to an assistant

  • The average audit score by store for last month.
  • Which stores had the most deviations in the last 30 days?
  • Compare the number of audits by week of this month.

Arguments

  • measuresarray<string>required
    What to compute: ids of measures from the metrics catalogue.
    items one of audits.count audits.avg_score audits.hit_rate audits.avg_duration audits.unique_auditors audits.unique_auditees audits.with_critical items.failed_count items.fail_rate items.critical_failed_count groups.avg_score actions.created actions.finished_rate actions.missed_deadline_rate actions.open photo_checks.mismatch_count photo_checks.mismatch_rateitems 1–6
  • dimensionsarray<string>
    What to break the figures down by: ids of dimensions from the metrics catalogue. Default: none, one row of totals.
    items one of time.day time.week time.month time.quarter store node template process item group auditor auditee role store_concept audit_type tagitems ≤ 3default []
  • periodobject | objectrequired
    A preset, counted from today, or the caller's own dates, both included.
    Variants
    Variant 1
    • presetstringrequired
      one of last_7d last_30d last_90d last_3_months last_12_months this_month prev_month this_year
    Variant 2
    • fromstring · daterequired
      pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
    • tostring · daterequired
      pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
  • compareWithstring | null
    Adds each measure once more, for the previous period or for the same period a year earlier.
    one of previous_period same_period_last_yeardefault null
  • filtersobject
    Keeps the figures of the listed values; the metrics catalogue says what each filter takes.
    default {}
    Fields
    • processIdsarray<string>
      items ≤ 50item length 1–200
    • templateIdsarray<string>
      items ≤ 50item length 1–200
    • nodeIdsarray<string>
      items ≤ 50item length 1–200
    • storeIdsarray<string>
      items ≤ 50item length 1–200
    • storeConceptIdsarray<string>
      items ≤ 50item length 1–200
    • groupsarray<string>
      items ≤ 50item length 1–200
    • auditTypesarray<string>
      items one of one_page_checklist detailed_audit certificationitems ≤ 3
    • roleIdsarray<string>
      items ≤ 50item length 1–200
    • auditorIdsarray<string>
      items ≤ 50item length 1–200
    • auditeeIdsarray<string>
      items ≤ 50item length 1–200
    • tagIdsarray<string>
      items ≤ 50item length 1–200
  • sortobject | null
    The order of the rows: by a requested measure or by the label of the first dimension. Not taken with a time bucket.
    default null
    Fields
    • bystringrequired
      one of audits.count audits.avg_score audits.hit_rate audits.avg_duration audits.unique_auditors audits.unique_auditees audits.with_critical items.failed_count items.fail_rate items.critical_failed_count groups.avg_score actions.created actions.finished_rate actions.missed_deadline_rate actions.open photo_checks.mismatch_count photo_checks.mismatch_rate label
    • directionstringrequired
      one of asc desc
  • limitinteger
    The most rows to return.
    range 1–200default 50
  • nodeLevelinteger | null
    With the dimension node: the level (GET /structure/nodes) of the nodes to group by. Default: each store's parent.
    default null
  • todaystring · date
    The caller's local date, which a preset is counted from; within two days of the server's. Default: the UTC date.
    pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$

Result

structuredContent is the same { data, meta, page } envelope that answers POST/api/public/v1/metrics/query.

Call tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query_metrics",
    "arguments": {
      "measures": [
        "audits.count",
        "audits.avg_score"
      ],
      "dimensions": [
        "store"
      ],
      "period": {
        "preset": "prev_month"
      },
      "limit": 3
    }
  }
}
Answer
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "…"
      }
    ],
    "structuredContent": {
      "data": {
        "columns": [
          {
            "key": "store",
            "role": "dimension",
            "label": "Store",
            "format": null
          },
          {
            "key": "audits.count",
            "role": "measure",
            "label": "Audits",
            "format": "count"
          },
          {
            "key": "audits.avg_score",
            "role": "measure",
            "label": "Average score",
            "format": "fraction"
          }
        ],
        "rows": [
          [
            {
              "id": "store-184",
              "label": "Абай 10"
            },
            42,
            0.873
          ]
        ]
      },
      "meta": {
        "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
        "generatedAt": "2026-11-18T09:30:00.000Z"
      }
    }
  }
}
MCPget_checklist_status
checklists:readreadOnlyHintidempotentHintREST: GET/checklists/status

How the stores within the credential's reach did with their scheduled checklists — the figures of the app's «Филиалы» page. For a day (date, default today in the company's time zone): per store the day's scheduled checklists (total), done (late ones included), in progress, missed, done late, carried over from earlier days (today only), the store's open and overdue tasks, and the open and overdue actions of its action plan (null where the action plan cannot be read). For a week (weekStart, any day of it): per store and per day total, done, late and missed; a closed day comes from the saved history, a future day counts its planned checklists only. summary covers every store of the answer, not the page. Stores are ordered by name, 50 per page (limit up to 200; pass page.nextCursor as cursor). nodeId keeps the stores below that node; one that does not exist or lies outside the reach answers 404 NODE_NOT_FOUND. A person whose reach is a single store and whose role does not open the store page gets no stores and meta.reason: "level", as in the app; a reach without stores gives meta.reason: "no_stores". At most 500 stores are computed (the first by name; meta.truncated). Days within 366 days of today.

Example questions to an assistant

  • Which stores missed checklists today?
  • Show checklist completion for the region this week.

Arguments

  • datestring · date
    The day to report; default today in the company's time zone. Not with weekStart.
    pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
  • weekStartstring · date
    Any day of a week: the Monday to Sunday week it falls in is reported day by day. Not with date.
    pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
  • nodeIdstring
    Keeps the stores below this structure node.
    length 1–200
  • limitinteger
    The size of a page.
    range 1–200default 50
  • cursorstring
    page.nextCursor of the page before; leave it out for the first page. A cursor belongs to its list and to the other parameters it was made with.

Result

structuredContent is the same { data, meta, page } envelope that answers GET/api/public/v1/checklists/status.

Call tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_checklist_status",
    "arguments": {
      "date": "2026-11-17"
    }
  }
}
Answer
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "…"
      }
    ],
    "structuredContent": {
      "data": {
        "kind": "day",
        "date": "2026-11-17",
        "timeZone": "Asia/Almaty",
        "summary": {
          "total": 120,
          "done": 97,
          "inProgress": 6,
          "missed": 11,
          "late": 4,
          "carryOver": 0,
          "openTasks": 9,
          "overdueTasks": 2,
          "openActions": 31,
          "overdueActions": 7
        },
        "items": [
          {
            "storeId": "store-184",
            "storeName": "Абай 10",
            "total": 4,
            "done": 3,
            "inProgress": 0,
            "missed": 1,
            "late": 1,
            "carryOver": 0,
            "openTasks": 1,
            "overdueTasks": 0,
            "openActions": 2,
            "overdueActions": 1,
            "overdueActionsOverWeek": 0,
            "source": "live"
          }
        ]
      },
      "meta": {
        "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
        "generatedAt": "2026-11-18T09:30:00.000Z"
      },
      "page": {
        "limit": 50,
        "hasMore": false,
        "nextCursor": null
      }
    }
  }
}

An error arrives at one of two levels. The transport answers with an HTTP status — that is how problems with the request itself and with sign-in are reported. Everything else is a tool result with isError: true under HTTP 200: the assistant reads it and retells it to the person.

HTTPAnswerWhen
401invalid_token, WWW-AuthenticateNo token or key (the header then has no error); the token or key is unknown, expired or revoked; the token was issued for another resource. It tells the client to sign in again.
400invalid_requestA key or a token in the address of the request.
403access_deniedA key used from an address that is not in its “Allowed IP addresses”. The address list applies to keys only.
403invalid_requestA host name this server does not serve.
404—The MCP server is not switched on in this installation.
405—GET or DELETE: the server accepts POST only.
400JSON-RPC -32700The request body is not JSON.
413JSON-RPC -32600The request body is too large.
429JSON-RPC -32000Too many requests from one address.

Answers with error are an OAuth error object, { "error", "error_description" }, not an RFC 9457 document.

A result with isError: true. The codes are those of REST, plus the codes only a connection gets:

Only an assistant's connection (an OAuth token) gets these codes: a call made with a key does not depend on them.

StatusCodeMeaning
402AI_CREDITS_EXHAUSTEDAI credits used up. The company's balance of AI credits does not cover this request. An administrator of the company manages the balance in ProAudits.
403APP_NOT_ALLOWEDApplication not allowed. The company does not allow this application to connect. A company administrator can allow it in the API settings.
403AI_CREDITS_LIMIT_REACHEDMonthly AI credit limit reached. The company's monthly limit of AI credits for connected assistants is reached. It starts again next month; an administrator of the company can change it in ProAudits.
  • AI_CREDITS_EXHAUSTED — the company's balance of AI credits does not cover the call. A company administrator manages the balance in ProAudits.
  • AI_CREDITS_LIMIT_REACHED — the monthly limit of AI credits for connected assistants is reached. It starts again next month; a company administrator can change it.
  • APP_NOT_ALLOWED — the company no longer allows this application. The connection stays listed and works again once the application is allowed.
  • The credit codes come in place of a result and charge nothing; the text names no amount and leads to no purchase.
Answer isError
{
  "isError": true,
  "content": [
    {
      "type": "text",
      "text": "Too many requests at once. This credential already runs as many requests at once as it may. Retry shortly.\nTry again in 1 second.\n(code CONCURRENCY_LIMITED, request 5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c)"
    }
  ],
  "_meta": {
    "proaudits/error": {
      "code": "CONCURRENCY_LIMITED",
      "status": 429,
      "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
      "retryAfterSeconds": 1
    }
  }
}

The machine-readable part of an error is in _meta["proaudits/error"]: code, status, requestId and, where they apply, retryAfterSeconds and errors. The text: the title and the explanation, field errors line by line, at a limit — in how long to retry, and as the last line (code …, request …).

  • The limits per minute are those of REST, by the weight of the tool.
  • One assistant connection may have up to 4 calls of weight medium in progress (a key — 2): some of them run, the others wait their turn. Assistants often ask several questions at once.
  • Every successful tool call made through an assistant's connection spends AI credits; calls made with an API key are free — see “Cost”.
  • The protocol's own messages (initialize, tools/list) take nothing from the tools' limits and are not written to the call log.
WhatWhat it costs
The REST API with keysNo charge per call. It needs a plan with API integrations, “External API access” switched on and the consent.
MCP tools through an assistant's connection (OAuth): get_context, search_directory, list_metricsBy default 2 AI credits per successful call
The MCP tools query_metrics and get_checklist_status through an assistant's connectionBy default 10 AI credits per successful call
MCP tools with an API keyNo charge per call
  • Credits are taken from the company's shared balance of AI credits — the one the other AI features of ProAudits use — and show in the spend statistics as “AI connections”.
  • Only a successful tools/call is charged, once per call: initialize, tools/list, a refusal or an error cost nothing.
  • The price follows the weight of the operation and is set per installation: the values above are the defaults. An administrator sees the price in force in the “API and AI connections” card.
  • Connected assistants have a monthly spend limit of their own; a company administrator sets it.
  • The credit balance is not told to the assistant.
  • When credits run short or the monthly limit is reached, the tool answers with an error (isError: true) — with no amount and no link to a purchase.

Running out of credits is AI_CREDITS_EXHAUSTED, a reached monthly limit is AI_CREDITS_LIMIT_REACHED; both are described under tool errors.

REST quickstart
  1. The company is ready for access

    An administrator opens “General settings” → “API access” and switches “External API access” on: the first time, “Consent to share data with external services” opens under the switch, and “Accept and turn on” turns access on. The company's plan must include API integrations. For employees to issue personal keys, their role needs the permission “Can connect AI assistants and API keys” (“Structure” → “Roles”, the “API” column; it is off for every role, administrators included).

  2. Issue a key

    A service key: in the same card, “Service keys” → “Create key”: a name, “Scopes”, “Reach”, “Expires” and, if needed, “Allowed IP addresses”. A personal key: “Account” → “My API keys” → “Create key”.

    The key is shown once: ProAudits keeps only its fingerprint. Copy it at once and put it in the PROAUDITS_API_KEY environment variable or your secret store.

  3. Make the first call

    Call GET/api/public/v1/me — it works with any scope and tells who the key acts as and what it can see. The key travels in a header only: Authorization: Bearer pak_… or X-API-Key: pak_….

  4. Read the answer

    The answer is an envelope, { data, meta }. data.credential is the kind of key, its scopes and its expiry; data.subject the employee and the role (for a personal key); data.reach the reach: full — the whole company, nodes — structure nodes and everything below them. data.today is the company's date in its time zone: pass it as today of a metrics query, and its presets count from the company's day.

    meta.requestId is the id of the call: quote it when you report a problem.

  5. Next

    The stores — GET/api/public/v1/stores, the metrics catalogue — GET/api/public/v1/metrics/catalog, the figures themselves — POST/api/public/v1/metrics/query, the store checklists — GET/api/public/v1/checklists/status.

Request
GET/api/public/v1/me
curl "https://api.proaudits.com/api/public/v1/me" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY"
Response 200
{
  "data": {
    "company": {
      "locale": "ru",
      "timeZone": "Asia/Almaty",
      "weekStartsOn": "monday"
    },
    "today": {
      "date": "2026-11-18",
      "timeZone": "Asia/Almaty"
    },
    "credential": {
      "kind": "personal_key",
      "name": "Power BI reports",
      "keyId": "1a2b3c4d5e6f7a8b",
      "scopes": [
        "org:read",
        "analytics:read",
        "checklists:read"
      ],
      "expiresAt": "2027-02-16T09:30:00.000Z"
    },
    "subject": {
      "kind": "person",
      "name": "Aigerim Seitkali",
      "role": {
        "id": "5",
        "name": "Area manager",
        "level": "area_manager"
      },
      "isAdministrator": false
    },
    "reach": {
      "kind": "nodes",
      "roots": [
        {
          "id": "almaty",
          "name": "Almaty",
          "isStore": false
        }
      ]
    },
    "access": {
      "peopleData": false,
      "freeText": false
    },
    "features": {
      "storeChecklists": true,
      "adHocTasks": false
    }
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  }
}
What you seeCause and what to do
The assistant cannot connect: 404 on /mcpConnecting assistants is not switched on in this installation.
The consent screen shows a reason in place of the data listAn administrator removes it: a plan with AI connections, “External API access”, “Allowed applications” or the role permission. Then start the connection again in the assistant.
The assistant says the data is not available: 402 AI_CREDITS_EXHAUSTED / 403 AI_CREDITS_LIMIT_REACHEDThe company's AI credits or its monthly limit for assistants are used up: an administrator tops up the balance or changes the limit.
404 on every /api/public/ pathThe public API is not switched on on this server. With frequent retries a 429 may come instead of the 404.
401 UNAUTHENTICATEDThe key did not arrive: check the Authorization header (Bearer pak_…). Some proxies strip it — then use X-API-Key.
401 INVALID_CREDENTIALA typo, or a key of another ProAudits server.
403 PLAN_NOT_ALLOWEDThe company's plan does not include API integrations: an administrator changes the plan in “Usage”.
403 API_ACCESS_DISABLED / API_CONSENT_REQUIREDAn administrator switches “External API access” on and accepts the consent.
403 ROLE_PERMISSION_REQUIREDThe key owner's role lacks the permission “Can connect AI assistants and API keys”.
403 INSUFFICIENT_SCOPEIssue a key with the scope you need: a key's scopes do not change after it is issued.
404 STORE_NOT_FOUND or NODE_NOT_FOUND for an id that existsIt is outside the key's reach. GET/api/public/v1/me shows the reach.
400 INVALID_CURSORThe cursor belongs to another list or other filters. Start without a cursor.
429Wait Retry-After seconds and send fewer calls at once.
422 INVALID_QUERY with OUT_OF_RANGE at /periodAn item measure by item or group reads every item answer of the audits the query covers, and it covers more than 200000; detail says how many. Shorten the period, filter by stores, nodes or checklists, or ask for items.failed_count alone: it reads the failed answers only.
504 OPERATION_TIMEOUTThe query is too heavy: shorten the period, drop a dimension or filter by stores.
meta.truncated: trueThere were more rows than limit: raise it (up to 200) or split the period.
The store checklists list no stores, meta.reason: "level"The key owner's role does not open the “Stores” view of the tasks, as in the app. A service key has no such rule.

Write to ProAudits support with the requestId of the answer — it finds the call in the log.

Access

A key looks like pak_usr_1a2b3c4d5e6f7a8b_…: the prefix pak_, the kind (usr personal, svc service), the key's public id of 16 hexadecimal characters, and the secret. The prefix lets secret scanners recognise a key that slipped into a repository. The key id is shown in the interface and the call log; the secret is shown nowhere.

Personal keyService key
Issued byAn employee whose role has the permission “Can connect AI assistants and API keys”A company administrator
Acts asIts owner — with the owner's role and place in the structure at the moment of each callA service — with the reach chosen when it was issued
ReachAn administrator — the whole company; anyone else — their structure nodes and everything below them“Whole company” or “Selected structure nodes” (up to 50)
Default / longest term90 / 365 days365 / 365 days
Active at onceup to 5 per employeeup to 20 per company
Stops working by itself whenThe employee is dismissed, removed or hidden; the role loses the permission—

In one of two headers: Authorization with the Bearer scheme, or X-API-Key. When both are sent, Authorization is used. The API is called server to server: /api/public/v1 answers no browser page (CORS is closed). Never put a key into the code of a website or a mobile app.

Never put a key in the address. Under the names api_key, apikey and access_token such a request is refused with CREDENTIAL_IN_QUERY; under any other name the key may end up in the logs of servers on the way. Treat a key that was sent in an address as exposed: rotate it.

  • The term is chosen when the key is issued (“Expires”). An expired key gets CREDENTIAL_EXPIRED.
  • “Rotate” gives the same key a new secret: its id, scopes and reach stay, and the term starts again for the same length. The old secret keeps working for 24 hours, so you can replace it in your systems; for a key that has already expired, the old secret stops at once.
  • A personal key is rotated by its owner only, a service key by an administrator.
  • “Revoke” takes effect at once: the next call gets CREDENTIAL_REVOKED. A personal key is revoked by its owner or an administrator, a service key by an administrator.
  • A lost key cannot be shown again — rotate or revoke it.
  • “Allowed IP addresses” is an optional list of addresses and networks (up to 20); a call from any other address gets IP_NOT_ALLOWED.

A scope decides which operations a key may call; the reach decides which part of the company it sees. Each operation of the reference names the scopes it requires.

ScopeIn the interfaceOpens
org:read“Structure and reference data”Stores, structure nodes, processes, checklists, roles and store concepts: GET/api/public/v1/directory/search, GET/api/public/v1/stores, GET/api/public/v1/structure/nodes
analytics:read“Metrics”Aggregated audits, deviations, action plan and photo checks: GET/api/public/v1/metrics/catalog, POST/api/public/v1/metrics/query
checklists:read“Store checklists”Planned, done and missed store checklists by day and week: GET/api/public/v1/checklists/status

GET/api/public/v1/me works with any scope. A missing scope answers INSUFFICIENT_SCOPE: WWW-Authenticate names the operation's scopes, and errors[] lists the missing ones with the code MISSING_SCOPE.

  • Every answer is computed inside the reach: the whole company, or the chosen structure nodes and everything below them.
  • Nothing outside the reach is returned — no id, no name, no total of the nodes above. The nodes of the reach are the roots of the tree you see: their level is 0.
  • A store or node id outside the reach answers the same 404 as one that does not exist: STORE_NOT_FOUND or NODE_NOT_FOUND.
  • The reach of a personal key is worked out on every call: when an employee moves, the key sees the new reach at once.
  • The key identifies the company. No request names a company and no response returns its id.
  • The plan. The API is available on plans with API integrations. On any other plan every key gets PLAN_NOT_ALLOWED; calls are not charged separately.
  • The switch and the consent. While “External API access” is off, every key gets API_ACCESS_DISABLED. When the consent text changes it has to be accepted again — until then the answer is API_CONSENT_REQUIRED.
  • The role permission. A personal key works only while the owner's role has the permission “Can connect AI assistants and API keys” (ROLE_PERMISSION_REQUIRED), and the employee is active and not hidden (PRINCIPAL_INACTIVE).
  • Assistant connections. The plan must include AI connections, and the assistant's application must be switched on in the “Allowed applications” block; otherwise a connection gets PLAN_NOT_ALLOWED or APP_NOT_ALLOWED. The other conditions are those of a personal key.

The checks run in this order, and a call gets the first refusal that applies. Nothing is cached: a revoked key, a changed role or a switched-off company is refused on the very next call.

#CheckAnswer
1A key in the request's address400 CREDENTIAL_IN_QUERY
2Neither Authorization nor X-API-Key401 UNAUTHENTICATED
3The key is not recognised or the secret does not match401 INVALID_CREDENTIAL
4The key is revoked or expired401 CREDENTIAL_REVOKED / CREDENTIAL_EXPIRED
5The request came from an address that is not in “Allowed IP addresses”403 IP_NOT_ALLOWED
6The company's plan does not include API integrations403 PLAN_NOT_ALLOWED
7“External API access” is off403 API_ACCESS_DISABLED
8The current consent is not accepted403 API_CONSENT_REQUIRED
9Personal key: the owner is dismissed, removed or hidden403 PRINCIPAL_INACTIVE
10Personal key: the role lacks the permission403 ROLE_PERMISSION_REQUIRED
11A scope is missing403 INSUFFICIENT_SCOPE
12The operation needs a data category the company has not opened403 DATA_CATEGORY_DISABLED
13The key's limit is spent429 RATE_LIMITED

A 401 carries the WWW-Authenticate header. When one key collects too many refusals in a minute, the next ones get 429 RATE_LIMITED — so a dead key in a loop does not flood the log.

HeaderMeaning
WWW-AuthenticateThe challenge of RFC 6750, for example Bearer realm="proaudits", error="invalid_token". A 403 carries it with INSUFFICIENT_SCOPE, naming the scopes the operation requires.
Conventions

A success is { "data": …, "meta": …, "page": … }. data is the operation's own shape, meta says how the answer was made (always requestId and generatedAt), and page is there on lists.

  • requestIdstringrequired
    The id of the call: the X-Request-Id the request carried, or one the API gave it.
  • generatedAtstring · date-timerequired
  • reachobject
    Whether the answer covers the whole company (full) or the part of its structure the credential reaches (nodes).
    Fields
    • kindstringrequired
      one of full nodes
  • periodobject
    The dates a metrics query was computed for, both included.
    Fields
    • fromstring · daterequired
    • tostring · daterequired
  • comparisonPeriodobject | null
    The dates of the comparison a metrics query asked for; null without one.
    Fields
    • fromstring · daterequired
    • tostring · daterequired
  • periodRulestring
    Which audits a period of a metrics query takes: those started or finished within it, as the dashboards count.
    one of audits_started_or_finished
  • truncatedboolean
    The answer is not the whole answer: a metrics table had more rows than limit or read more data than one answer may be computed from, or a checklist status reached its cap of stores.
  • ignoredFiltersarray<string>
    The filters of a metrics query that at least one of its measures does not take.
  • unavailableMeasuresarray<string>
    The measures of a metrics query that could not be computed; their cells are null.
  • weekStartsOnstring
    The first day of the weeks a metrics query is counted in: a week bucket is an ISO week.
    one of monday
  • timeZonestring
    The IANA time zone the days of a checklist status are counted in: the company's.
  • reasonstring | null
    Why a checklist status lists no stores: level — the caller's role does not open the store page, no_stores — the reach has no stores; null otherwise.
    one of level no_stores
  • Names are camelCase and ids end in Id; enumeration values are lower case with underscores (one_page_checklist).
  • A date is YYYY-MM-DD, a month YYYY-MM, a quarter YYYY-Qn, an instant ISO 8601 in UTC.
  • A metrics period takes the audits started or finished within it, as the dashboards count them (meta.periodRule). The days of the store checklists are the company's own, in its time zone (meta.timeZone).
  • A share is a fraction from 0 to 1 (format fraction), a duration is in minutes (minutes).
  • Answers are UTF-8; a POST body is application/json in UTF-8, otherwise UNSUPPORTED_MEDIA_TYPE.

An error is an RFC 9457 problem document, application/problem+json. Rely on code: it does not change. title and detail are for people and never repeat the request back.

  • typestring · urirequired
    An identifier of the kind of problem, the same on every installation.
  • titlestringrequired
  • statusintegerrequired
    The HTTP status of the response.
  • detailstringrequired
    What was expected or what to do. It never repeats the request back.
  • codestringrequired
    one of INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND PAYLOAD_TOO_LARGE UNSUPPORTED_MEDIA_TYPE INVALID_QUERY INVALID_PERIOD RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED INTERNAL_ERROR SERVICE_UNAVAILABLE OPERATION_TIMEOUT
  • requestIdstring | nullrequired
    The id of the call. Quote it when reporting a problem.
  • errorsarray<object>
    Present when the problem is about particular fields, parameters or scopes: one entry for each, 20 at most.
    Fields
    • pointerstring | nullrequired
      A JSON Pointer (RFC 6901) into the request body; null when the entry is not about a body field.
    • parameterstring | nullrequired
      The query parameter; null when the entry is not about one.
    • codestringrequired
      one of REQUIRED INVALID_TYPE INVALID_FORMAT UNKNOWN_FIELD UNKNOWN_VALUE OUT_OF_RANGE TOO_LONG TOO_MANY NOT_ALLOWED_TOGETHER NOT_AVAILABLE NOT_FOUND MISSING_SCOPE CATEGORY_DISABLED
    • detailstringrequired

When the problem is about particular fields, parameters or scopes, errors[] lists them: pointer is a JSON Pointer into the request body, parameter a query parameter, and code one of:

REQUIRED INVALID_TYPE INVALID_FORMAT UNKNOWN_FIELD UNKNOWN_VALUE OUT_OF_RANGE TOO_LONG TOO_MANY NOT_ALLOWED_TOGETHER NOT_AVAILABLE NOT_FOUND MISSING_SCOPE CATEGORY_DISABLED
Response 400 application/problem+json
{
  "type": "https://proaudits.com/problems/invalid-request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request has an unknown or malformed parameter or field.",
  "code": "INVALID_REQUEST",
  "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c"
}
StatusCodeMeaning
400INVALID_REQUESTInvalid request. The request has an unknown or malformed parameter or field.
400MALFORMED_JSONMalformed JSON. The request body is not valid JSON.
400INVALID_CURSORInvalid cursor. The cursor is malformed or belongs to another query. Start again without a cursor.
400CREDENTIAL_IN_QUERYCredential in the query string. API keys are not accepted in the query string. Send the key in the Authorization header as a Bearer token, or in X-API-Key, and treat a key that was sent in a URL as exposed.
401UNAUTHENTICATEDAuthentication required. Send an API key in the Authorization header as a Bearer token, or in X-API-Key.
401INVALID_CREDENTIALInvalid credential. The credential is not valid.
401CREDENTIAL_EXPIREDCredential expired. The API key has expired. Rotate it or issue a new one.
401CREDENTIAL_REVOKEDCredential revoked. The API key has been revoked.
403PLAN_NOT_ALLOWEDPlan without API access. The company's subscription plan does not include API integrations.
403API_ACCESS_DISABLEDAPI access is switched off. An administrator of the company has not switched external API access on.
403PRINCIPAL_INACTIVEKey owner is not active. The person this key acts as is no longer active in the company.
403ROLE_PERMISSION_REQUIREDRole permission required. The role of the person this key acts as does not allow API access.
403INSUFFICIENT_SCOPEInsufficient scope. The credential lacks a scope this operation requires.
403DATA_CATEGORY_DISABLEDData category is not open. The company has not opened this category of data to the API.
403IP_NOT_ALLOWEDAddress not allowed. This key cannot be used from the caller's address.
403FORBIDDENForbidden. The credential is not allowed to do this. fallback code
404NOT_FOUNDNot found. The requested resource does not exist.
404STORE_NOT_FOUNDStore not found. No such store within the reach of this credential.
404NODE_NOT_FOUNDStructure node not found. No such structure node within the reach of this credential.
413PAYLOAD_TOO_LARGEPayload too large. The request body is larger than this API accepts.
415UNSUPPORTED_MEDIA_TYPEUnsupported media type. Send the request body as application/json in UTF-8.
422INVALID_QUERYInvalid query. The query cannot be run as it is written.
422INVALID_PERIODInvalid period. The period is not valid.
429RATE_LIMITEDToo many requests. The request limit is spent. Retry after the time in the Retry-After header.
429CONCURRENCY_LIMITEDToo many requests at once. This credential already runs as many requests at once as it may. Retry shortly.
429CAPACITY_EXCEEDEDCapacity exceeded. The API is busy. Retry shortly.
500INTERNAL_ERRORInternal error. The request failed on our side. Quote the requestId when you report it.
503SERVICE_UNAVAILABLEService unavailable. The API is temporarily unavailable. Retry shortly.
504OPERATION_TIMEOUTOperation timed out. The operation did not finish in time. Narrow the request and retry.

FORBIDDEN is a fallback for a refusal that has no code of its own.

A list takes limit (default 50, at most 200) and cursor. While page.hasMore is true, pass page.nextCursor as cursor. The same address comes in the Link header with rel="next".

  • limitintegerrequired
  • hasMorebooleanrequired
  • nextCursorstring | nullrequired
    Null on the last page.

A cursor belongs to its list and to the other parameters it was made with. With another operation or other filters it answers INVALID_CURSOR — start again without a cursor. The page size may change from one page to the next.

HeaderMeaning

The reference lists and the metrics catalogue carry ETag and Cache-Control of the form private, max-age=…. Send the tag back in If-None-Match, and an unchanged answer is a 304 without a body. Every other answer is Cache-Control: no-store. The reference marks such operations “ETag · 304”.

HeaderMeaning
ETagA weak validator of this answer. Send it back in If-None-Match.
Cache-Controlprivate, max-age=<seconds>: the caller's own cache may keep the answer.

A 304 is still a call: it counts against the limit and is in the log. The tag saves the transfer, not the computation.

Each operation has a weight (x-proaudits-weight in OpenAPI), and each key its own allowance per weight. These are the starting numbers; the headers of an accepted call state the allowance in force.

WeightCalls a minuteAt once: keyAt once: assistant connectionAnswered withinOperations
light120445 sget_context search_directory list_stores list_structure_nodes list_metrics
medium302415 squery_metrics get_checklist_status
HeaderMeaning
RateLimit-LimitHow many calls of this operation's weight the credential may make in a minute.
RateLimit-RemainingHow many of them are left in the current minute.
RateLimit-ResetSeconds until the current minute ends.
Retry-AfterSeconds to wait before sending the call again.
  • The major version is in the address: /api/public/v1. The current contract version is 1.0 (info.version in OpenAPI).
  • Inside v1 changes are additive only: new operations, optional parameters, new response fields and new enumeration values. Do not reject an answer because of a field you do not know.
  • A breaking change comes only with a new major version.
REST reference

The reference below is built from the contract — an OpenAPI 3.1 document. Load it into Postman, Insomnia or a client generator.

The base address of every operation is https://api.proaudits.com/api/public/v1.

Who the credential acts as and what it can see.

GET/api/public/v1/me
get_context

Who the credential acts as and what it can see: the company's language and time zone, today's date there, the credential's scopes and expiry, the caller's role, the reach in the structure (the whole company, or the listed root nodes and everything below them), the data categories the company has opened and the features it uses. Call it first: every other operation answers inside this reach. today is the date in the company's time zone, or in UTC when the company has none; weeks start on Monday. A person with no structure keys has an empty roots list and sees no stores.

Response 200 { data, meta }

The data field:

  • companyobjectrequired
    Fields
    • localestringrequired
      one of ru en es pt de fr ja ar he
    • timeZonestring | nullrequired
    • weekStartsOn"monday"required
  • todayobjectrequired
    Fields
    • datestring · daterequired
    • timeZonestringrequired
  • credentialobjectrequired
    Fields
    • kindstringrequired
      one of personal_key service_key oauth_token
    • namestringrequired
    • keyIdstring | nullrequired
    • scopesarray<string>required
      items one of org:read analytics:read checklists:read
    • expiresAtstring · date-timerequired
  • subjectobject | objectrequired
    Variants
    Variant 1
    • kind"person"required
    • namestring | nullrequired
    • roleobject | nullrequired
      Fields
      • idstringrequired
      • namestringrequired
      • levelstring | nullrequired
        one of employee shift_manager store_manager area_manager read_only editor admin
    • isAdministratorbooleanrequired
    Variant 2
    • kind"service"required
  • reachobject | objectrequired
    Variants
    Variant 1
    • kind"full"required
    Variant 2
    • kind"nodes"required
    • rootsarray<object>required
      Fields
      • idstringrequired
      • namestringrequired
      • isStorebooleanrequired
  • accessobjectrequired
    Fields
    • peopleDatabooleanrequired
    • freeTextbooleanrequired
  • featuresobjectrequired
    Fields
    • storeChecklistsbooleanrequired
    • adHocTasksbooleanrequired

Response headers

  • RateLimit-Limit How many calls of this operation's weight the credential may make in a minute.
  • RateLimit-Remaining How many of them are left in the current minute.
  • RateLimit-Reset Seconds until the current minute ends.
Possible errors 400 401 403 404 429 500 503 504
400INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY
401UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED
403PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN
404NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND
429RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE
504OPERATION_TIMEOUT
Request
GET/api/public/v1/me
curl "https://api.proaudits.com/api/public/v1/me" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY"
Response 200
{
  "data": {
    "company": {
      "locale": "ru",
      "timeZone": "Asia/Almaty",
      "weekStartsOn": "monday"
    },
    "today": {
      "date": "2026-11-18",
      "timeZone": "Asia/Almaty"
    },
    "credential": {
      "kind": "personal_key",
      "name": "Power BI reports",
      "keyId": "1a2b3c4d5e6f7a8b",
      "scopes": [
        "org:read",
        "analytics:read",
        "checklists:read"
      ],
      "expiresAt": "2027-02-16T09:30:00.000Z"
    },
    "subject": {
      "kind": "person",
      "name": "Aigerim Seitkali",
      "role": {
        "id": "5",
        "name": "Area manager",
        "level": "area_manager"
      },
      "isAdministrator": false
    },
    "reach": {
      "kind": "nodes",
      "roots": [
        {
          "id": "almaty",
          "name": "Almaty",
          "isStore": false
        }
      ]
    },
    "access": {
      "peopleData": false,
      "freeText": false
    },
    "features": {
      "storeChecklists": true,
      "adHocTasks": false
    }
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  }
}

Stores, structure nodes and reference values: the ids every other operation takes.

GET/api/public/v1/directory/search
search_directory

Turns a name into an id. Searches the names of stores, structure nodes (a node is a group of the structure, such as a region or a city; a store is its own type), processes, checklists (template), roles, store concepts and checklist groups (group, whose id is its name), and returns the closest matches with a score from 0 to 1, best first. Use the ids in the filters of the other operations. Stores and nodes are searched inside the credential's reach only; context is the name of the parent node within that reach, or null. The match is fuzzy: it ignores case and word endings and tolerates small typos; a name with no close match returns an empty list. types narrows the search (a comma list, default all); limit is 1 to 50, default 10.

Query parameters

  • qstringrequired
    The name to look for, or a part of it.
    length 1–100example абай
  • typesarray<string>
    What to search, as a comma list. Default: every type.
    items one of store node process template role store_concept groupitems 1–7default ["store","node","process","template","role","store_concept","group"]example store
  • limitinteger
    The most results to return.
    range 1–50default 10

Response 200 { data, meta }

The data field:

  • resultsarray<object>required
    Fields
    • typestringrequired
      one of store node process template role store_concept group
    • idstringrequired
    • namestringrequired
    • contextstring | nullrequired
    • scorenumberrequired
      range 0–1

Response headers

  • RateLimit-Limit How many calls of this operation's weight the credential may make in a minute.
  • RateLimit-Remaining How many of them are left in the current minute.
  • RateLimit-Reset Seconds until the current minute ends.
Possible errors 400 401 403 404 429 500 503 504
400INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY
401UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED
403PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN
404NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND
429RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE
504OPERATION_TIMEOUT
Request
GET/api/public/v1/directory/search
curl "https://api.proaudits.com/api/public/v1/directory/search?q=%D0%B0%D0%B1%D0%B0%D0%B9&types=store" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY"
Response 200
{
  "data": {
    "results": [
      {
        "type": "store",
        "id": "store-184",
        "name": "Абай 10",
        "context": "Алматы",
        "score": 0.9
      }
    ]
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  }
}
GET/api/public/v1/stores
list_stores

The stores within the credential's reach, ordered by name, 50 per page (limit up to 200; pass page.nextCursor as cursor for the next page). nodeId keeps the stores below that structure node; conceptId keeps the stores of that store concept. Each store has its place in the structure as the credential sees it (parentNodeId, path from the top of the reach down to the parent), its concept and its coordinates when both are set. A nodeId that does not exist or lies outside the reach answers 404 NODE_NOT_FOUND.

Query parameters

  • nodeIdstring
    Keeps the stores below this structure node.
    length 1–200example almaty
  • conceptIdstring
    Keeps the stores of this store concept.
    length 1–200
  • limitinteger
    The size of a page.
    range 1–200default 50example 50
  • cursorstring
    page.nextCursor of the page before; leave it out for the first page. A cursor belongs to its list and to the other parameters it was made with.

Response 200 { data, meta, page }

The data field:

  • itemsarray<object>required
    Fields
    • idstringrequired
    • namestringrequired
    • parentNodeIdstring | nullrequired
    • patharray<object>required
      Fields
      • idstringrequired
      • namestringrequired
    • conceptobject | nullrequired
      Fields
      • idstringrequired
      • namestringrequired
    • locationobject | nullrequired
      Fields
      • latitudenumberrequired
        range -90–90
      • longitudenumberrequired
        range -180–180

304 Not modified: If-None-Match named the current answer.

Response headers

  • RateLimit-Limit How many calls of this operation's weight the credential may make in a minute.
  • RateLimit-Remaining How many of them are left in the current minute.
  • RateLimit-Reset Seconds until the current minute ends.
  • ETag A weak validator of this answer. Send it back in If-None-Match.
  • Cache-Control private, max-age=<seconds>: the caller's own cache may keep the answer.
  • Link The address of the next page, <…>; rel="next", while the list has more.
Possible errors 400 401 403 404 429 500 503 504
400INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY
401UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED
403PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN
404NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND
429RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE
504OPERATION_TIMEOUT
Request
GET/api/public/v1/stores
curl "https://api.proaudits.com/api/public/v1/stores?limit=50" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY"
Response 200
{
  "data": {
    "items": [
      {
        "id": "store-184",
        "name": "Абай 10",
        "parentNodeId": "almaty",
        "path": [
          {
            "id": "almaty",
            "name": "Алматы"
          }
        ],
        "concept": {
          "id": "1",
          "name": "Restaurant"
        },
        "location": {
          "latitude": 43.2389,
          "longitude": 76.8897
        }
      }
    ]
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  },
  "page": {
    "limit": 50,
    "hasMore": false,
    "nextCursor": null
  }
}
GET/api/public/v1/structure/nodes
list_structure_nodes

The nodes of the company structure within the credential's reach — groups (regions, cities) and stores — ordered by name, 50 per page (limit up to 200; pass page.nextCursor as cursor for the next page). parentId keeps the direct children of that node; kind keeps stores or groups. level is the depth in the tree the credential sees: 0 is a top node of the reach, and it is the number nodeLevel of the metrics query takes. path lists the ancestors from the top of the reach down to the parent. A parentId that does not exist or lies outside the reach answers 404 NODE_NOT_FOUND.

Query parameters

  • parentIdstring
    Keeps the direct children of this node.
    length 1–200example almaty
  • kindstring
    Keeps the stores, or the groups (every node that is not a store).
    one of store groupexample store
  • limitinteger
    The size of a page.
    range 1–200default 50
  • cursorstring
    page.nextCursor of the page before; leave it out for the first page. A cursor belongs to its list and to the other parameters it was made with.

Response 200 { data, meta, page }

The data field:

  • itemsarray<object>required
    Fields
    • idstringrequired
    • namestringrequired
    • parentNodeIdstring | nullrequired
    • isStorebooleanrequired
    • levelintegerrequired
      range ≥ 0
    • patharray<object>required
      Fields
      • idstringrequired
      • namestringrequired

304 Not modified: If-None-Match named the current answer.

Response headers

  • RateLimit-Limit How many calls of this operation's weight the credential may make in a minute.
  • RateLimit-Remaining How many of them are left in the current minute.
  • RateLimit-Reset Seconds until the current minute ends.
  • ETag A weak validator of this answer. Send it back in If-None-Match.
  • Cache-Control private, max-age=<seconds>: the caller's own cache may keep the answer.
  • Link The address of the next page, <…>; rel="next", while the list has more.
Possible errors 400 401 403 404 429 500 503 504
400INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY
401UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED
403PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN
404NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND
429RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE
504OPERATION_TIMEOUT
Request
GET/api/public/v1/structure/nodes
curl "https://api.proaudits.com/api/public/v1/structure/nodes?kind=store" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY"
Response 200
{
  "data": {
    "items": [
      {
        "id": "store-184",
        "name": "Абай 10",
        "parentNodeId": "almaty",
        "isStore": true,
        "level": 1,
        "path": [
          {
            "id": "almaty",
            "name": "Алматы"
          }
        ]
      }
    ]
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  },
  "page": {
    "limit": 50,
    "hasMore": false,
    "nextCursor": null
  }
}

Aggregated figures of audits, deviations, the action plan and photo checks.

GET/api/public/v1/metrics/catalog
list_metrics

The catalogue of the metrics query: every measure with its value format (count; fraction, a share from 0 to 1; minutes), whether its values add up (additive), whether a higher value is better, and the dimensions and filters it takes; every dimension and filter; the preset periods and the comparisons; and the limits of one query. Call it before the first query, and build queries from these ids only. It lists what this credential may use: the cuts by auditor and auditee appear only for a company that has opened people data to the API. Labels come in English or Russian (lang, default en); descriptions are in English. filters[].directoryType is the types value of the directory search that finds the values for that filter.

Query parameters

  • langstring
    The language of the labels.
    one of en rudefault "en"example en

Response 200 { data, meta }

The data field:

  • measuresarray<object>required
    Fields
    • idstringrequired
      one of audits.count audits.avg_score audits.hit_rate audits.avg_duration audits.unique_auditors audits.unique_auditees audits.with_critical items.failed_count items.fail_rate items.critical_failed_count groups.avg_score actions.created actions.finished_rate actions.missed_deadline_rate actions.open photo_checks.mismatch_count photo_checks.mismatch_rate
    • labelstringrequired
    • descriptionstringrequired
    • formatstringrequired
      one of count fraction minutes
    • additivebooleanrequired
    • higherIsBetterboolean | nullrequired
    • dimensionsarray<string>required
      items one of time.day time.week time.month time.quarter store node template process item group auditor auditee role store_concept audit_type tag
    • filtersarray<string>required
      items one of processIds templateIds nodeIds storeIds storeConceptIds groups auditTypes roleIds auditorIds auditeeIds tagIds
  • dimensionsarray<object>required
    Fields
    • idstringrequired
      one of time.day time.week time.month time.quarter store node template process item group auditor auditee role store_concept audit_type tag
    • labelstringrequired
    • descriptionstringrequired
    • kindstringrequired
      one of time category
  • filtersarray<object>required
    Fields
    • keystringrequired
      one of processIds templateIds nodeIds storeIds storeConceptIds groups auditTypes roleIds auditorIds auditeeIds tagIds
    • labelstringrequired
    • descriptionstringrequired
    • valueKindstringrequired
      one of id name enum
    • directoryTypestring | nullrequired
      one of store node process template role store_concept group
    • valuesarray<string>
      items one of one_page_checklist detailed_audit certification
  • periodsarray<string>required
    items one of last_7d last_30d last_90d last_3_months last_12_months this_month prev_month this_year
  • comparisonsarray<string>required
    items one of previous_period same_period_last_year
  • limitsobjectrequired
    Fields
    • maxMeasuresintegerrequired
    • maxDimensionsintegerrequired
    • defaultRowsintegerrequired
    • maxRowsintegerrequired
    • maxCustomPeriodDaysintegerrequired
    • maxFilterValuesintegerrequired
    • maxItemAnswersintegerrequired

304 Not modified: If-None-Match named the current answer.

Response headers

  • RateLimit-Limit How many calls of this operation's weight the credential may make in a minute.
  • RateLimit-Remaining How many of them are left in the current minute.
  • RateLimit-Reset Seconds until the current minute ends.
  • ETag A weak validator of this answer. Send it back in If-None-Match.
  • Cache-Control private, max-age=<seconds>: the caller's own cache may keep the answer.
Possible errors 400 401 403 404 429 500 503 504
400INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY
401UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED
403PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN
404NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND
429RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE
504OPERATION_TIMEOUT
Request
GET/api/public/v1/metrics/catalog
curl "https://api.proaudits.com/api/public/v1/metrics/catalog?lang=en" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY"
Response 200
{
  "data": {
    "measures": [
      {
        "id": "audits.avg_score",
        "label": "Average score",
        "description": "Average audit result (0-100%). 'Средний балл', 'результат', 'оценка'.",
        "format": "fraction",
        "additive": false,
        "higherIsBetter": true,
        "dimensions": [
          "time.day",
          "time.week",
          "time.month",
          "time.quarter",
          "store",
          "node",
          "template",
          "process",
          "role",
          "store_concept",
          "audit_type"
        ],
        "filters": [
          "processIds",
          "templateIds",
          "nodeIds",
          "storeIds",
          "storeConceptIds",
          "auditTypes",
          "roleIds"
        ]
      }
    ],
    "dimensions": [
      {
        "id": "store",
        "label": "Store",
        "description": "The store the audit was made at.",
        "kind": "category"
      }
    ],
    "filters": [
      {
        "key": "storeIds",
        "label": "Stores",
        "description": "Ids of stores (GET /stores).",
        "valueKind": "id",
        "directoryType": "store"
      },
      {
        "key": "auditTypes",
        "label": "Audit types",
        "description": "Checklist types.",
        "valueKind": "enum",
        "directoryType": null,
        "values": [
          "one_page_checklist",
          "detailed_audit",
          "certification"
        ]
      }
    ],
    "periods": [
      "last_7d",
      "last_30d",
      "last_90d",
      "last_3_months",
      "last_12_months",
      "this_month",
      "prev_month",
      "this_year"
    ],
    "comparisons": [
      "previous_period",
      "same_period_last_year"
    ],
    "limits": {
      "maxMeasures": 6,
      "maxDimensions": 3,
      "defaultRows": 50,
      "maxRows": 200,
      "maxCustomPeriodDays": 1830,
      "maxFilterValues": 50,
      "maxItemAnswers": 200000
    }
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  }
}
POST/api/public/v1/metrics/query
query_metrics

Computes measures over a period, broken down by up to 3 dimensions, inside the credential's reach — the figures the dashboards show. Take the ids of measures, dimensions and filters from the metrics catalogue, and the ids of stores, nodes, processes, checklists, roles and concepts from the directory. An audit counts in a period when it was started or finished in it (finished audits only); an action of the action plan when its plan month overlaps it. period is a preset ({ "preset": "prev_month" }) or the caller's own dates ({ "from", "to" }, both included, at most 1830 days); presets are counted from today (the caller's local date; default the UTC date). compareWith adds the same measures for the previous period or the same period a year earlier. The answer is a table: columns says what each cell of a row is — a dimension cell is { id, label }, a measure or comparison cell is a number or null; a fraction is a share from 0 to 1. Rows are ordered by sort (default: the first measure, largest first) and cut at limit (default 50, at most 200); meta.truncated is true when there were more rows than that. A time bucket is always the first dimension, and such a query is a calendar: its rows go by the bucket, earliest first, it takes no sort, and a cut at limit leaves out the latest rows. A bucket too fine for the period is replaced by the next one that fits — columns names the one used. With a time bucket and another dimension together the comparison cells are null. Without dimensions the answer is one row of totals. A filter that a measure does not take is ignored for it and listed in meta.ignoredFilters. A store or node id that does not exist or lies outside the reach answers 404; the cuts by auditor and auditee answer 403 DATA_CATEGORY_DISABLED until the company opens people data. An item measure by item, group or tag, or under the groups or tagIds filter, reads every item answer of the audits it covers, unless it counts failed items alone in the default order; such a query over more item answers than limits.maxItemAnswers of the metrics catalogue answers 422 INVALID_QUERY, saying how many it covers: shorten the period or narrow it with storeIds, nodeIds or templateIds.

Request body application/json

  • measuresarray<string>required
    What to compute: ids of measures from the metrics catalogue.
    items one of audits.count audits.avg_score audits.hit_rate audits.avg_duration audits.unique_auditors audits.unique_auditees audits.with_critical items.failed_count items.fail_rate items.critical_failed_count groups.avg_score actions.created actions.finished_rate actions.missed_deadline_rate actions.open photo_checks.mismatch_count photo_checks.mismatch_rateitems 1–6
  • dimensionsarray<string>
    What to break the figures down by: ids of dimensions from the metrics catalogue. Default: none, one row of totals.
    items one of time.day time.week time.month time.quarter store node template process item group auditor auditee role store_concept audit_type tagitems ≤ 3default []
  • periodobject | objectrequired
    A preset, counted from today, or the caller's own dates, both included.
    Variants
    Variant 1
    • presetstringrequired
      one of last_7d last_30d last_90d last_3_months last_12_months this_month prev_month this_year
    Variant 2
    • fromstring · daterequired
    • tostring · daterequired
  • compareWithstring | null
    Adds each measure once more, for the previous period or for the same period a year earlier.
    one of previous_period same_period_last_yeardefault null
  • filtersobject
    Keeps the figures of the listed values; the metrics catalogue says what each filter takes.
    default {}
    Fields
    • processIdsarray<string>
      items ≤ 50item length 1–200
    • templateIdsarray<string>
      items ≤ 50item length 1–200
    • nodeIdsarray<string>
      items ≤ 50item length 1–200
    • storeIdsarray<string>
      items ≤ 50item length 1–200
    • storeConceptIdsarray<string>
      items ≤ 50item length 1–200
    • groupsarray<string>
      items ≤ 50item length 1–200
    • auditTypesarray<string>
      items one of one_page_checklist detailed_audit certificationitems ≤ 3
    • roleIdsarray<string>
      items ≤ 50item length 1–200
    • auditorIdsarray<string>
      items ≤ 50item length 1–200
    • auditeeIdsarray<string>
      items ≤ 50item length 1–200
    • tagIdsarray<string>
      items ≤ 50item length 1–200
  • sortobject | null
    The order of the rows: by a requested measure or by the label of the first dimension. Not taken with a time bucket.
    default null
    Fields
    • bystringrequired
      one of audits.count audits.avg_score audits.hit_rate audits.avg_duration audits.unique_auditors audits.unique_auditees audits.with_critical items.failed_count items.fail_rate items.critical_failed_count groups.avg_score actions.created actions.finished_rate actions.missed_deadline_rate actions.open photo_checks.mismatch_count photo_checks.mismatch_rate label
    • directionstringrequired
      one of asc desc
  • limitinteger
    The most rows to return.
    range 1–200default 50
  • nodeLevelinteger | null
    With the dimension node: the level (GET /structure/nodes) of the nodes to group by. Default: each store's parent.
    default null
  • todaystring · date
    The caller's local date, which a preset is counted from; within two days of the server's. Default: the UTC date.

Response 200 { data, meta }

The data field:

  • columnsarray<object>required
    Fields
    • keystringrequired
    • rolestringrequired
      one of dimension measure comparison
    • labelstringrequired
    • formatstring | nullrequired
      one of count fraction minutes
  • rowsarray<array<object | number | null>>required

Response headers

  • RateLimit-Limit How many calls of this operation's weight the credential may make in a minute.
  • RateLimit-Remaining How many of them are left in the current minute.
  • RateLimit-Reset Seconds until the current minute ends.
Possible errors 400 401 403 404 413 415 422 429 500 503 504
400INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY
401UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED
403PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN
404NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND
413PAYLOAD_TOO_LARGE
415UNSUPPORTED_MEDIA_TYPE
422INVALID_QUERY INVALID_PERIOD
429RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE
504OPERATION_TIMEOUT
Request
POST/api/public/v1/metrics/query
curl -X POST "https://api.proaudits.com/api/public/v1/metrics/query" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "measures": [
      "audits.count",
      "audits.avg_score"
    ],
    "dimensions": [
      "store"
    ],
    "period": {
      "preset": "prev_month"
    },
    "limit": 3
  }'
Response 200
{
  "data": {
    "columns": [
      {
        "key": "store",
        "role": "dimension",
        "label": "Store",
        "format": null
      },
      {
        "key": "audits.count",
        "role": "measure",
        "label": "Audits",
        "format": "count"
      },
      {
        "key": "audits.avg_score",
        "role": "measure",
        "label": "Average score",
        "format": "fraction"
      }
    ],
    "rows": [
      [
        {
          "id": "store-184",
          "label": "Абай 10"
        },
        42,
        0.873
      ]
    ]
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  }
}

Planned, done and missed store checklists by day and week.

GET/api/public/v1/checklists/status
get_checklist_status

How the stores within the credential's reach did with their scheduled checklists — the figures of the app's «Филиалы» page. For a day (date, default today in the company's time zone): per store the day's scheduled checklists (total), done (late ones included), in progress, missed, done late, carried over from earlier days (today only), the store's open and overdue tasks, and the open and overdue actions of its action plan (null where the action plan cannot be read). For a week (weekStart, any day of it): per store and per day total, done, late and missed; a closed day comes from the saved history, a future day counts its planned checklists only. summary covers every store of the answer, not the page. Stores are ordered by name, 50 per page (limit up to 200; pass page.nextCursor as cursor). nodeId keeps the stores below that node; one that does not exist or lies outside the reach answers 404 NODE_NOT_FOUND. A person whose reach is a single store and whose role does not open the store page gets no stores and meta.reason: "level", as in the app; a reach without stores gives meta.reason: "no_stores". At most 500 stores are computed (the first by name; meta.truncated). Days within 366 days of today.

Query parameters

  • datestring · date
    The day to report; default today in the company's time zone. Not with weekStart.
    example 2026-11-17
  • weekStartstring · date
    Any day of a week: the Monday to Sunday week it falls in is reported day by day. Not with date.
  • nodeIdstring
    Keeps the stores below this structure node.
    length 1–200
  • limitinteger
    The size of a page.
    range 1–200default 50
  • cursorstring
    page.nextCursor of the page before; leave it out for the first page. A cursor belongs to its list and to the other parameters it was made with.

Response 200 { data, meta, page }

The data field:

Variant 1
  • kind"day"required
  • datestring · daterequired
  • timeZonestringrequired
  • summaryobjectrequired
    Fields
    • totalintegerrequired
      range ≥ 0
    • doneintegerrequired
      range ≥ 0
    • inProgressintegerrequired
      range ≥ 0
    • missedintegerrequired
      range ≥ 0
    • lateintegerrequired
      range ≥ 0
    • carryOverintegerrequired
      range ≥ 0
    • openTasksintegerrequired
      range ≥ 0
    • overdueTasksintegerrequired
      range ≥ 0
    • openActionsinteger | nullrequired
    • overdueActionsinteger | nullrequired
  • itemsarray<object>required
    Fields
    • storeIdstringrequired
    • storeNamestringrequired
    • totalintegerrequired
      range ≥ 0
    • doneintegerrequired
      range ≥ 0
    • inProgressintegerrequired
      range ≥ 0
    • missedintegerrequired
      range ≥ 0
    • lateintegerrequired
      range ≥ 0
    • carryOverintegerrequired
      range ≥ 0
    • openTasksintegerrequired
      range ≥ 0
    • overdueTasksintegerrequired
      range ≥ 0
    • openActionsinteger | nullrequired
    • overdueActionsinteger | nullrequired
    • overdueActionsOverWeekinteger | nullrequired
    • sourcestringrequired
      one of live history
Variant 2
  • kind"week"required
  • fromstring · daterequired
  • tostring · daterequired
  • timeZonestringrequired
  • summaryobjectrequired
    Fields
    • storesintegerrequired
      range ≥ 0
    • totalintegerrequired
      range ≥ 0
    • doneintegerrequired
      range ≥ 0
    • lateintegerrequired
      range ≥ 0
    • missedintegerrequired
      range ≥ 0
  • itemsarray<object>required
    Fields
    • storeIdstringrequired
    • storeNamestringrequired
    • weekobjectrequired
      Fields
      • totalintegerrequired
        range ≥ 0
      • doneintegerrequired
        range ≥ 0
      • lateintegerrequired
        range ≥ 0
      • missedintegerrequired
        range ≥ 0
    • daysarray<object>required
      Fields
      • datestring · daterequired
      • totalintegerrequired
        range ≥ 0
      • doneintegerrequired
        range ≥ 0
      • lateintegerrequired
        range ≥ 0
      • missedintegerrequired
        range ≥ 0
      • sourcestringrequired
        one of live history planned

Response headers

  • RateLimit-Limit How many calls of this operation's weight the credential may make in a minute.
  • RateLimit-Remaining How many of them are left in the current minute.
  • RateLimit-Reset Seconds until the current minute ends.
  • Link The address of the next page, <…>; rel="next", while the list has more.
Possible errors 400 401 403 404 429 500 503 504
400INVALID_REQUEST MALFORMED_JSON INVALID_CURSOR CREDENTIAL_IN_QUERY
401UNAUTHENTICATED INVALID_CREDENTIAL CREDENTIAL_EXPIRED CREDENTIAL_REVOKED
403PLAN_NOT_ALLOWED API_ACCESS_DISABLED API_CONSENT_REQUIRED PRINCIPAL_INACTIVE ROLE_PERMISSION_REQUIRED INSUFFICIENT_SCOPE DATA_CATEGORY_DISABLED IP_NOT_ALLOWED FORBIDDEN
404NOT_FOUND STORE_NOT_FOUND NODE_NOT_FOUND
429RATE_LIMITED CONCURRENCY_LIMITED CAPACITY_EXCEEDED
500INTERNAL_ERROR
503SERVICE_UNAVAILABLE
504OPERATION_TIMEOUT
Request
GET/api/public/v1/checklists/status
curl "https://api.proaudits.com/api/public/v1/checklists/status?date=2026-11-17" \
  -H "Authorization: Bearer $PROAUDITS_API_KEY"
Response 200
{
  "data": {
    "kind": "day",
    "date": "2026-11-17",
    "timeZone": "Asia/Almaty",
    "summary": {
      "total": 120,
      "done": 97,
      "inProgress": 6,
      "missed": 11,
      "late": 4,
      "carryOver": 0,
      "openTasks": 9,
      "overdueTasks": 2,
      "openActions": 31,
      "overdueActions": 7
    },
    "items": [
      {
        "storeId": "store-184",
        "storeName": "Абай 10",
        "total": 4,
        "done": 3,
        "inProgress": 0,
        "missed": 1,
        "late": 1,
        "carryOver": 0,
        "openTasks": 1,
        "overdueTasks": 0,
        "openActions": 2,
        "overdueActions": 1,
        "overdueActionsOverWeek": 0,
        "source": "live"
      }
    ]
  },
  "meta": {
    "requestId": "5f0c2b9e-7c1d-4a57-9d43-2f6f5a1f0b3c",
    "generatedAt": "2026-11-18T09:30:00.000Z"
  },
  "page": {
    "limit": 50,
    "hasMore": false,
    "nextCursor": null
  }
}
Metrics catalogue

Everything POST/api/public/v1/metrics/query can be asked: measures, dimensions, filters and periods. GET/api/public/v1/metrics/catalog answers the same catalogue, with labels in English or Russian (lang). The ids of stores, nodes and reference values for the filters come from GET/api/public/v1/directory/search and GET/api/public/v1/stores.

The breakdowns and filters by auditor and auditee are closed until the company opens people data, so the catalogue does not list them; in a query they answer DATA_CATEGORY_DISABLED.

MeasureMeaningFormatDimensions
Audits
audits.count
Audits
Number of finished audits (checklists filled in).count
additive: yes
time.day time.week time.month time.quarter store node template process role store_concept audit_type
audits.avg_score
Average score
Average result of the audits, a share from 0 to 1.fraction
additive: no
time.day time.week time.month time.quarter store node template process role store_concept audit_type
audits.hit_rate
Hit rate
Share of audits whose result reached the checklist's goal.fraction
additive: no
time.day time.week time.month time.quarter store node template process role store_concept audit_type
audits.avg_duration
Duration
Average time an audit took, in minutes.minutes
additive: no
time.day time.week time.month time.quarter store node template process role store_concept audit_type
audits.unique_auditors
Auditors
Number of distinct employees who did audits.count
additive: no
time.day time.week time.month time.quarter store node template process role store_concept audit_type
audits.unique_auditees
Auditees
Number of distinct employees who were audited.count
additive: no
time.day time.week time.month time.quarter store node template process role store_concept audit_type
audits.with_critical
With critical failures
Number of audits with at least one failed critical item.count
additive: yes
time.day time.week time.month time.quarter store node template process role store_concept audit_type
Checklist items
items.failed_count
Violations
Number of failed items (answered "no") — violations. With the dimension item: the most frequent violations.count
additive: yes
time.day time.week time.month time.quarter store node template process item group role store_concept audit_type tag
items.fail_rate
Failure rate
Failed items out of answered items ("yes" and "no"; "not applicable" is left out).fraction
additive: no
time.day time.week time.month time.quarter store node template process item group role store_concept audit_type tag
items.critical_failed_count
Critical violations
Number of failed items marked critical.count
additive: yes
time.day time.week time.month time.quarter store node template process item group role store_concept audit_type tag
Checklist sections
groups.avg_score
Group score
Average result of checklist sections (item groups), a share from 0 to 1. With the dimension group: the result of each section.fraction
additive: no
time.day time.week time.month time.quarter store node template process group role store_concept audit_type
Action plan
actions.created
Actions
Corrective actions of the action plan (monthly, per store). Time buckets: month or quarter only.count
additive: yes
time.month time.quarter store node process item store_concept
actions.finished_rate
Actions done
Share of the action plan's actions marked done.fraction
additive: no
time.month time.quarter store node process item store_concept
actions.missed_deadline_rate
Actions late
Share of actions done after their deadline or still open past it.fraction
additive: no
time.month time.quarter store node process item store_concept
actions.open
Open actions
Actions not done yet.count
additive: yes
time.month time.quarter store node process item store_concept
Photo checks
photo_checks.mismatch_count
Photo mismatches
Audit photos the automatic photo check found not to match the item's reference photo. Only where the company uses the photo check.count
additive: yes
time.day time.week time.month time.quarter store node template process item role store_concept audit_type
photo_checks.mismatch_rate
Photo mismatch rate
Mismatching photos out of the photos checked with a clear verdict.fraction
additive: no
time.day time.week time.month time.quarter store node template process item role store_concept audit_type
DimensionKindMeaning
time.day
Day
timeCalendar day (UTC). The id of a cell is the date, YYYY-MM-DD.
time.week
Week
timeISO week, Monday to Sunday (UTC). The id of a cell is the date of its Monday.
time.month
Month
timeCalendar month. The id of a cell is YYYY-MM.
time.quarter
Quarter
timeCalendar quarter. The id of a cell is YYYY-Qn.
store
Store
categoryThe store the audit was made at. The id of a cell is the store's id, as in GET /stores.
node
Structure node
categoryA node of the company structure above the stores (a region, a city). Groups the stores under their ancestor at nodeLevel — the level of GET /structure/nodes, where 0 is a top node of the credential's reach; without nodeLevel, under each store's parent node. A store with no node above it inside the reach is a row of its own.
template
Checklist
categoryThe checklist that was filled in. The id of a cell is the checklist's id (the directory search with types=template).
process
Process
categoryThe process (a group of checklists) of the audit's checklist. A checklist in two processes counts in each; audits of a checklist in no process are the cell { "id": null, "label": "No process" }.
item
Item
categoryA checklist item (a question). The id of a cell is the item's id, its label the item's text.
group
Item group
categoryA section of a checklist (an item group), by name: the id and the label of a cell are the name.
role
Auditor role
categoryThe role of the employee who did the audit. The id of a cell is the role's id, as in GET /me and the directory search with types=role.
store_concept
Store concept
categoryThe store's concept or format. The id of a cell is the concept's id.
audit_type
Audit type
categoryThe checklist type. The id and the label of a cell are one_page_checklist, detailed_audit or certification.
tag
Tag
categoryA tag the company puts on checklist items (a topic such as cleanliness or service), by the items' tags today. Item measures only. An item with several tags counts in each, so the rows overlap and do not add up to the total; items without a tag are the cell { "id": null, "label": "No tag" }. The id of a cell is the id of the tag, which the filter tagIds takes. Only on an installation that has item tags.
FilterValuesMeaning
processIds
Processes
processIds of processes (the directory search with types=process): audits of the checklists in these processes.
templateIds
Checklists
templateIds of checklists (the directory search with types=template): audits of these checklists.
nodeIds
Structure nodes
nodeIds of structure nodes (GET /structure/nodes, or the directory search with types=node): the stores at and below each of them.
storeIds
Stores
storeIds of stores (GET /stores, or the directory search with types=store).
storeConceptIds
Store concepts
store_conceptIds of store concepts (the directory search with types=store_concept): the stores of these concepts.
groups
Item groups
groupNames of checklist sections (item groups), as the directory search with types=group returns them. Item and section measures only.
auditTypes
Audit types
one_page_checklist detailed_audit certificationChecklist types: one_page_checklist, detailed_audit, certification.
roleIds
Auditor roles
roleIds of roles (the directory search with types=role): audits done by employees with these roles.
tagIds
Tags
idsIds of item tags, as the cells of the dimension tag give them: only the items that carry one of these tags today. Item measures only.
last_7d last_30d last_90d last_3_months last_12_months this_month prev_month this_year

Comparisons (compareWith): previous_period same_period_last_year

Measures in one query, at most6
Dimensions, at most3
Rows by default50
Rows, at most200
Days in a custom period, at most1830
Values in one filter, at most50
Item answers a query may read one by one, at most200000