Skip to Content
CDPGuidesSupport

Query Dispatches

Count dispatches to destinations by destination, event, status, and reason through the Ours Privacy Platform API.

Use Query Dispatches to see how events reach your destinations. The breakdown counts dispatches over a date range, grouped by destination, destination type, status, failure or block reason, event name, source, or identifier, per hour or per day. For example, you can see each destination's sent, failed, and blocked counts for the last week, or how many Lead events reached each destination per day.

The input and breakdown objects are JSON-encoded in the query string. Facet values list the exact reasons and event names a breakdown can filter by, and property suggestions list the payload fields your destinations receive. Responses contain counts and field paths, never payload values or visitor identifiers.

GET/rest/v1/query-dispatches/breakdown

GET
/rest/v1/query-dispatches/breakdown

Authorization

headerAuthorizationBearer <token>

Ours Privacy API key

Query Parameters

input*string

Which dispatches to count. JSON-encode input in the REST query string.

breakdown*string

How to group the counts. JSON-encode breakdown in the REST query string.

Response Body

Dispatch counts grouped by the requested dimensions

application/json
  1. response
rows*array<>

Largest groups first, up to the group limit in capabilities.

totalDispatches*number

All dispatches matching input.

truncated*boolean

True when groups beyond the group limit were folded into otherDispatches.

otherDispatches*number

Dispatches in groups past the limit. Zero when grouped by IDENTIFIER, since a dispatch can count in several groups.

Example Request
curl -X GET 'https://app.oursprivacy.com/rest/v1/query-dispatches/breakdown?input=%7B%22version%22%3A1%2C%22from%22%3A%222026-11-01%22%2C%22to%22%3A%222026-11-07%22%2C%22eventNames%22%3A%5B%22Lead%22%5D%7D&breakdown=%7B%22timeGrain%22%3A%22DAY%22%2C%22dimensions%22%3A%5B%22DESTINATION%22%2C%22STATUS%22%5D%7D'
Example Response
{  "rows": [    {      "bucket": "2019-08-24T14:15:22Z",      "keys": [        {          "dimension": "DESTINATION",          "value": "string",          "label": "string"        }      ],      "dispatches": 0,      "baseDispatches": 0,      "identifierCounts": [        {          "identifier": "EMAIL",          "count": 0,          "applicableDispatches": 0        }      ]    }  ],  "totalDispatches": 0,  "truncated": true,  "otherDispatches": 0}

GET/rest/v1/query-dispatches/capabilities

GET
/rest/v1/query-dispatches/capabilities

Authorization

headerAuthorizationBearer <token>

Ours Privacy API key

Response Body

Query Dispatches limits

application/json
  1. response
version*integer

Query format version to send as input.version.

defaultDateRangeDays*integer

Days covered when property suggestions omit from.

maxDateRangeDays*integer

Longest from-to range, in days.

maxHourlyDateRangeDays*integer

Longest range, in days, for an HOUR time grain.

maxBreakdownDimensions*integer

Most dimensions in one breakdown.

maxBreakdownGroups*integer

Most groups returned before the rest fold into otherDispatches.

Example Request
curl -X GET 'https://app.oursprivacy.com/rest/v1/query-dispatches/capabilities'
Example Response
{  "version": 0,  "defaultDateRangeDays": 0,  "maxDateRangeDays": 0,  "maxHourlyDateRangeDays": 0,  "maxBreakdownDimensions": 0,  "maxBreakdownGroups": 0}

GET/rest/v1/query-dispatches/facet-values

GET
/rest/v1/query-dispatches/facet-values

Authorization

headerAuthorizationBearer <token>

Ours Privacy API key

Query Parameters

input*string

Which values to list. JSON-encode input in the REST query string.

Response Body

Observed values for one dispatch dimension

application/json
  1. response
values*array<>

Most frequent values first, up to 100.

from*string

Start of the counted range.

Formatdate-time
to*string

Exclusive end of the counted range.

Formatdate-time
Example Request
curl -X GET 'https://app.oursprivacy.com/rest/v1/query-dispatches/facet-values?input=%7B%22from%22%3A%222026-11-01%22%2C%22to%22%3A%222026-11-07%22%2C%22dimension%22%3A%22REASON%22%7D'
Example Response
{  "values": [    {      "value": "string",      "label": "string",      "count": 0    }  ],  "from": "2019-08-24T14:15:22Z",  "to": "2019-08-24T14:15:22Z"}

GET/rest/v1/query-dispatches/property-suggestions

GET
/rest/v1/query-dispatches/property-suggestions

Authorization

headerAuthorizationBearer <token>

Ours Privacy API key

Query Parameters

input?string

Which dispatches to sample. JSON-encode input in the REST query string.

Response Body

Payload field paths sent to destinations

application/json
  1. response
entities*array<>

Payload field paths and types seen in a sample of recent dispatches; no values.

sampled*boolean

True when the paths come from a sample, so rare paths may be missing.

from*string

Start of the sampled range.

Formatdate-time
to*string

Exclusive end of the sampled range.

Formatdate-time
Example Request
curl -X GET 'https://app.oursprivacy.com/rest/v1/query-dispatches/property-suggestions'
Example Response
{  "entities": [    {      "property": "string",      "path": [        "string"      ],      "type": "string",      "supportsBreakdown": true    }  ],  "sampled": true,  "from": "2019-08-24T14:15:22Z",  "to": "2019-08-24T14:15:22Z"}

Next Steps

How is this guide?