> ## 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.

# /mapping/validate

> Checks mapping records against each record's own integration **without writing anything**. Use it before POST /v1/mapping/apply to see which rows would be refused and why. It takes the same body as apply; `mode` is ignored here.

Each record names its integration (`integration_id`, encoded), `level`, `entity_id`, `field` and `value` (or `wnm: true`). For every record it checks that:

- the integration is reachable: available to the caller's organisation chain (its own, its parents', CORE's), or to the organisation of the record's entity, so a CORE user or a parent organisation can map a publisher's own integrations;
- the level is known and the field exists in that integration's catalogue (exact key; see GET /v1/mapping/schema/{platform});
- the caller may write the field: not computed, not owner-only unless the caller owns the integration, and `approved` only by the owner, only at integration / organisation / publisher level and never as wnm;
- a `config` (ad unit) record is for a field that can vary per unit;
- a non-empty value validates against the field's JSON Schema (empty values and wnm rows skip this);
- the entity exists, isn't archived and is inside the caller's organisation tree (CORE: just exists). Integration-level records need the caller to own the integration.

Results are per row, with no all-or-nothing failure: the response is 200 even when every row is invalid. `rows[].index` is the record's 0-based position. Entity problems are also listed in `unknown_entities`.

Requires the `integration.view` permission.



## OpenAPI

