> ## 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/fields

> Returns the mapping field catalogue for one integration: every field a mapping value can be set for, with its JSON Schema, whether it's required, where it can be set and whether the caller can write it. Use it to render a mapping grid or to build valid records for `POST /v1/integration/{id}/mapping/validate` and `/apply`.

- **Permission:** `ad_stack.view`. The integration must be available to the caller's organisation (its own, a parent's, or a core one), otherwise 404. The Global Settings pseudo-integration is accepted too.
- One row per stack-schema property. An object property with declared sub-properties becomes one row per leaf under a dotted key (`video.mimes`, titled "Video › Mimes"); records must use that dotted key.
- The display label is `schema.title` (derived from the key when the module has none). There is no top-level `title`.
- `readonly: true` means the caller can't write the field: a computed default (`default_macro` names the macro), an owner-only field for a non-owner (`owner_only: true`; owners are the integration's organisation, its parent organisations and core admins), or a field the schema declares read-only. Read-only fields are rejected by validate / apply / delete.
- `required` is what the integration needs from some level for its tag; owner-only fields stay required for everyone.
- `levels` omits `config` when the field can't vary per ad unit; validate / apply reject ad-unit records for it.
- The list always ends with the built-in `approved` field (`builtin: true`, `wnm_allowed: false`), read-only for anyone but the owner.
- The same catalogue feeds `GET /v1/integration/{id}/fields/template.csv` and the completeness endpoints.
- `integration_id` is the encoded id; the envelope turns an all-digit id into a number. `schema` keeps its declared types.



## OpenAPI

````yaml /openapi.json get /v1/integration/{id}/fields
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: Integration
  - name: Integration/Mapping
  - name: User
  - name: User/Account
  - name: Mapping
  - name: public
  - name: '[IN PROGRESS] Integration/Mapping'
  - name: '[IN PROGRESS] Integration'
