Agency RollupsYesterday's contract result per location

Yesterday's contract result per location

Yesterday's (UTC) event contract result for every location in one call, the same report GET /client/v1/contracts/violations returns for that day and the window the 08:00 UTC sweep checks. Locations without contracts return no_contracts and are not scanned. A day too large to scan unsampled is retried at sample 10: rates and coverage stay accurate. One location's failure returns status: error on its row, not a failed response.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/agency/contracts/status?location_ids=loc_abc123%2Cloc_def456" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "day": "2026-10-05",
    "locations": [
      {
        "location_id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "John Doe",
        "status": "ok",
        "contracts": 4,
        "events_with_violations": 1,
        "events_no_data": 0,
        "worst": {
          "event": "order_completed",
          "kind": "missing_required",
          "detail": "`value` is absent on 200 of 1000 events"
        },
        "outage": true,
        "sample": 1,
        "truncated": true,
        "error": {
          "code": "example_string",
          "message": "example_string"
        }
      }
    ]
  }
}
GET
/client/v1/agency/contracts/status
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) only — a location secret key (sk_) gets 403 agency_required. Keys are server-side credentials; this surface serves no CORS headers on purpose. Agency-wide scoped keys (mcp_ with no fixed location) are accepted too and need agency:read; a client-bound mcp_ key gets 403 agency_key_required. See Using an mcp_ key over HTTP.

Agency key (ak_) only — a location secret key (sk_) gets 403 agency_required. Keys are server-side credentials; this surface serves no CORS headers on purpose. Agency-wide scoped keys (mcp_ with no fixed location) are accepted too and need agency:read; a client-bound mcp_ key gets 403 agency_key_required. See Using an mcp_ key over HTTP.
query
location_idsstring

Comma-separated location ids to narrow the roster. Every id must belong to this agency — a foreign id is 403 location_not_linked, never a silent empty result. Required in batches of up to 100 when the agency has more than 100 locations.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) only — a location secret key (sk_) gets 403 agency_required. Keys are server-side credentials; this surface serves no CORS headers on purpose. Agency-wide scoped keys (mcp_ with no fixed location) are accepted too and need agency:read; a client-bound mcp_ key gets 403 agency_key_required. See Using an mcp_ key over HTTP.

Query Parameters

location_idsstring

Comma-separated location ids to narrow the roster. Every id must belong to this agency — a foreign id is 403 location_not_linked, never a silent empty result. Required in batches of up to 100 when the agency has more than 100 locations.

Example:
loc_abc123,loc_def456

Responses

successboolean
dataobject