Coveo Context Mapping Configurations API

The Context Mapping Configurations API from Coveo — 2 operation(s) for context mapping configurations.

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-passagev3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetrequest-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetresultvalue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupby-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupbyresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupbyvalue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-resthighlightresponse-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restquerycorrection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryfunction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryparameters-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryparentresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryresponse-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restrankingfunction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-retrievepassagesrequestv3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-retrievepassagesresponsev3-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-passagev3-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetrequest-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetresultvalue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupby-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupbyresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupbyvalue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-resthighlightresponse-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restquerycorrection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryfunction-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryparameters-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryparentresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryresponse-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restrankingfunction-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-retrievepassagesrequestv3-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-retrievepassagesresponsev3-structure.json

Other Resources

OpenAPI Specification

coveo-context-mapping-configurations-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Coveo Activity Activities Context Mapping Configurations API
  description: API for Coveo Platform
  termsOfService: https://www.coveo.com/en/support/terms-agreements
  contact:
    name: Coveo
    url: https://connect.coveo.com/s/discussions
  version: 1.0.0
servers:
- url: https://platform.cloud.coveo.com
  description: Coveo public API endpoint
security:
- oauth2:
  - full
tags:
- name: Context Mapping Configurations
paths:
  /rest/organizations/{organizationId}/commerce/v2/tracking-ids/{trackingId}/context-mappings/{key}:
    get:
      tags:
      - Context Mapping Configurations
      summary: Get Context Mapping
      description: 'Gets a specific context mapping by key.</br></br>**Required privilege:** Merchandising Hub - View<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"COMMERCE","targetDomain":"MERCHANDISING_HUB","type":"VIEW","targetId":"*"}

        ```

        </details>'
      operationId: get
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      - name: trackingId
        in: path
        description: The unique identifier of the tracking target.
        required: true
        schema:
          type: string
      - name: key
        in: path
        description: The context mapping key
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ContextMappingModel'
      x-pretty-name: get
      x-required-privilege:
        owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: VIEW
        targetId: '*'
      x-required-privileges:
      - owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: VIEW
        targetId: '*'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/tracking-ids/paramId/context-mappings/paramId_get
    put:
      tags:
      - Context Mapping Configurations
      summary: Update Context Mapping
      description: 'Updates an existing context mapping by key</br></br>**Required privilege:** Merchandising Hub - Edit<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"COMMERCE","targetDomain":"MERCHANDISING_HUB","type":"EDIT","targetId":"{trackingId}"}

        ```

        </details>'
      operationId: update
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      - name: trackingId
        in: path
        description: The unique identifier of the tracking target.
        required: true
        schema:
          type: string
      - name: key
        in: path
        description: The context mapping key
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContextMappingModel'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ContextMappingModel'
      x-pretty-name: update
      x-required-privilege:
        owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: EDIT
        targetId: '{trackingId}'
      x-required-privileges:
      - owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: EDIT
        targetId: '{trackingId}'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/tracking-ids/paramId/context-mappings/paramId_put
    delete:
      tags:
      - Context Mapping Configurations
      summary: Delete Context Mapping
      description: 'Deletes a specific context mapping by key.</br></br>**Required privilege:** Merchandising Hub - Edit<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"COMMERCE","targetDomain":"MERCHANDISING_HUB","type":"EDIT","targetId":"{trackingId}"}

        ```

        </details>'
      operationId: delete
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      - name: trackingId
        in: path
        description: The unique identifier of the tracking target.
        required: true
        schema:
          type: string
      - name: key
        in: path
        description: The context mapping key
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
      x-pretty-name: delete
      x-required-privilege:
        owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: EDIT
        targetId: '{trackingId}'
      x-required-privileges:
      - owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: EDIT
        targetId: '{trackingId}'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/tracking-ids/paramId/context-mappings/paramId_delete
  /rest/organizations/{organizationId}/commerce/v2/tracking-ids/{trackingId}/context-mappings:
    get:
      tags:
      - Context Mapping Configurations
      summary: List Context Mappings
      description: 'Lists all context mapping configurations.</br></br>**Required privilege:** Merchandising Hub - View<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"COMMERCE","targetDomain":"MERCHANDISING_HUB","type":"VIEW","targetId":"*"}

        ```

        </details>'
      operationId: list
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      - name: trackingId
        in: path
        description: The unique identifier of the tracking target.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContextMappingModel'
      x-pretty-name: list
      x-required-privilege:
        owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: VIEW
        targetId: '*'
      x-required-privileges:
      - owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: VIEW
        targetId: '*'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/tracking-ids/paramId/context-mappings_get
    post:
      tags:
      - Context Mapping Configurations
      summary: Creates a Context Mapping
      description: 'Creates a context mapping for a specific key.</br></br>**Required privilege:** Merchandising Hub - Edit<br /><br /><details><summary>Privilege required</summary>

        ```

        {"owner":"COMMERCE","targetDomain":"MERCHANDISING_HUB","type":"EDIT","targetId":"{trackingId}"}

        ```

        </details>'
      operationId: create_2
      parameters:
      - name: organizationId
        in: path
        description: The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br />**Example:** `acmecorporation8tp8wu3`
        required: true
        schema:
          type: string
      - name: trackingId
        in: path
        description: The unique identifier of the tracking target.
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContextMappingModel'
        required: true
      responses:
        '201':
          description: Created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ContextMappingModel'
      x-pretty-name: create
      x-required-privilege:
        owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: EDIT
        targetId: '{trackingId}'
      x-required-privileges:
      - owner: COMMERCE
        targetDomain: MERCHANDISING_HUB
        type: EDIT
        targetId: '{trackingId}'
      x-ui-operation-id: /rest/organizations/paramId/commerce/v2/tracking-ids/paramId/context-mappings_post
components:
  schemas:
    MappingDestination:
      required:
      - attribute
      type: object
      properties:
        attribute:
          type: string
          description: The destination type where context mapping values can be applied
          example: QUERY_PIPELINE_CONTEXT
          enum:
          - QUERY_PIPELINE_CONTEXT
          - ML_CONTEXT
          - FIELD_ALIASES
        fieldAlias:
          type: string
          description: The field alias template used when attribute is FIELD_ALIASES. Must resolve to a field name pattern.
          example: price_{{contextValue}}
        fieldSource:
          type: string
          description: The field source template used when attribute is FIELD_ALIASES. Must resolve to 'field.subkey' pattern.
          example: price.{{contextValue}}
      description: The list of destinations where this context mapping should be applied.
      example:
      - attribute: QUERY_PIPELINE_CONTEXT
      - attribute: FIELD_ALIASES
    ContextMappingModel:
      required:
      - destinations
      - key
      - type
      type: object
      properties:
        key:
          pattern: ^[a-zA-Z]\w{0,63}$
          type: string
          description: A unique key for the context mapping. Must start with a letter and contain only letters, numbers, and underscores.
          example: user_segment
        type:
          type: string
          description: The data type for context mapping values
          example: STRING
          enum:
          - BOOLEAN
          - STRING
          - NUMBER
          - PRODUCT_LIST
        destinations:
          minItems: 1
          type: array
          description: The list of destinations where this context mapping should be applied.
          example:
          - attribute: QUERY_PIPELINE_CONTEXT
          - attribute: FIELD_ALIASES
          items:
            $ref: '#/components/schemas/MappingDestination'
      description: The context mapping configuration to create
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://platform.cloud.coveo.com/oauth/authorize
          tokenUrl: https://platform.cloud.coveo.com/oauth/token
          scopes:
            full: required