/mapping/gaps
Finds required mapping fields that resolve to no value for live ad units, grouped per (integration, publisher, field), with the exact records that would fill each gap. This is the agent’s to-do list for completing mapping.
How it works. It checks every active ad unit on an active ad stack that includes an integration in scope, plus disabled units that a running experiment still serves. Each required field is resolved through the unit’s whole chain: the unit, its publisher, the organisation and its parents, the ad stack, then the integration default. A field with no value anywhere is missing. A field only acknowledged as will-not-map is wnm, and is listed only with include_wnm=true. Computed fields never gap; owner-only fields do, because the build needs them.
Records. Each gap lists the affected units and the records to send: one publisher-level record that covers all the publisher’s units, or one record per affected unit when the publisher already sets that field per unit. records is empty when owner_only is true.
Workflow.
- GET /v1/mapping/gaps, narrowed with
publisher_uid,organisation_id,integration_idorplatform. - Fill in each record’s
valueso it matches the gap’sschema(GET /v1/mapping/schema/ has the full catalogue), or setwnm: trueto acknowledge a deliberate gap. - POST the records to /v1/mapping/validate, then POST the valid ones to /v1/mapping/apply.
- Call this endpoint again to confirm the gaps are gone.
Scope is as for GET /v1/mapping/query: the caller’s organisation chain, or the publisher’s with publisher_uid. Non-CORE callers only see publishers in their organisation tree. Gaps are ordered by integration, publisher uid, then unit. limit caps gaps (default 200, max 2000), and truncated says when there are more. units_checked counts the distinct units examined. Requires the integration.view permission.