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

# Importar inscrições

> Idempotência por (evento, external_id) ou (evento, CPF) — ver
RegistrationImporter. Evento e prova vêm na URL (id|code).



## OpenAPI

````yaml /openapi.json post /events/{event}/races/{race}/registrations
openapi: 3.1.0
info:
  title: Eventor Management API v1
  version: 1.0.0
  description: >-
    Management API do Eventor (Fase 9) — configuração de evento ponta a ponta
    por agente/CLI. Autenticação: `Authorization: Bearer <api_key>` com escopo
    `manage`.


    Envelope de sucesso: `{data}` (item) e `{data,meta,links}` (coleção
    paginada).

    Envelope de erro: `{error,message,details}`.
servers:
  - url: http://localhost/api/v1
security:
  - bearerAuth: []
paths:
  /events/{event}/races/{race}/registrations:
    post:
      tags:
        - Registrations
      summary: Importar inscrições
      description: |-
        Idempotência por (evento, external_id) ou (evento, CPF) — ver
        RegistrationImporter. Evento e prova vêm na URL (id|code).
      operationId: registrations.store
      parameters:
        - name: event
          in: path
          required: true
          schema:
            type: string
        - name: race
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreRegistrationsRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: string
        '401':
          description: API key ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: A API key não tem o escopo `manage`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Recurso não encontrado neste hub.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: 'Conflito (ex.: dependência que impede a operação).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Falha de validação dos dados enviados.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    StoreRegistrationsRequest:
      type: object
      description: >-
        Ingest de inscrições via Management API —

        POST /api/v1/events/{event}/races/{race}/registrations.


        Evento e prova vêm na URL; o corpo é só o array de inscrições (até
        2000).
      properties:
        registrations:
          type: array
          items:
            type: object
            properties:
              external_id:
                type:
                  - string
                  - 'null'
                maxLength: 100
              name:
                type: string
                maxLength: 120
              document:
                type:
                  - string
                  - 'null'
                maxLength: 20
              email:
                type:
                  - string
                  - 'null'
                format: email
                maxLength: 150
              phone:
                type:
                  - string
                  - 'null'
                maxLength: 20
              birth_date:
                type:
                  - string
                  - 'null'
                format: date
              sex:
                type:
                  - string
                  - 'null'
                enum:
                  - M
                  - F
                  - O
              bib:
                type:
                  - string
                  - 'null'
                maxLength: 10
              category:
                type:
                  - string
                  - 'null'
                maxLength: 60
              modality:
                type:
                  - string
                  - 'null'
                maxLength: 80
              status:
                $ref: '#/components/schemas/RegistrationStatus'
              kit_picked_up:
                type:
                  - boolean
                  - 'null'
              kit_qr_payload:
                type:
                  - string
                  - 'null'
                maxLength: 255
              medrace_link:
                type:
                  - string
                  - 'null'
                format: uri
                maxLength: 255
              medrace_atestado_status:
                type:
                  - string
                  - 'null'
                enum:
                  - P
                  - A
                  - R
            required:
              - name
          minItems: 1
          maxItems: 2000
      required:
        - registrations
      title: StoreRegistrationsRequest
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: >-
            Código machine-parseable (ex.: validation_failed, forbidden_scope,
            not_found).
        message:
          type: string
          description: Mensagem legível (português).
        details:
          type:
            - object
            - 'null'
          description: 'Detalhes opcionais (ex.: erros de validação por campo).'
          additionalProperties: {}
      required:
        - error
        - message
      title: ApiError
    RegistrationStatus:
      type: string
      description: >
        Status da inscrição (desacoplado de pagamento — Fase 4). Confirmed =
        inscrição válida, corredor vai correr. Canceled  = desistência /
        cancelamento.  Nota: pagamento (estados "pending"/"refunded") foi adiado
        pra V2 junto da integração Pagar.me. A inscrição chega aqui via API
        externa e assume-se que o integrador só envia quando a inscrição está
        confirmada.
      enum:
        - confirmed
        - canceled
      title: RegistrationStatus
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        API key do hub com escopo `manage`. Header: `Authorization: Bearer
        <api_key>`.
      scheme: bearer

````