paths:
  /v1/integration/{id}/fields:
    get:
      tags:
        - Integration
        - '[IN PROGRESS] Integration/Mapping'
        - public
      summary: /integration/:id/fields
      description: >-
        Returns the mapping field catalogue for one integration: every field a
        mapping value can be set for, with its JSON Schema, whether it's
        required, where it can be set and whether the caller can write it. Use
        it to render a mapping grid or to build valid records for `POST
        /v1/integration/{id}/mapping/validate` and `/apply`.


        - **Permission:** `ad_stack.view`. The integration must be available to
        the caller's organisation (its own, a parent's, or a core one),
        otherwise 404. The Global Settings pseudo-integration is accepted too.

        - One row per stack-schema property. An object property with declared
        sub-properties becomes one row per leaf under a dotted key
        (`video.mimes`, titled "Video › Mimes"); records must use that dotted
        key.

        - The display label is `schema.title` (derived from the key when the
        module has none). There is no top-level `title`.

        - `readonly: true` means the caller can't write the field: a computed
        default (`default_macro` names the macro), an owner-only field for a
        non-owner (`owner_only: true`; owners are the integration's
        organisation, its parent organisations and core admins), or a field the
        schema declares read-only. Read-only fields are rejected by validate /
        apply / delete.

        - `required` is what the integration needs from some level for its tag;
        owner-only fields stay required for everyone.

        - `levels` omits `config` when the field can't vary per ad unit;
        validate / apply reject ad-unit records for it.

        - The list always ends with the built-in `approved` field (`builtin:
        true`, `wnm_allowed: false`), read-only for anyone but the owner.

        - The same catalogue feeds `GET
        /v1/integration/{id}/fields/template.csv` and the completeness
        endpoints.

        - `integration_id` is the encoded id; the envelope turns an all-digit id
        into a number. `schema` keeps its declared types.
      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: uid
          in: query
          description: >-
            Optional publisher uid. Looks the integration up among those
            available to this publisher's organisation, and resolves fields that
            depend on whether the publisher is owned and operated by the
            integration's organisation. 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: The field catalogue.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: object
                    properties:
                      integration_id:
                        type: string
                        description: Encoded integration id (echoes the path).
                      platform:
                        type: string
                        description: >-
                          The integration's platform (module) name, e.g.
                          `Pubmatic`.
                      fields:
                        type: array
                        description: >-
                          The catalogue, in schema order, ending with
                          `approved`.
                        items:
                          type: object
                          description: One mappable field.
                          properties:
                            key:
                              type: string
                              description: >-
                                Canonical field key used in mapping records and
                                CSV rows. Sub-fields of an object use a dotted
                                key (`video.mimes`).
                            schema:
                              type: object
                              additionalProperties: true
                              description: >-
                                The field's JSON Schema fragment, used to pick
                                an editor and to validate values. Always has
                                `title` (the display label; for a sub-field
                                "Parent › Child"); may have `type` (a string or
                                an array of types), `enum`, `items`, `examples`,
                                `description`, and `definitions` when it uses
                                `$ref`. Never has `readOnly` (see `readonly`).
                                Types are returned exactly as declared (no
                                numeric coercion).
                              properties: {}
                            required:
                              type: boolean
                              description: >-
                                The integration needs a value for this field at
                                some level for a working tag. Owner-only fields
                                stay required for everyone. Not enforced per
                                record.
                            levels:
                              type: array
                              description: >-
                                Levels a value can be set at. `config` (ad unit)
                                is left out when the field can't vary per ad
                                unit; `approved` is integration / organisation /
                                publisher only.
                              items:
                                type: string
                                enum:
                                  - integration
                                  - ad_stack
                                  - organisation
                                  - publisher
                                  - config
                            readonly:
                              type: boolean
                              description: >-
                                Present (true) when the caller can't write the
                                field: a computed default, an owner-only field
                                viewed by a non-owner, a schema-declared
                                read-only field, or `approved` for anyone but
                                the owner. Absent otherwise.
                            owner_only:
                              type: boolean
                              description: >-
                                Present (true) when the field is read-only only
                                because the caller isn't the integration's
                                owner; the owner must set it. Absent otherwise.
                            default_macro:
                              type: string
                              description: >-
                                Present on computed fields: the macro the value
                                is filled from at build time, e.g.
                                `__ACCOUNT_ID__`, `__ELEMENT_ID__`,
                                `__AD_UNIT_CODE__`, `__CREATIVE_SIZES__` or
                                `__COMPUTED__`. Such fields are always
                                read-only.
                            builtin:
                              type: boolean
                              description: >-
                                Present (true) only on the built-in `approved`
                                field, which isn't part of the module's own
                                schema.
                            wnm_allowed:
                              type: boolean
                              description: >-
                                Present (false) only on `approved`: it can't be
                                marked will not map. Every other field can.
                          required:
                            - key
                            - schema
                            - required
                            - levels
                    required:
                      - integration_id
                      - platform
                      - fields
                  success:
                    type: boolean
                    description: Always true on success.
                required:
                  - results
                  - success
              example:
                results:
                  integration_id: gjdhye
                  platform: Pubmatic
                  fields:
                    - key: publisherId
                      schema:
                        title: Publisher ID
                        type: string
                        examples:
                          - '32572'
                        default: ${integration.account_id}
                      required: true
                      levels:
                        - integration
                        - ad_stack
                        - organisation
                        - publisher
                        - config
                      readonly: true
                      default_macro: __ACCOUNT_ID__
                    - key: adSlot
                      schema:
                        title: Ad Slot Name
                        type: string
                        examples:
                          - '38519891'
                      required: true
                      levels:
                        - integration
                        - ad_stack
                        - organisation
                        - publisher
                        - config
                    - key: pmzoneid
                      schema:
                        title: Zone ID
                        type: string
                        examples:
                          - zone1,zone2
                      required: false
                      levels:
                        - integration
                        - ad_stack
                        - organisation
                        - publisher
                        - config
                    - key: video.mimes
                      schema:
                        title: Video parameters › Video MIME types
                        type: array
                        uniqueItems: true
                        items:
                          enum:
                            - video/mp4
                            - video/webm
                        examples:
                          - - video/mp4
                      required: false
                      levels:
                        - integration
                        - ad_stack
                        - organisation
                        - publisher
                        - config
                    - readonly: true
                      key: approved
                      schema:
                        title: Approved
                        type: boolean
                        description: >-
                          Whether this integration runs for the publisher. Unset
                          means approved. To approve publishers one by one, set
                          No at integration level, then Yes for each
                          organisation or publisher you approve.
                      required: false
                      levels:
                        - integration
                        - organisation
                        - publisher
                      builtin: true
                      wnm_allowed: false
                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 (or another referenced entity) doesn't exist or
            isn't available to the caller.
          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: Integration gjdhye 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.