> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contentignite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /integration/:id/completeness

> Reports which required mapping fields of one integration have no value in a given context. Use it to explain a "missing required mapping" warning for an integration, optionally for one organisation, ad stack, publisher or ad unit.

- **Permission:** `integration.view`; the integration must be available to the caller, otherwise 404.
- `required_fields` lists the catalogue's required fields, leaving out computed ones; owner-only fields are included (the tag needs them) and flagged `owner_only` in `gaps` for a non-owner.
- A field's state is `ok` when any level in the chain has a real value, else `wnm` when a will-not-map marker is in the chain, else `missing`. Only `missing` and `wnm` appear in `gaps`.
- **Scope** (`type:id`) picks the chain:
  - `all` (default): the integration default only. It does **not** check every ad unit; use `GET /v1/integration/completeness` for that.
  - `organisation:{id}`: the organisation and its parents, then the integration default.
  - `ad_stack:{id}`: the stack, its organisation and parents, the integration default.
  - `publisher:{uid}`: each of the publisher's live ad units that run the integration, each through its whole chain, so per-unit values count; a field is missing when any unit misses it. `stack` narrows to one stack's units. If the publisher has no such unit, its own chain (publisher, organisations, `stack` if given, integration) is checked.
  - `config:{id}`: that ad unit's whole chain.
- An entity scope that doesn't exist, is archived or (restricted callers) is outside the caller's organisation tree returns 404. Any other scope text is treated as `all` and echoed back.



## OpenAPI

````yaml /openapi.json get /v1/integration/{id}/completeness
openapi: 3.0.1
info:
  title: CI Public API
  description: >-
    # Introduction

    Welcome to the Content Ignite API. A central place for all Content Ignite
    functionality. 


    This API enforces a separation between function and form, meaning anything
    you can do in our platforms can be replicated in your own bespoke solution.


    # Authentication

    Authentication is handled via JWTs. You can retrieve your unique JSON Web
    Token from the settings page in the platform, which needs to be passed in
    with every request.

    To do this, simple include it in an Authorization header with the "Bearer"
    key word.


    Please contact support for help getting started.


    # Error Codes

    This is a fully RESTful API, so prepare for a number of different HTTP
    status codes.


    There is also a standard "success" field returned for each request. This
    boolean value can provide a first check against a response.


    # Rate limit

    We reserve the right to block requests if we deem a client to be abusing the
    API.
  version: 1.0.0
servers:
  - url: https://api.tagdeliver.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Reporting
  - name: Reporting/Revenue Reports
  - name: Reporting/Experiment Reporting
  - name: Reporting/Campaign Reports
  - name: Reporting/Health Check
  - name: Reporting/Ads.txt
  - name: Reporting/Utility
  - name: Reporting/Insights Hub
  - name: Reporting/Insights Hub/SSP Insights
  - name: Reporting/Insights Hub/Core Web Vitals
  - name: Reporting/Insights Hub/Ads.txt Insights
  - name: Reporting/Insights Hub/Live Insights
  - name: Reporting/Insights Hub/Metrics
  - name: Reporting/Insights Hub/Diagnostics
  - name: Reporting/Insights Hub/Revenue Insights
  - name: Reporting/Insights Hub/Revenue Analytics
  - name: Reporting/Insights Hub/Demand Mix
  - name: Reporting/Insights Hub/Benchmarking
  - name: Organisation
  - name: Organisation/Organisation Meta
  - name: Organisation/Pricing
  - name: Ad Stack
  - name: Ad Stack/Integration
  - name: Publisher
  - name: Publisher/Publisher Stack
  - name: Publisher/Publisher Tag
  - name: Publisher/Publisher Meta
  - name: Publisher/Experiment
  - name: Publisher/Config (Ad unit)
  - name: Publisher/App Placement
  - name: AI
  - name: AI/Activity
  - name: Billing
  - name: Billing/Invoice
  - name: Audit Log
  - name: '[IN PROGRESS] Integration'
  - name: '[IN PROGRESS] Integration/Mapping'
  - name: '[IN PROGRESS] User'
  - name: '[IN PROGRESS] User/Account'
  - name: Mapping
  - name: public
