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

# Handles `PUT /v1/platform/catalog/{code}`.

> # Errors

`404` for an unknown code or no operator credential, `401` without the
operator token, `422` for an empty update or one whose result does not
validate, `503` when the store cannot be reached.



## OpenAPI

````yaml /openapi.json put /v1/platform/catalog/{code}
openapi: 3.1.0
info:
  title: Esectra API
  description: >-
    Transaction screening, identity verification, and wallet risk.


    Every create route accepts `Idempotency-Key`; replaying one returns the
    original record with `200` where the first call returned `201`. `POST
    /v1/transactions` requires the header, because a duplicated transaction is a
    duplicated financial record.
  license:
    name: proprietary
    identifier: proprietary
  version: 0.1.0
servers: []
security: []
paths:
  /v1/platform/catalog/{code}:
    put:
      tags:
        - Platform
      summary: Handles `PUT /v1/platform/catalog/{code}`.
      description: |-
        # Errors

        `404` for an unknown code or no operator credential, `401` without the
        operator token, `422` for an empty update or one whose result does not
        validate, `503` when the store cannot be reached.
      operationId: platform_update_handler
      parameters:
        - name: code
          in: path
          description: Capability code, e.g. NG_PASSPORT
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CapabilityUpdate'
        required: true
      responses:
        '200':
          description: The entry as it now reads
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CapabilityBody'
        '401':
          description: Not the platform operator
        '404':
          description: No such capability, or no operator credential
        '422':
          description: The update is empty or its result does not validate
        '503':
          description: The catalog store could not be reached
      security:
        - platform_operator: []
components:
  schemas:
    CapabilityUpdate:
      type: object
      description: |-
        What an operator may change on an entry. Country and type are the code,
        and the code is what every flow and session points at, so neither moves.
      properties:
        capture:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CaptureRequirements'
              description: New capture rules.
        display_name:
          type:
            - string
            - 'null'
          description: A new display name.
        enabled:
          type:
            - boolean
            - 'null'
          description: Switch on or off.
        reader:
          $ref: '#/components/schemas/Patch_ReaderClass'
          description: A new reader, explicitly none, or - when absent - no change.
    CapabilityBody:
      type: object
      description: A catalog entry as the API shows it.
      required:
        - code
        - country
        - country_name
        - document_type
        - display_name
        - extraction_support
        - capture
        - enabled
        - revision
        - created_at
        - updated_at
      properties:
        capture:
          $ref: '#/components/schemas/CaptureRequirements'
          description: Capture rules.
        code:
          type: string
          description: Stable code, `{country}_{document type}`.
        country:
          type: string
          description: ISO-3166-1 alpha-2 issuing country.
        country_name:
          type: string
          description: >-
            The country's English short name, from the same table the capture
            page

            uses, so a console shows "Nigeria" without carrying its own list.
        created_at:
          type: string
          description: RFC 3339 creation time.
        display_name:
          type: string
          description: What a person is shown.
        document_type:
          $ref: '#/components/schemas/DocumentType'
          description: Document type.
        enabled:
          type: boolean
          description: Whether new flows may select it.
        extraction_support:
          $ref: '#/components/schemas/ExtractionSupport'
          description: |-
            `AUTOMATED` when a reader exists, otherwise `MANUAL_REVIEW`: the
            document is captured and its reading goes to a reviewer.
        reader:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ReaderClass'
              description: The reader that reads it, when one exists.
        revision:
          type: integer
          format: int32
          description: Change counter, from 1.
          minimum: 0
        updated_at:
          type: string
          description: RFC 3339 time of the last change.
    CaptureRequirements:
      type: object
      description: |-
        Capture rules a capability may set, from the ones the page and the route
        already implement. Nothing here invents a requirement the application
        cannot enforce.
      required:
        - document_number_required
      properties:
        document_number_required:
          type: boolean
          description: >-
            Whether the person must type their document number. The page
            compares

            the last four characters against what was read, so a document that
            is

            read wants it; a document with no number does not.
    Patch_ReaderClass:
      oneOf:
        - type: string
          description: 'Not mentioned: leave the current value.'
          enum:
            - Keep
        - type: string
          description: 'Mentioned as `null`: clear it.'
          enum:
            - Clear
        - type: object
          description: 'Mentioned with a value: set it.'
          required:
            - Set
          properties:
            Set:
              type: string
              description: >-
                The reader classes the inference service implements.


                These are the document classes `Gorgon-ML` reports and

                [`crate::document_reading`] accepts; a test holds the two lists
                together.

                Adding a class here without a reader behind it is exactly the
                dishonesty

                the catalog exists to prevent, so the list is closed and
                reviewed.
              enum:
                - NG_NIN_SLIP
                - TD3_MRZ
      description: >-
        A field of an update that tells "leave it" from "clear it" from "set
        it".


        A plain `Option` cannot say the second: absent and `null` both read as

        `None`. Absent is [`Patch::Keep`] (the `Default`), JSON `null` is

        [`Patch::Clear`], and a value is [`Patch::Set`].
    DocumentType:
      type: string
      description: Kind of identity document presented.
      enum:
        - PASSPORT
        - DRIVING_LICENCE
        - NATIONAL_ID
        - RESIDENCE_PERMIT
        - NIN_SLIP
        - OTHER
    ExtractionSupport:
      type: string
      description: What happens to a capability's document once it is captured.
      enum:
        - AUTOMATED
        - MANUAL_REVIEW
    ReaderClass:
      type: string
      description: >-
        The reader classes the inference service implements.


        These are the document classes `Gorgon-ML` reports and

        [`crate::document_reading`] accepts; a test holds the two lists
        together.

        Adding a class here without a reader behind it is exactly the dishonesty

        the catalog exists to prevent, so the list is closed and reviewed.
      enum:
        - NG_NIN_SLIP
        - TD3_MRZ
  securitySchemes:
    platform_operator:
      type: http
      scheme: bearer
      description: >-
        The platform operator's token, from `ESECTRA_PLATFORM_OPERATOR_TOKEN` on
        the API. Administers the global verification catalog; it is not a tenant
        key and opens no tenant route. Absent on a deployment that has not set
        it, in which case the platform routes answer 404.

````

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