openapi: 3.0.1
security: []
info:
  title: Oneshot API
  version: 1.0.0
  description: >
    One-Shot API for single-use certificate electronic signatures. All endpoints
    are relative to the base path `/oneshot/api/v1`.


    For the public **testing environment** (sandbox URL, RAO token,
    prerequisites, and how to use the test Optimizer), see the **Get started**
    guide in the One-Shot documentation: [Get started with
    One-Shot](enterprise-documentation/get-started/get-started.md).
servers:
  - url: https://optimizer-developers.uanataca.com/oneshot/api/v1
    description: Public testing environment
tags:
  - name: Settings
    description: Endpoints to manage the service settings
  - name: Tokens
    description: Endpoints to manage the tokens
  - name: Requests
    description: Endpoints to manage the signature requests
  - name: Documents
    description: Endpoints to manage the documents
  - name: Images
    description: Endpoints to manage the images
  - name: Video ID
    description: Endpoints to manage the Video ID
paths:
  /api/v1/hello:
    get:
      tags:
        - Settings
      summary: Call Hello
      description: Checks if server is UP.
      operationId: call_hello_api_v1_hello_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                details: Hello from One-Shot
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
  /api/v1/version:
    get:
      tags:
        - Settings
      summary: Call Get Version
      description: Retrieves the current Optimizer version.
      operationId: call_get_version_api_v1_version_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                details:
                  version: xxx
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
  /api/v1/token:
    post:
      tags:
        - Tokens
      summary: Call Create Token
      description: >-
        Creates a new token that contains the Registration Authority Officer
        (RAO) credentials.
      operationId: call_create_token_api_v1_token_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateToken'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Token created
                details:
                  token_uid: 14185cd9-c6ec-30f4-9f59-a844a77bc234
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Environment xxx doesn't exist
                detail:
                  error_code: d47bc1acf7151230
                  error_message: Environment xxx doesn't exist
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                status: error
                message: Invalid RAO credentials
                details:
                  error_code: 1dbf554b582f5caf
                  error_message: Invalid RAO credentials
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema: {}
              examples:
                Token already created:
                  summary: Token already created
                  value:
                    status: error
                    message: Token for username xxx already exists
                    details:
                      error_code: d0c1e1262b1c73b4
                      error_message: Token for username xxx already exists
                Certificate expired:
                  summary: Certificate expired
                  value:
                    status: error
                    message: 'Cannot create token: Certificate expired'
                    details:
                      error_code: 1ec7ba6ace391c26
                      error_message: 'Cannot create token: Certificate expired'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              examples:
                Field Required:
                  summary: Field required
                  value:
                    status: error
                    message: Data validation error
                    details:
                      error_code: 09e736eb3db9f1ac
                      error_message: Invalid input fields
                      fields:
                        xxx: Field required
                Missing parameters:
                  summary: Missing parameters
                  value:
                    status: error
                    message: Cannot retrieve certificate for remote identity
                    details:
                      error_code: 09e736eb3db9f1ac
                      error_message: Cannot retrieve certificate for remote identity
                Invalid JSON:
                  summary: Invalid JSON
                  value:
                    status: error
                    message: Data validation error
                    details:
                      error_code: 82efa64d5c532e15
                      error_message: Invalid input fields
                      fields:
                        xxx: JSON decode error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Error occured while verifying SignCloud credentials
                details:
                  error_code: 95d85b9ac22592dd
                  error_message: Error occured while verifying SignCloud credentials
  /api/v1/token/{token_uid}:
    get:
      tags:
        - Tokens
      summary: Call Get Token
      description: >
        Retrieves the token associated credentials with the given unique
        identifier.

        The response gets a `true` or `false` value regarding if password and
        PIN parameters are associated to the token.
      operationId: call_get_token_api_v1_token__token_uid__get
      parameters:
        - name: token_uid
          in: path
          description: The token unique identifier
          required: true
          schema:
            title: Token Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                details:
                  username: '2626807'
                  password: 'true'
                  pin: 'true'
                  rao_id: '1182'
                  env: xxx
        '404':
          description: Not found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Token False not found
                details:
                  error_code: 1bf11df92bcefb91
                  error_message: Token False not found
        '405':
          description: Method Not allowed
          content:
            application/json:
              schema: {}
              example:
                details: Method Not Alllowed
    delete:
      tags:
        - Tokens
      summary: Call Delete Token
      description: Deletes the token with the specified unique identifier.
      operationId: call_delete_token_api_v1_token__token_uid__delete
      parameters:
        - name: token_uid
          in: path
          description: The token unique identifier
          required: true
          schema:
            title: Token Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: >-
                  Token 0112c943-87a3-4fdf-b12g-d95233e973b5 deleted
                  successfully
        '405':
          description: Method Not allowed
          content:
            application/json:
              schema: {}
              example:
                details: Method Not Alllowed
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Cannot delete token xxx
                detail:
                  error_code: 68116cf0cdc38f1c
                  error_message: Cannot delete token xxx
  /api/v1/tokens:
    get:
      tags:
        - Tokens
      summary: Call List Tokens
      description: Returns a list of all tokens available and their associated data.
      operationId: call_list_tokens_api_v1_tokens_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                detail:
                  6d1cae4d55be4cdf9cac50ee36f73406:
                    username: '9001800'
                    password: true
                    pin: true
                    rao_id: '1182'
                    env: xxx
        '405':
          description: Method Not allowed
          content:
            application/json:
              schema: {}
              example:
                details: Method Not Alllowed
  /api/v1/image:
    post:
      tags:
        - Images
      summary: Call Upload Image
      description: Uploads an image for using in a visual graphic signature.
      operationId: call_upload_image_api_v1_image_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UploadImage'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Image uploaded with uid '463156ce-d566-44d2-94e9-184d89632b98'
                details:
                  image_uid: 463156ce-d566-44d2-94e9-184d89632b98
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Images of type xxx are not supported
                detail:
                  error_code: 0cc65ceeb3bc392d
                  error_message: Images of type xxx are not supported
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              examples:
                Field required:
                  summary: Field Required
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: 41117e5a6fe99a22
                      error_message: Invalid input fields
                      fields:
                        image: Field required
                Invalid input field:
                  summary: Invalid input field
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: e40f1e86ff908e96
                      error_message: Invalid input fields
                      fields:
                        image: >-
                          Value error, Expected UploadFile, received: str (file
                          upload required)
  /api/v1/image/{image_uid}:
    get:
      tags:
        - Images
      summary: Call Get Image
      description: Retrieves a previously uploaded image.
      operationId: call_get_image_api_v1_image__image_uid__get
      parameters:
        - name: image_uid
          in: path
          description: The image unique identifier
          required: true
          schema:
            title: Image Uid
      responses:
        '200':
          description: Successful Response
          content:
            image/png:
              schema: {}
              example: The retrieved image in png format
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Image xxx not found on disk
                detail:
                  error_code: f95a1897e69e95d3
                  error_message: Image xxx not found on disk
        '405':
          description: Method Not allowed
          content:
            application/json:
              schema: {}
              example:
                details: Method Not Alllowed
    delete:
      tags:
        - Images
      summary: Call Delete Image
      description: Deletes a previously uploaded image.
      operationId: call_delete_image_api_v1_image__image_uid__delete
      parameters:
        - name: image_uid
          in: path
          description: The image unique identifier
          required: true
          schema:
            title: Image Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Image c4cb5944-463156ce-d566-44d2-94e9-184d89632b98 deleted
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Image xxx not found on disk
                detail:
                  error_code: 992f6c95e257d711
                  error_message: Image xxx not found on disk
        '405':
          description: Method Not allowed
          content:
            application/json:
              schema: {}
              example:
                details: Method Not Alllowed
  /api/v1/images:
    get:
      tags:
        - Images
      summary: Call Get Images
      description: Lists all uploaded images.
      operationId: call_list_images_api_v1_images_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                details:
                  aef3f74c-0f39-408f-8f54-657bd71d6d3a:
                    content_type: image/png
                    filename: xxx.png
                    digest: >-
                      ea9c05a7228cd8106a0bcedd8ce7952dee24455e6ebd1354a9a9d99023cbc5ed
                  93868edb-561d-4439-a56d-79f2a8c32087:
                    content_type: image/jpeg
                    filename: xxx.jpg
                    digest: >-
                      eff1343e1353940a23a199bb0ecda8f4bfbccc01f940c782326622851cb42c62
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
    delete:
      summary: Call Delete Images
      tags:
        - Images
      description: Deletes all uploaded images.
      operationId: call_delete_images_api_v1_images_delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: All Images deleted
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
  /api/v1/create:
    post:
      tags:
        - Requests
      summary: Call Create
      description: Creates a new digital signature request for the user identified.
      operationId: call_create_api_v1_create_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Request created with pk 123456
                details:
                  status: CREATED
                  asyncmode: xxx
                  pk: '123456'
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: >-
                  xxx is not a valid environment. Available environments are:
                  devel, sandbox, prod
                detail:
                  error_code: b2eecdca1d4fdc4a
                  error_message: >-
                    xxx is not a valid environment. Available environments are:
                    devel, sandbox, prod
        '403':
          description: Forbidden
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Invalid billing credentials
                detail:
                  error_code: 1cb421b11f48637b
                  error_message: Invalid billing credentials
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Invalid Request profile
                detail:
                  error_code: 14f1462944d1210e
                  error_message: Profile not found
        '412':
          description: Precondition failed (e.g. invalid email or request creation error)
          content:
            application/json:
              schema: {}
              examples:
                Invalid email:
                  summary: Invalid email
                  value:
                    status: error
                    message: Error occured while creation request
                    detail:
                      error_code: 247f7d86c7383d49
                      error_message:
                        email:
                          - Enter a valid email address.
                Invalid RAO credentials:
                  summary: Invalid RAO credentials
                  value:
                    status: error
                    message: Invalid RAO credentials
                    detail:
                      error_code: fb2dd7324a02b8d3
                      error_message: Invalid input fields
                      fields:
                        username: Input should be a valid string
                        password: Input should be a valid string
                        pin: Input should be a valid string
        '422':
          description: Validation error or invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              examples:
                Required parameter:
                  summary: Field required
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: decd5282139a23a7
                      error_message: Invalid input fields
                      fields:
                        xxx: Field required
                Missing parameter:
                  summary: Empty field
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: aecd5182139a23a9
                      error_message: Invalid input fields
                      fields:
                        xxx: Empty field
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Cannot retrieve Registration Authority settings
                detail:
                  error_code: e850520e93c5e96b
                  error_message: You do not have permission to perform this action.
  /api/v1/request/{request_pk}:
    get:
      tags:
        - Requests
      summary: Call Get Request
      description: >-
        Retrieve request information with the id obtained in the **CREATE
        REQUEST** response.
      operationId: call_get_request_api_v1_request__request_pk__get
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request to get
          required: true
          schema:
            type: integer
            title: The ID of the Request to get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                secrets:
                  puk: '70040984'
                  enrollment_code: bGxB86WR
                  pin: '58148177'
                  erc: '8239245862'
                request:
                  pk: 822543
                  given_name: Nombre
                  second_name: null
                  surname_1: Apellido1
                  surname_2: null
                  sex: null
                  id_document_type: IDC
                  id_document_country: ES
                  serial_number: 0000000T
                  country_name: ES
                  citizenship: null
                  residence: null
                  organization_email: null
                  email: name@domain.com
                  titile: null
                  organization_name: null
                  organizational_unit_1: null
                  organizational_unit_2: null
                  organization_identifier: null
                  responsible_name: null
                  responsible_second_name: null
                  responsible_first_surname: null
                  responsible_second_surname: null
                  responsible_email: null
                  responsible_serial: null
                  responsible_position: null
                  subscriber_responsible_serial: null
                  administrative_unit: null
                  empowerment: null
                  representation: null
                  circumstances: null
                  limit: null
                  registration: null
                  process_application: null
                  entity_owner: null
                  entity_owner_serial_number: null
                  description: null
                  certificate_set: []
                  profile: PFnubeAFCiudadano
                  scratchcard: '3389580'
                  status: ENROLLREADY
                  registering_user:
                    pk: 1168
                    permission_profile: 1
                    registration_authority: 3
                    request: 233342
                  approving_user:
                    pk: 1168
                    permission_profile: 1
                    registration_authority: 3
                    request: 233342
                  producing_user: null
                  registration_authority: 3
                  secure_element: 2
                  validity_time: 24h
                  smartcard_sn: null
                  citizen_tax_number: null
                  birth_date: null
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Request xxx not found
                detail:
                  error_code: d1475ee205936d1f
                  error_message: Request xxx not found
    delete:
      tags:
        - Requests
      summary: Call Delete Request
      description: Cancels the Video ID One-Shot Signature request
      operationId: call_delete_request_api_v1_request__request_pk__delete
      parameters:
        - name: request_pk
          in: path
          required: true
          description: The ID of the Request to delete
          schema:
            type: integer
            title: The ID of the Request to delete
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Request 822880 deleted
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Request xxx not found
                detail:
                  error_code: 621b1ca26033983d
                  error_message: Request xxx not found
    put:
      tags:
        - Requests
      summary: Call Update Request
      description: Updates a Video ID signature request.
      operationId: call_update_request_api_v1_request__request_pk__put
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request to update
          required: true
          schema:
            type: integer
            title: The ID of the Request to update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateReqObject_VID'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                pk: 926427,
                given_name: null
                second_name: null
                surname_1: null
                surname_2: null
                sex: null
                id_document_type: IDC
                id_document_country: ES
                serial_number: null
                country_name: ES
                citizenship: null
                residence: ES
                organization_email: null
                email: s.cordon@external.namirial.com
                title: null
                organization_name: null
                organizational_unit_1: null
                organizational_unit_2: null
                organization_identifier: null
                responsible_name: null
                responsible_second_name: null
                responsible_first_surname: null
                responsible_second_surname: null
                responsible_email": null
                esponsible_serial: null
                responsible_position: null
                subscriber_responsible_serial: null
                administrative_unit: null
                empowerment: null
                representation: null
                circumstances: null
                limit: null
                registration: null
                process_application: null
                entity_owner: null
                entity_owner_serial_number: null
                description: null
                certificate_set: []
                profile: PFnubeQBCRCiudadano
                scratchcard: '2677829'
                status: VIDEOPENDING
                registering_user:
                  pk: 1168
                  permission_profile: 1
                  registration_authority: 3
                  request: 233342
                approving_user: null
                producing_user: null
                registration_authority: 892
                secure_element: 2
                validity_time: '1'
                smartcard_sn: null
                citizen_tax_number: null
                birth_date: null
                birth_country: null
                birth_city: null
                birth_province: null
                birth_state: null
                birth_district: null
                birth_canton: null
                id_document_description: null
                id_document_issuer: null
                id_document_release: null
                id_document_expiry: null
                organization_rol: null
                professional_id_number: null
                mobile_phone_number: '+34640234526'
                fix_phone_number: null
                residence_address: test
                residence_city: test
                residence_province: null
                residence_postal_code: test
                residence_state: null
                residence_district: null
                residence_canton: null
                organization_tax_number: null
                organization_address: null
                organization_city: null
                organization_province: null
                organization_country: null
                organization_postal_code: null
                organization_state: null
                organization_url: null
                responsible_legal_level: null
                subscriber: null
                responsible_legal_documents: null
                special_conditions: null
                responsible_registry_data: null
                approving_rao: null
                producing_rao: null
                id_document_number: null
                id_responsible_document_type: null
                id_responsible_document_country: null
                id_responsible_document_number: null
                organizational_unit_3: null
                paperless_mode: false
                videoid_mode: true
                ext_recognition_data: null
                complement_number: null
                id_responsible_document_issuer: null
                provider_registration_number: null
                communication_language: ''
                identification_rao: null
                videoid_data:
                  pk: 16738
                  status: PENDING
                  provider: 1
                  videoid_link: ''
                  requests: 926427
                  refusal_reason: ''
                  refusal_details: null
                  data: {}
                  video_identifier: 688e1758cc0b4a7bbd7d5549353cd0ec
                  validation_services: {}
                  acceptance: {}
                  validation_operator: null
                  operation_urls:
                    videoid_error: null
                    videoid_success: null
                  esaw_requests_involved: false
                  external_onboarding_link: null
                  manual_external_validation: false
                enrollment_success_url: null
                configuration_data: {}
                external_profile: null
                responsible_citizenship: null
                responsible_city: null
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Invalid body format. Expected a json
                detail:
                  error_code: c8953da9b058f7d7
                  error_message: Invalid body format. Expected a json
        '403':
          description: Forbidden
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Error occured while updating Request xxx
                detail:
                  error_code: 0f246ba28ca2409e
                  error_message: Error occured while updating Request xxx
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Request xxx not found
                detail:
                  error_code: 621b1ca26033983d
                  error_message: Request xxx not found
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Error occured while updating Request xxx
                detail:
                  error_code: 8a3a8976df2a58e3
                  error_message:
                    xxx:
                      - This field is required
  /api/v1/document/{request_pk}:
    post:
      tags:
        - Documents
      summary: Call Upload Document
      description: Upload a document and associate it to a Request
      operationId: call_upload_document_api_v1_document__request_pk__post
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request to which associated the document
          required: true
          schema:
            type: integer
            title: The ID of the Request to which associated the document
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                detail:
                  name: file
                  uid: 604b889f-6b3a-4af7-a24a-b5e610e7f7c1
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              examples:
                Missing parameters:
                  summary: Missing parameters
                  value:
                    status: error
                    message: No documents uploaded, please check sent data
                    detail:
                      error_code: 23110f381c0e4382
                      error_message: No documents uploaded, please check sent data
                Document empty:
                  summary: Document empty
                  value:
                    status: error
                    message: Invalid document xxx. Document empty
                    detail:
                      error_code: 5ffa63fcf5d78095
                      error_message: Invalid document xxx. Document empty
                Unsupported document:
                  summary: Unsupported document
                  value:
                    status: error
                    message: Unsupported documents of type xxx
                    detail:
                      error_code: f594657c6bec4ad6
                      error_message: Unsupported documents of type xxx
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Request xxx not found on disk
                detail:
                  error_code: cd8f9ff25091a35e
                  error_message: Request xxx not found on disk
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Max number of documents reached for Request xxx
                detail:
                  error_code: 07ae4e0b5d95074d
                  error_message: Max number of documents reached for Request xxx
    delete:
      tags:
        - Documents
      summary: Call Delete Documents
      description: Delete all documents
      operationId: call_delete_documents_api_v1_document__request_pk___delete
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request to which the document is associated
          required: true
          schema:
            type: integer
            title: The ID of the Request to which the document is associated
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Documents deleted for Request xxx
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: No documents found for Request xxx
                detail:
                  error_code: aae003828973e3c1
                  error_message: No documents found for Request xxx
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema: {}
              example:
                detail: Method Not Allowed
  /api/v1/document/{request_pk}/{document_uid}:
    get:
      tags:
        - Documents
      summary: Call Get Document
      description: Retrieve a document associated to specific Request
      operationId: call_get_document_api_v1_document__request_pk___document_uid__get
      parameters:
        - name: request_pk
          in: path
          required: true
          description: The ID of the Request to which the document is associated
          schema:
            type: integer
            title: The ID of the Request to which the document is associated
        - name: document_uid
          in: path
          required: true
          schema:
            type: string
            title: Document Uid
        - name: document_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: original
            title: Document Type
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example: The retrieved image
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Document xxx not found on disk
                detail:
                  error_code: bc056a47e2d5f44f
                  error_message: >-
                    Document 604b889f-6b3a-4af7-a24a-b5e610e7f7c1 not found on
                    disk
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema: {}
              example:
                detail: Method Not Allowed
    delete:
      tags:
        - Documents
      summary: Call Delete Document
      description: Delete a document associated to a specific Request
      operationId: call_delete_document_api_v1_document__request_pk___document_uid__delete
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request to which the document is associated
          required: true
          schema:
            type: integer
            title: The ID of the Request to which the document is associated
        - name: document_uid
          in: path
          required: true
          description: The document unique identifier
          schema:
            type: string
            title: Document Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Document 604b889f-6b3a-4af7-a24a-b5e610e7f7c1 deleted
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Document xxx not found on disk
                detail:
                  error_code: 94c9466d1b25b514
                  error_message: Document xxx not found on disk
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema: {}
              example:
                detail: Method Not Allowed
  /api/v1/documents/{request_pk}:
    get:
      tags:
        - Documents
      summary: Call List Documents
      description: List of documents associated to a specific Request
      operationId: call_list_documents_api_v1_documents__request_pk__get
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request
          required: true
          schema:
            type: integer
            title: The ID of the Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                detail:
                  b40aa3a6-6e2b-421e-8759-5f7717b35b1a:
                    uploaded_at: '20250416133306'
                    digest: >-
                      0842f41ec0968541d1fe5c3b5268509c32979a2d91251990d5212969d099d12d
                    ext: .pdf
                    filename: sample.pdf
                    name_in_form: file
                    cleaned: false
        '404':
          description: Not Found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Request xxx not found on disk
                detail:
                  error_code: 7d07460e3ca5843c
                  error_message: Request xxx not found on disk
  /api/v1/contract/{request_pk}:
    get:
      tags:
        - Requests
      summary: Call Get Request Contract
      description: Get Request contract.
      operationId: call_get_request_contract_api_v1_contract__request_pk__get
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request
          required: true
          schema:
            type: integer
            title: The ID of the Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example: The retrieved contract in pdf format
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema: {}
              example:
                detail:
                  code: 412
                  id: ef8de3ccaf619021
                  error: Invalid request status
  /api/v1/otp/{request_pk}:
    post:
      tags:
        - Requests
      summary: Call Generate Otp
      description: >
        Generates a One-Time Password (OTP) code for the user. The OTP is sent
        directly to the user's mobile phone as an SMS message.


        > **This method is only required and available for requests using
        Uanataca SMS method**
      operationId: call_generate_otp_api_v1_otp__request_pk__post
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request to which generate the otp
          required: true
          schema:
            type: integer
            title: The ID of the Request to which generate the otp
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                delivery_method:
                  type: string
                  description: >-
                    Method selector to send the code. Default "sms" if field is
                    not included or not set in settings file.
                  enum:
                    - sms
                    - whatsapp
        required: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                detail: OTP successfully sent to xxx
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema: {}
              examples:
                Invalid request:
                  summary: Invalid request
                  value:
                    status: error
                    message: Error occured while generating OTP
                    detail:
                      error_code: d2ce38695913e178
                      error_message: Invalid request status
                Error generating OTP:
                  summary: Error generating OTP
                  value:
                    status: error
                    message: Error occured while generating OTP
                    detail:
                      error_code: 0e25de2d42f4263c
                      error_message: >-
                        Last OTP sent less than one minute ago! Please, try
                        again later.
  /api/v1/sign/{request_pk}:
    post:
      tags:
        - Requests
      summary: Call Sign
      description: Sign documents assigned to specific Request
      operationId: call_sign_api_v1_sign__request_pk__post
      parameters:
        - name: request_pk
          in: path
          description: The ID of the Request to which sign documents
          required: true
          schema:
            type: integer
            title: The ID of the Request to which sign documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignatureRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: Signature process for Request 825527 completed
                detail:
                  request: 825527
                  documents:
                    signed: '[ 9464aa4a-c386-4721-9167-9ea2335686d2 ]'
                    inerror: []
        '403':
          description: Forbidden (e.g. invalid confirmation code)
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: null
                detail:
                  error_code: d321c99c8dc57212
                  error_message: Confirmation Code invalid
        '404':
          description: Not found
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: >-
                  Image 0ecfc8b0-ff1f-4084-a2fe-13a7ebfba635 is not found or
                  invalid
                detail:
                  error_code: 7fe9894db607d429
                  error_message: >-
                    Image 0ecfc8b0-ff1f-4084-a2fe-13a7ebfba635 is not found or
                    invalid
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                Invalid input field:
                  summary: Invalid input field
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: 4675f0370d0f327a
                      error_message: Invalid input fields
                      fields:
                        secret: Field required
                Invalid JSON:
                  summary: Invalid JSON
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: dc768831f3412a27
                      error_message: Invalid input fields
                      fields:
                        xxx: JSON decode error
  /api/v1/videoid:
    post:
      tags:
        - Video ID
      summary: Call Create Videoid
      description: Create a VideoID
      operationId: call_create_videoid_api_v1_videoid_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReqObject_VID'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                messsage: VideoID created with pk 16673
                detail:
                  videoid_link: 16673
                  request_pk: 923056
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              examples:
                Invalid environment:
                  summary: Invalid environment
                  value:
                    status: error
                    message: >-
                      xxx is not a valid environment. Available environments
                      are: devel, sandbox, prod
                    detail:
                      error_code: dd869928d28b1df1
                      error_message: >-
                        xxx is not a valid environment. Available environments
                        are: devel, sandbox, prod
                Missing profile:
                  summary: Missing profile
                  value:
                    status: error
                    message: Missing required parameter profile
                    detail:
                      error_code: d820475f7d2e3fa9
                      error_message: Missing required parameter profile
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              examples:
                Field Required:
                  summary: Field required
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: 1e14d1bf3d8132f5
                      error_message: Invalid input fields
                      fields:
                        xxx: Field required
                Empty field:
                  summary: Empty field
                  value:
                    status: error
                    message: Data validation error
                    detail:
                      error_code: 058d58c11f882c39
                      error_message: Invalid input fields
                      fields:
                        xxx: Empty field
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: null
                detail:
                  error_code: f78cadb8dd4f5db5
                  error_message: You do not have permission to perform this action.
  /api/v1/videoid/{videoid_pk}/validate:
    post:
      tags:
        - Video ID
      summary: Call Validate Videoid
      description: Validate a VideoID
      operationId: call_validate_videoid_api_v1_videoid__videoid_pk__validate_post
      parameters:
        - name: videoid_pk
          in: path
          description: ID of the VideoID to validate
          required: true
          schema:
            type: integer
            title: ID of the VideoID to validate
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: VideoID validated
  /api/v1/videoid/{videoid_pk}/approve:
    post:
      tags:
        - Video ID
      summary: Call Approve Videoid
      description: Approve a VideoID
      operationId: call_approve_videoid_api_v1_videoid__videoid_pk__approve_post
      parameters:
        - name: videoid_pk
          in: path
          description: ID of the VideoID to approve
          required: true
          schema:
            type: integer
            title: ID of the VideoID to approve
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: VideoID approved
  /api/v1/videoid/{videoid_pk}/refuse:
    post:
      tags:
        - Video ID
      summary: Call Refuse Videoid
      description: Refuse a VideoID
      operationId: call_refuse_videoid_api_v1_videoid__videoid_pk__refuse_post
      parameters:
        - name: videoid_pk
          in: path
          description: ID of the VideoID to refuse
          required: true
          schema:
            type: integer
            title: ID of the VideoID to refuse
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefuseReqObject_VID'
        required: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/videoid/{videoid_pk}/evidences:
    post:
      tags:
        - Video ID
      summary: Call Upload Videoid Evidences
      description: Upload evidences for a VideoID
      operationId: call_upload_videoid_evidences_api_v1_videoid__videoid_pk__evidences_post
      parameters:
        - name: videoid_pk
          in: path
          description: ID of the VideoID to which upload evidences
          required: true
          schema:
            type: integer
            title: ID of the VideoID to which upload evidences
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadData_VID'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: VideoID evidences uploaded
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: Invalid body format. Expected a json
                detail:
                  error_code: 36edf424af570057
                  error_message: Invalid body format. Expected a json
        '412':
          description: Precondition Failed
          content:
            application/json:
              schema: {}
              example:
                status: error
                message: null
                detail:
                  error_code: 8f244db4c41581c9
                  error_message: Invalid VideoID status "VALIDATED"
  /api/v1/videoid/{videoid_pk}/video:
    post:
      tags:
        - Video ID
      summary: Call Upload Videoid Video
      description: Upload video for a VideoID
      operationId: call_upload_videoid_video_api_v1_videoid__videoid_pk__video_post
      parameters:
        - name: videoid_pk
          in: path
          description: ID of the VideoID to which upload a video
          required: true
          schema:
            type: integer
            title: ID of the VideoID to which upload a video
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - video
              properties:
                video:
                  type: string
                  description: The video to be uploaded
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                status: success
                message: VideoID video uploaded
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
              example:
                detail: Missing boundary in multipart.
    get:
      tags:
        - Video ID
      summary: Call Download Videoid Video
      description: Download VideoID video
      operationId: call_download_videoid_video_api_v1_videoid__videoid_pk__video_get
      parameters:
        - name: videoid_pk
          in: path
          description: ID of the VideoID of the video to download
          required: true
          schema:
            type: integer
            title: ID of the VideoID of the video to download
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
components:
  schemas:
    CreateRequest:
      required:
        - billing_password
        - billing_username
        - email
        - env
        - given_name
        - mobile_phone_number
        - password
        - pin
        - profile
        - registration_authority
        - serial_number
        - surname_1
        - token
        - username
        - id_document_type
        - id_document_country
      type: object
      properties:
        given_name:
          type: string
          description: The user's given name
        surname_1:
          type: string
          description: The user's first surname
        surname_2:
          type: string
          description: The user's second surname
        id_document_type:
          type: string
          description: |
            Document types allowed for the user identification:
              * **IDC** - Identification based on national identity card number. **Default when this field is not specified.**
              * **PAS** - Identification based on passport number
              * **PNO** - Identification based on national personal number (national civic registration number)
              * **TIN** - Tax Identification Number according to the European Commission
              * **CI** - Tax Identification Number according to the European Commission
              * **CE** - Tax Identification Number according to the European Commission
        id_document_country:
          type: string
          description: >-
            The user's id document country two-letters code (ISO 3166-1
            alpha-2).
        serial_number:
          type: string
          description: User's id document serial number
        email:
          type: string
          description: The user's email
        mobile_phone_number:
          type: string
          description: The user's mobile phone number including the international prefix
        registration_authority:
          type: string
          description: The Registration Authority id number.
        profile:
          type: string
          description: Digital certificate profiles
        token:
          type: string
          description: >
            The Registration Authority Officer (RAO)'s token unique id
            containing RAO's digital identity credentials.

            > **Not required when RAO's credentials (username, password, pin)
            are included as fields in this call.**
        username:
          type: string
          description: |
            The RAO's digital identity username.
            > **Not required when included in token** (Create Token endpoint).
        password:
          type: string
          description: |
            The RAO's digital identity password.
            > **Not required when included in token** (Create Token endpoint).
        pin:
          type: string
          description: |
            The RAO's digital identity PIN.
            > **Not required when included in token** (Create Token endpoint).
        document_front:
          description: >-
            Front side image of the user's identification document (JPEG or
            PNG).
          type: string
          format: binary
        document_rear:
          description: Rear side image of the user's identification document (JPEG or PNG)
          type: string
          format: binary
        document_owner:
          description: >-
            A selfie image of the user holding the identifying document below
            his/her chin (JPEG or PNG)
          type: string
          format: binary
        extra_document:
          description: An extra document to upload.
          type: string
          format: binary
        env:
          type: string
          description: |
            The API work environment.
            > **Required only if not set at settings.toml file.**
          enum:
            - sandbox
            - prod
        billing_username:
          type: string
          description: >-
            Billing account username. > **Required only if not set at
            settings.toml file.**
        billing_password:
          type: string
          format: base64
          description: |
            The client billing password in Base64 format.
            > **Required only if not set at settings.toml file.**
        useasync:
          type: boolean
          description: >-
            This parameter enables One-Shot asynchronous workflow. When set to
            true, the `callback` parameter can be set by specifying a Webhook
            URL.
        callback:
          type: string
          description: >-
            Webhook URL where the information of the asynchronous flow is going
            to be sent.
        communication_language:
          type: string
          description: >-
            Two letter code language for communications(ISO3166-1 alpha-2).
            Default ES
          enum:
            - ES
            - PL
            - EN
        residence:
          type: string
          description: '> **Required only in certain profiles**'
        residence_city:
          type: string
          description: '> **Required only in certain profiles**'
        residence_postal_code:
          type: string
          description: '> **Required only in certain profiles**'
        residence_address:
          type: string
          description: '> **Required only in certain profiles**'
        special_conditions:
          type: string
          description: '> **Required only in certain profiles**'
    UploadImage:
      properties:
        image:
          type: array
          description: The image to add in the visual graphic signature in PNG format
          format: string
          title: Image
      type: object
      required:
        - image
      title: Upload Image
    CounterSignatureParams:
      properties:
        appearance:
          $ref: '#/components/schemas/SignatureAppearance'
        username:
          type: string
          title: Username
          description: SignCloud account username
        password:
          type: string
          title: Password
          description: SignCloud account password
        pin:
          type: string
          title: Pin
          description: SignCloud account pin
        subfilter:
          type: string
          enum:
            - adbe.pkcs7.detached
            - ETSI.CAdES.detached
          title: Subfilter
      type: object
      required:
        - username
        - password
        - pin
      title: CounterSignatureParams
    CreateToken:
      properties:
        username:
          type: string
          title: Username
          description: The RAO's digital identity username
        password:
          type: string
          description: >-
            The RAO's digital identity password. If not included in this call,
            must be included in calls that require RAO's credentials
          title: Password
        pin:
          type: string
          description: >-
            The RAO's digital identity PIN. If not included in this call, must
            be included in calls that require RAO's credentials
          title: Pin
        env:
          type: string
          description: The API work environment. (sandbox / prod)
          title: Env
      type: object
      required:
        - username
      title: CreateToken
    DocumentSignatureOptions:
      properties:
        appearance:
          $ref: '#/components/schemas/SignatureAppearance'
        usecountersignature:
          type: boolean
          title: Usecountersignature
        metadata:
          type: string
          title: Metadata
        level:
          type: string
          title: Level
        subfilter:
          type: string
          enum:
            - adbe.pkcs7.detached
            - ETSI.CAdES.detached
          title: Subfilter
      type: object
      title: DocumentSignatureOptions
    FieldError:
      properties:
        input:
          items: {}
          type: array
          title: Input
        msg:
          type: string
          title: Msg
      type: object
      required:
        - input
        - msg
      title: FieldError
    UploadData_VID:
      type: object
      properties:
        acceptance:
          type: object
          properties:
            description:
              type: string
              description: Terms and Conditions descriptive text
            url-doc-privacypolicy:
              type: string
              description: Privacy policy document URL
            ip:
              type: string
              description: The local IP adress
            url-web-videoid:
              type: string
              description: Video ID platform access URL
            user-agent:
              type: string
              description: A user agent (e.g. web browser)
            date:
              type: string
              description: The current date
            url-doc-termsconditions:
              type: string
              description: Terms and conditions document URL
          description: |
            A set of acceptance parameters.
            > **⚠ Customizable object for external authentication.**
        videoid_data:
          type: object
          properties:
            images:
              type: object
              properties:
                document_front:
                  type: string
                  description: Base64 document front image
                document_rear:
                  type: string
                  description: Base64 document rear image
                document_photo:
                  type: string
                  description: Base64 document client picture (extracted from document)
                document_owner:
                  type: string
                  description: Base64 client selfie
              description: Document images
            ocr_data:
              required:
                - given_name
                - surname_1
                - serial_number
              type: object
              properties:
                given_name:
                  type: string
                  description: The user's given name
                surname_1:
                  type: string
                  description: The user's first surname
                surname_2:
                  type: string
                  description: The user's second surname
                mobile_phone_number:
                  type: string
                  description: The user's mobile phone number
                email:
                  type: string
                  description: The user's email
                serial_number:
                  type: string
                  description: The user's document serial number
                id_document_type:
                  type: string
                  description: |-
                    Document types allowed for user identification: 
                     - **IDC** - Identification based on national identity card number 
                     - **PAS** - Identification based on passport number 
                     - **PNO** - Identification based on national personal number (national civic registration number) 
                     - **TIN** - Tax Identification Number according to the European Commission
                  enum:
                    - IDC
                    - PAS
                    - PNO
                    - TIN
                id_document_country:
                  type: string
                  description: >-
                    The user's id document country two-letters code (ISO 3166-1
                    alpha-2)
              description: |
                Optical Character Recognition result.
                > **⚠ Customizable object for external authentication.**
            security_checks:
              type: object
              properties:
                otp_validation:
                  type: boolean
                  description: OTP code validation check
                documents_match:
                  type: boolean
                  description: Documents matching official registers check
                data_integrity:
                  type: boolean
                  description: Document data is not corrupted check
                document_notcopy:
                  type: boolean
                  description: Document is not a copy check
                document_notexpired:
                  type: boolean
                  description: Document is not expired check
                document_notunderage:
                  type: boolean
                  description: The user is not underage check
                liveliness:
                  type: boolean
                  description: The user is real check
              description: |
                Security checks related to document integrity.
                > **⚠ Customizable object for external authentication.**
            similarity_level:
              type: integer
              description: >-
                Level of similarity between document picture and face selfie.
                Ranges in [0,100].
          description: |
            Data to upload for Video ID.
            > **⚠ Customizable object for external authentication.**
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SignatureAppearance:
      properties:
        horizontal:
          type: boolean
          title: Horizontal
        text:
          items: {}
          type: array
          title: Text
          description: >-
            This property controls the text that is going to be introduced.
            Through variables you retrieve information from the signer
            certificate. '%(CN)', '%(SUBJECT)s', '%(DATE)s', '%(E)s' can be
            used.
        date:
          type: string
          title: Date
          description: >-
            Date formatting in dd/mm/YY-HH/MM/SS regex. An input example would
            be `%d/%m/%Y %H:%M:%S`
        timezone:
          type: string
          title: Timezone
          description: Selected timezone for the graphic signature. `Europe/Barcelona`
        position:
          type: string
          title: Position
          description: >-
            The coordinates in points (pt) for signature image position and
            size, starting from bottom left corner (x1,y1,x2,y2). 1px = 0.75pt.
        page:
          type: integer
          title: Page
          description: >-
            The document page where the signature will be placed. The first page
            starts at `0` and it's the default
        image:
          type: string
          title: Image
          description: The previously uploaded image id
        b64_image:
          type: string
          title: Image base 64
          description: The image in base64
        qrcode:
          type: string
          title: Image URL
          description: url used to build a qr
        text_size:
          type: integer
          title: Text Size
          description: Controls the text size.
        text_align:
          type: string
          title: Text Align
          description: Controls the horizontal alignment of text
        reason:
          type: string
          title: reason
          description: Reason about the signature
        location:
          type: string
          title: location
          description: Geographic location about the signature
      type: object
      title: SignatureAppearance
    SignatureParams:
      properties:
        appearance:
          $ref: '#/components/schemas/SignatureAppearance'
        disable_ltv:
          type: boolean
          title: Disable Ltv
        use_tsa:
          type: boolean
          title: Use Tsa
        metadata:
          type: string
          title: Metadata
        level:
          type: string
          title: Level
        subfilter:
          type: string
          enum:
            - adbe.pkcs7.detached
            - ETSI.CAdES.detached
          title: Subfilter
      type: object
      title: SignatureParams
    SignatureRequest:
      properties:
        secret:
          type: string
          description: |
            The OTP code sent to the user.
            For external authentication method, a customer code is provided.
          title: Secret
        ext_unlock_value:
          type: string
          description: >-
            The id of the external authentication request. This field is
            required for requests using external authenticacion methods.
          title: Ext Unlock Value
        ext_unlock_type:
          type: string
          description: >-
            The external authentication method type. This field is required for
            requests using external authenticacion methods.
          title: Ext Unlock Type
        signature:
          type: 'null'
          $ref: '#/components/schemas/SignatureParams'
        countersignature:
          $ref: '#/components/schemas/CounterSignatureParams'
          type: 'null'
        signature_by_doc:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/DocumentSignatureOptions'
              type: object
            - type: 'null'
          title: Signature By Doc
      type: object
      required:
        - secret
      title: SignatureRequest
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CreateReqObject_VID:
      required:
        - billing_password
        - billing_username
        - email
        - env
        - mobile_phone_number
        - profile
        - registration_authority
      type: object
      properties:
        mobile_phone_number:
          type: string
          description: The signer's mobile phone number
        email:
          type: string
          description: The signer's email
        registration_authority:
          type: string
          description: The Registration Authority ID number
        profile:
          type: string
          description: The certificate profile
        billing_username:
          type: string
          description: >-
            > **⚠ Required only if not set at settings.toml file.** See Update
            Settings endpoint.
        billing_password:
          type: string
          description: >-
            > **⚠ Required only if not set at settings.toml file.** See Update
            Settings endpoint.
        env:
          type: string
          description: >-
            > **⚠ Required only if not set at settings.ini file.** See Update
            Settings endpoint.
          enum:
            - sandbox
            - prod
    UpdateReqObject_VID:
      required:
        - country_name
        - email
        - profile
        - registration_authority
        - scratchcard
      type: object
      properties:
        scratchcard:
          type: string
          description: >-
            > **⚠ The scratchcard id can be found in the `details` object when
            calling Get Request.**
        given_name:
          type: string
          description: The signer's given name
        surname_1:
          type: string
          description: The signer's first surname
        surname_2:
          type: string
          description: The signer's second surname
        birth_date:
          type: string
          description: The signer's birth date
        email:
          type: string
          description: The signer's email
        mobile_phone_number:
          type: string
          description: The signer's mobile phone number
        serial_number:
          type: string
          description: The signer's document ID number
        registration_authority:
          type: string
          description: The Registration Authority id number
        profile:
          type: string
          description: The certificate profile
        country_name:
          type: string
          description: The user's id document country two-letters code (ISO 3166-1 alpha-2)
    RefuseReqObject_VID:
      required:
        - password
        - pin
        - reason
        - token
        - username
      type: object
      properties:
        token:
          type: string
          description: >
            The token containing RAO's credentials.

            > **⚠ Not required when RAO's credentials (username, password, pin)
            are included as fields in this call.**
        username:
          type: string
          description: '> **⚠ Not required when included in token** (Create Token endpoint).'
        password:
          type: string
          description: '> **⚠ Not required when included in token** (Create Token endpoint).'
        pin:
          type: string
          description: '> **⚠ Not required when included in token** (Create Token endpoint).'
        rao:
          type: string
          description: '> **⚠ Not required when included in token** (Create Token endpoint).'
        reason:
          type: string
          description: Reason that caused Video ID refusal