paths:
  /v1/integration/{id}/completeness:
    get:
      tags:
        - '[IN PROGRESS] Integration'
        - '[IN PROGRESS] Integration/Mapping'
        - public
      summary: /integration/:id/completeness
      description: >-
        Reports which required mapping fields of one integration have no value
        in a given context. Use it to explain a "missing required mapping"
        warning for an integration, optionally for one organisation, ad stack,
        publisher or ad unit.


        - **Permission:** `integration.view`; the integration must be available
        to the caller, otherwise 404.

        - `required_fields` lists the catalogue's required fields, leaving out
        computed ones; owner-only fields are included (the tag needs them) and
        flagged `owner_only` in `gaps` for a non-owner.

        - A field's state is `ok` when any level in the chain has a real value,
        else `wnm` when a will-not-map marker is in the chain, else `missing`.
        Only `missing` and `wnm` appear in `gaps`.

        - **Scope** (`type:id`) picks the chain:
          - `all` (default): the integration default only. It does **not** check every ad unit; use `GET /v1/integration/completeness` for that.
          - `organisation:{id}`: the organisation and its parents, then the integration default.
          - `ad_stack:{id}`: the stack, its organisation and parents, the integration default.
          - `publisher:{uid}`: each of the publisher's live ad units that run the integration, each through its whole chain, so per-unit values count; a field is missing when any unit misses it. `stack` narrows to one stack's units. If the publisher has no such unit, its own chain (publisher, organisations, `stack` if given, integration) is checked.
          - `config:{id}`: that ad unit's whole chain.
        - An entity scope that doesn't exist, is archived or (restricted
        callers) is outside the caller's organisation tree returns 404. Any
        other scope text is treated as `all` and echoed back.
      parameters:
        - name: id
          in: path
          description: >-
            Encoded integration id (an opaque base-36 string such as `gjdhye`,
            as returned by `GET /v1/integration`). Never the raw numeric id.
          required: true
          example: gjdhye
          schema:
            type: string
        - name: scope
          in: query
          description: >-
            Context to check: `all` (default), `organisation:{organisation id}`,
            `ad_stack:{ad stack id}`, `publisher:{publisher uid}` or `config:{ad
            unit id}`. Type and id are separated by a single colon. Unrecognised
            values (including a type with no id) behave as `all`.
          required: false
          example: publisher:12345
          schema:
            type: string
            default: all
            pattern: ^(all|(organisation|ad_stack|publisher|config):[0-9]+)$
        - name: stack
          in: query
          description: >-
            Only with `scope=publisher:{uid}`: count only the publisher's ad
            units on this ad stack. Ignored unless numeric, and for other
            scopes.
          required: false
          example: 881
          schema:
            type: integer
        - name: uid
          in: query
          description: >-
            Optional publisher uid. When given, the integration is looked up
            among those available to this publisher's organisation (and its
            parents) instead of the caller's own. The publisher must exist and
            not be archived; a restricted (non-core) caller may only pass a
            publisher of their own organisation, otherwise 404 `Not Found`.
          required: false
          example: 12345
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: Completeness for the scope.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: object
                    properties:
                      integration_id:
                        type: string
                        description: Encoded integration id.
                      scope:
                        type: string
                        description: The `scope` as sent (`all` when omitted).
                      required_fields:
                        type: array
                        description: Required field keys checked.
                        items:
                          type: string
                      gaps:
                        type: array
                        description: Fields with no value in the scope.
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                              description: Field key.
                            state:
                              type: string
                              enum:
                                - missing
                                - wnm
                              description: >-
                                `missing`: no value anywhere in the chain.
                                `wnm`: no value, but marked will-not-map (an
                                acknowledged gap, not an error).
                            owner_only:
                              type: boolean
                              description: >-
                                Only the integration's owner can set it (true
                                only for a caller who isn't the owner).
                          required:
                            - field
                            - state
                            - owner_only
                      summary:
                        type: object
                        description: Gap counts by state.
                        properties:
                          missing:
                            type: integer
                            description: Gaps with state `missing`.
                          wnm:
                            type: integer
                            description: Gaps with state `wnm`.
                        required:
                          - missing
                          - wnm
                    required:
                      - integration_id
                      - scope
                      - required_fields
                      - gaps
                      - summary
                  success:
                    type: boolean
                    description: Always true on success.
                required:
                  - results
                  - success
              example:
                results:
                  integration_id: gjdhye
                  scope: publisher:12345
                  required_fields:
                    - adSlot
                  gaps:
                    - field: adSlot
                      state: missing
                      owner_only: false
                  summary:
                    missing: 1
                    wnm: 0
                success: true
          headers: {}
        '403':
          description: Missing the required permission.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    description: Always false on an error.
                required:
                  - message
                  - success
              example:
                message: User forbidden
                success: false
          headers: {}
        '404':
          description: >-
            The integration isn't available to the caller, or the scope's entity
            doesn't exist or is out of reach.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    description: Always false on an error.
                required:
                  - message
                  - success
              example:
                message: Unknown scope publisher:99999
                success: false
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.