````yaml /openapi.json post /v1/mapping/validate
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/mapping/validate:
    post:
      tags:
        - Mapping
        - '[IN PROGRESS] Integration/Mapping'
        - public
      summary: /mapping/validate
      description: >-
        Checks mapping records against each record's own integration **without
        writing anything**. Use it before POST /v1/mapping/apply to see which
        rows would be refused and why. It takes the same body as apply; `mode`
        is ignored here.


        Each record names its integration (`integration_id`, encoded), `level`,
        `entity_id`, `field` and `value` (or `wnm: true`). For every record it
        checks that:


        - the integration is reachable: available to the caller's organisation
        chain (its own, its parents', CORE's), or to the organisation of the
        record's entity, so a CORE user or a parent organisation can map a
        publisher's own integrations;

        - the level is known and the field exists in that integration's
        catalogue (exact key; see GET /v1/mapping/schema/{platform});

        - the caller may write the field: not computed, not owner-only unless
        the caller owns the integration, and `approved` only by the owner, only
        at integration / organisation / publisher level and never as wnm;

        - a `config` (ad unit) record is for a field that can vary per unit;

        - a non-empty value validates against the field's JSON Schema (empty
        values and wnm rows skip this);

        - the entity exists, isn't archived and is inside the caller's
        organisation tree (CORE: just exists). Integration-level records need
        the caller to own the integration.


        Results are per row, with no all-or-nothing failure: the response is 200
        even when every row is invalid. `rows[].index` is the record's 0-based
        position. Entity problems are also listed in `unknown_entities`.


        Requires the `integration.view` permission.
      parameters:
        - name: uid
          in: query
          description: >-
            Optional publisher uid. Integrations available to that publisher's
            organisation chain (its organisation, its parents and CORE) are
            accepted for every record, in place of the caller's own chain. The
            caller must be able to access the publisher (404 `Not Found`
            otherwise). Rarely needed: a record's integration is accepted anyway
            when it is available to the organisation of the record's own entity.
          required: false
          example: 17086
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - records
              properties:
                mode:
                  type: string
                  enum:
                    - overwrite
                    - append
                  default: overwrite
                  description: >-
                    Accepted for parity with POST /v1/mapping/apply but ignored:
                    validation never reports append skips.
                records:
                  type: array
                  items:
                    type: object
                    required:
                      - integration_id
                      - level
                      - field
                    properties:
                      integration_id:
                        type: string
                        description: >-
                          Encoded integration id: an opaque string such as
                          `gjdi9e`, as returned by GET /v1/integration, GET
                          /v1/mapping/schema/{platform}
                          (`integrations[].integration_id`) or GET
                          /v1/mapping/gaps. Never a raw database id.
                        example: gjdi9e
                      level:
                        type: string
                        enum:
                          - integration
                          - ad_stack
                          - organisation
                          - publisher
                          - config
                        description: >-
                          Where the value is set. Resolution is most specific
                          first: config > publisher > organisation chain
                          (nearest first) > ad_stack > integration.
                      entity_id:
                        type: integer
                        description: >-
                          The entity at `level`: organisation id
                          (`organisation`), ad stack id (`ad_stack`), publisher
                          uid (`publisher`) or ad unit id, also called config id
                          (`config`). Required at every level except
                          `integration`, where it is ignored (send null or omit
                          it).
                        nullable: true
                        example: 17086
                      field:
                        type: string
                        description: >-
                          Exact field key from the integration's catalogue
                          (`fields[].key` in GET /v1/mapping/schema/{platform}),
                          e.g. `placementId` or a dotted sub-field such as
                          `video.mimes`. `approved` is the built-in approval
                          field.
                        example: placement
                      value:
                        description: >-
                          The value, matching the field's JSON Schema (string,
                          number, boolean, array or object as the schema says).
                          Ignored when `wnm` is true. An empty value (null, ""
                          or []) skips schema validation and is stored as an
                          empty row, which resolution skips.
                        example: inScreen
                      wnm:
                        type: boolean
                        default: false
                        description: >-
                          Will not map: acknowledges that this required field is
                          deliberately left empty for this entity. Clears the
                          completeness warning but doesn't block values
                          inherited from higher levels. Not allowed for
                          `approved`.
                  description: >-
                    The mapping records. Each carries its own `integration_id`,
                    so one request can span integrations. A missing `records` is
                    treated as an empty list; a non-array is a 400.
            example:
              mode: append
              records:
                - integration_id: gjdi9e
                  level: publisher
                  entity_id: 17086
                  field: placement
                  value: inScreen
                  wnm: false
                - integration_id: gjdi9e
                  level: config
                  entity_id: 7111
                  field: placment
                  value: inArticle
                  wnm: false
        required: true
      responses:
        '200':
          description: Per-record validation results.
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                  - success
                properties:
                  results:
                    type: object
                    required:
                      - valid_count
                      - invalid_count
                      - rows
                      - unknown_entities
                    properties:
                      valid_count:
                        type: integer
                        description: Number of valid records.
                      invalid_count:
                        type: integer
                        description: Number of invalid records.
                      rows:
                        type: array
                        items:
                          type: object
                          required:
                            - index
                            - valid
                            - integration_id
                            - field
                            - errors
                          properties:
                            index:
                              type: integer
                              description: >-
                                Position of the record in the request's
                                `records` array (0-based).
                            valid:
                              type: boolean
                              description: >-
                                True when the record would be written by POST
                                /v1/mapping/apply.
                            integration_id:
                              type: string
                              description: >-
                                The record's `integration_id` as sent (null when
                                missing). An all-digit encoded id comes back as
                                a JSON number (numeric coercion).
                              nullable: true
                            field:
                              type: string
                              description: >-
                                The record's `field` as sent (null when
                                missing).
                              nullable: true
                            errors:
                              type: array
                              items:
                                type: string
                              description: >-
                                Why the record is invalid; empty when valid.
                                Messages include: `Unknown or inaccessible
                                integration`, `Integration module not found`,
                                `Unknown level '<level>'`, `Field is required`,
                                `Unknown field '<field>' for this integration`,
                                `'<Title>' is filled in automatically, so it
                                can't be set`, `Only the integration's owner can
                                set '<Title>'`, `'<Title>' is read-only, so it
                                can't be set`, `'<field>' can't be set per ad
                                unit: <Platform> uses one value for every unit.
                                Set it at publisher level or above.`, `Only the
                                integration's owner can approve publishers`,
                                approval level / wnm errors, JSON Schema
                                validation messages (up to 5), and entity scope
                                errors (`entity_id is required for <level>`,
                                `Unknown <level> <id>`, `No access to <level>
                                <id>`, `Only the integration owner can set
                                integration-level values`).
                        description: One entry per record, in request order.
                      unknown_entities:
                        type: array
                        items:
                          type: object
                          required:
                            - index
                            - entity_type
                            - entity_id
                            - reason
                          properties:
                            index:
                              type: integer
                              description: Position of the record in `records` (0-based).
                            entity_type:
                              type: string
                              description: The record's `level`.
                              nullable: true
                            entity_id:
                              type: integer
                              description: >-
                                The record's `entity_id` as sent (null for
                                integration-level records).
                              nullable: true
                            reason:
                              type: string
                              description: >-
                                `entity_id is required for <level>`, `Unknown
                                <level> <id>` (doesn't exist or is archived),
                                `No access to <level> <id>` (outside the
                                caller's organisation tree) or `Only the
                                integration owner can set integration-level
                                values`.
                        description: >-
                          Records whose entity doesn't exist, is archived or is
                          out of the caller's scope (these rows are also invalid
                          in `rows`).
                  success:
                    type: boolean
                    enum:
                      - true
                    description: Always true on success.
              example:
                results:
                  valid_count: 1
                  invalid_count: 1
                  rows:
                    - index: 0
                      valid: true
                      integration_id: gjdi9e
                      field: placement
                      errors: []
                    - index: 1
                      valid: false
                      integration_id: gjdi9e
                      field: placment
                      errors:
                        - Unknown field 'placment' for this integration
                  unknown_entities: []
                success: true
          headers: {}
        '400':
          description: '`records` isn''t an array.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false on errors.
              example:
                message: records must be an array
                success: false
          headers: {}
        '403':
          description: >-
            The caller lacks the required permission (or no user could be read
            from the token).
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false on errors.
              example:
                message: User forbidden
                success: false
          headers: {}
        '404':
          description: '`uid` was given and the caller can''t access that publisher.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - success
                properties:
                  message:
                    type: string
                    description: What went wrong.
                  success:
                    type: boolean
                    enum:
                      - false
                    description: Always false on errors.
              example:
                message: Not Found
                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.