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

# Public Decide Matches



## OpenAPI

````yaml https://clientapi.retailgrid.io/openapi.json post /v1/matching/matches:batch-decide
openapi: 3.1.0
info:
  title: Retailgrid Public API
  version: v1
servers: []
security: []
paths:
  /v1/matching/matches:batch-decide:
    post:
      tags:
        - matching
      summary: Public Decide Matches
      operationId: public_decide_matches_v1_matching_matches_batch_decide_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            format: uuid
            title: Idempotency-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchDecisions'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchMutationResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BatchDecisions:
      properties:
        decisions:
          items:
            $ref: '#/components/schemas/ReviewAction'
          type: array
          maxItems: 500
          minItems: 1
          title: Decisions
      additionalProperties: false
      type: object
      required:
        - decisions
      title: BatchDecisions
    BatchMutationResult:
      properties:
        external_org_id:
          type: string
          format: uuid
          title: External Org Id
        request_id:
          type: string
          title: Request Id
        results:
          items:
            $ref: '#/components/schemas/MutationOutcome'
          type: array
          maxItems: 500
          title: Results
        changed_item_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 500
            - type: 'null'
          title: Changed Item Ids
      additionalProperties: false
      type: object
      required:
        - external_org_id
        - request_id
        - results
      title: BatchMutationResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ReviewAction:
      properties:
        match_id:
          type: string
          maxLength: 35
          minLength: 1
          title: Match Id
        version:
          type: integer
          exclusiveMinimum: 0
          title: Version
        revision:
          type: integer
          minimum: 0
          title: Revision
        evidence:
          type: string
          maxLength: 32
          minLength: 32
          title: Evidence
        action:
          type: string
          enum:
            - approve
            - reject
            - reopen
            - rematch
          title: Action
        note:
          type: string
          maxLength: 500
          title: Note
          default: ''
        replacement:
          anyOf:
            - $ref: '#/components/schemas/MatchPair'
            - type: 'null'
        relation:
          anyOf:
            - type: string
              enum:
                - direct
                - substitute
            - type: 'null'
          title: Relation
      additionalProperties: false
      type: object
      required:
        - match_id
        - version
        - revision
        - evidence
        - action
      title: ReviewAction
    MutationOutcome:
      properties:
        index:
          type: integer
          title: Index
        match_id:
          type: string
          title: Match Id
        outcome:
          type: string
          enum:
            - decided
            - removed
            - already_removed
            - error
          title: Outcome
        result_match_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Result Match Id
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
      additionalProperties: false
      type: object
      required:
        - index
        - match_id
        - outcome
      title: MutationOutcome
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MatchPair:
      properties:
        rg_item_id:
          type: string
          maxLength: 128
          minLength: 1
          pattern: ^\S(?:.*\S)?$
          title: Rg Item Id
        competitor_product_id:
          type: string
          maxLength: 36
          minLength: 1
          title: Competitor Product Id
        relation:
          type: string
          enum:
            - direct
            - substitute
          title: Relation
          default: direct
      additionalProperties: false
      type: object
      required:
        - rg_item_id
        - competitor_product_id
      title: MatchPair

````

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