Onfido Extractions API

The Extractions API from Onfido — 1 operation(s) for extractions.

OpenAPI Specification

onfido-extractions-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact:
    name: Onfido
    url: https://public.support.onfido.com
  description: "\nCreate trust at onboarding and beyond with a complete, AI-powered digital\nidentity solution built to help you know your customers online. \nAutomation allows you to acquire new customers and reduce costs while\nmeeting global KYC and AML compliance."
  license:
    name: MIT
  title: Onfido Extractions API
  version: v3.6
servers:
- url: https://api.{region}.onfido.com/v3.6
  variables:
    region:
      default: eu
      enum:
      - eu
      - us
      - ca
security:
- Token: []
tags:
- name: Extractions
paths:
  /extractions:
    post:
      description: 'Extract information from a document

        '
      operationId: extract
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/extract_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/extraction'
          description: Extraction result
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_1'
          description: Unprocessable Entity
      summary: Autofill
      tags:
      - Extractions
components:
  schemas:
    extraction_extracted_data:
      example:
        gender: Male
        date_of_birth: '2000-01-23T00:00:00.000Z'
        address_1: address_1
        address_2: address_2
        address_3: address_3
        address_4: address_4
        address_5: address_5
        widow_name: widow_name
        spouse_name: spouse_name
        issuing_country: issuing_country
        issuing_state: issuing_state
        first_name: first_name
        document_type: document_type
        document_number: document_number
        issuing_date: '2000-01-23T00:00:00.000Z'
        expiry_date: '2000-01-23T00:00:00.000Z'
        last_name: last_name
        alias_name: alias_name
        place_of_birth: place_of_birth
        full_name: full_name
        nationality: nationality
        mrz_line_1: mrz_line_1
        date_of_expiry: '2000-01-23T00:00:00.000Z'
        mrz_line_2: mrz_line_2
        mrz_line_3: mrz_line_3
        issuing_authority: issuing_authority
        personal_number: personal_number
      properties:
        document_number:
          description: The official document number.
          type: string
        first_name:
          description: First name.
          type: string
        last_name:
          description: Last name.
          type: string
        full_name:
          description: Full name.
          type: string
        spouse_name:
          description: Spouse name (French documents only).
          type: string
        widow_name:
          description: Widow name (French documents only).
          type: string
        alias_name:
          description: Alias name (French documents only).
          type: string
        gender:
          description: Gender (Valid values are Male and Female).
          enum:
          - Male
          - Female
          type: string
        date_of_birth:
          description: Date of birth in YYYY-MM-DD format.
          format: date
          type: string
        date_of_expiry:
          description: Date of expiry in YYYY-MM-DD format.
          format: date
          type: string
        expiry_date:
          description: Date of expiry in YYYY-MM-DD format.
          format: date
          type: string
        nationality:
          description: Nationality in 3-letter ISO code.
          pattern: ^[A-Z]{3}$
          type: string
        mrz_line_1:
          description: Line 1 of the MRZ code.
          type: string
        mrz_line_2:
          description: Line 2 of the MRZ code.
          type: string
        mrz_line_3:
          description: Line 3 of the MRZ code.
          type: string
        address_1:
          description: Line 1 of the address.
          type: string
        address_2:
          description: Line 2 of the address.
          type: string
        address_3:
          description: Line 3 of the address.
          type: string
        address_4:
          description: Line 4 of the address.
          type: string
        address_5:
          description: Line 5 of the address.
          type: string
        issuing_authority:
          description: Issuing authority.
          type: string
        issuing_country:
          allOf:
          - $ref: '#/components/schemas/country_codes'
          description: Document country in 3-letter ISO code.
          type: string
        document_type:
          allOf:
          - $ref: '#/components/schemas/document_types'
          description: Type of document.
          type: string
        place_of_birth:
          description: Place of birth.
          type: string
        issuing_state:
          description: The state that issued the document.
          type: string
        issuing_date:
          description: Issuing date in YYYY-MM-DD format.
          format: date
          type: string
        personal_number:
          description: The owner's unique identification number.
          type: string
      type: object
    country_codes:
      enum:
      - ABW
      - AFG
      - AGO
      - AIA
      - ALA
      - ALB
      - AND
      - ARE
      - ARG
      - ARM
      - ASM
      - ATA
      - ATF
      - ATG
      - AUS
      - AUT
      - AZE
      - BDI
      - BEL
      - BEN
      - BES
      - BFA
      - BGD
      - BGR
      - BHR
      - BHS
      - BIH
      - BLM
      - BLR
      - BLZ
      - BMU
      - BOL
      - BRA
      - BRB
      - BRN
      - BTN
      - BVT
      - BWA
      - CAF
      - CAN
      - CCK
      - CHE
      - CHL
      - CHN
      - CIV
      - CMR
      - COD
      - COG
      - COK
      - COL
      - COM
      - CPV
      - CRI
      - CUB
      - CUW
      - CXR
      - CYM
      - CYP
      - CZE
      - DEU
      - DJI
      - DMA
      - DNK
      - DOM
      - DZA
      - ECU
      - EGY
      - ERI
      - ESH
      - ESP
      - EST
      - ETH
      - FIN
      - FJI
      - FLK
      - FRA
      - FRO
      - FSM
      - GAB
      - GBR
      - GEO
      - GGY
      - GHA
      - GIB
      - GIN
      - GLP
      - GMB
      - GNB
      - GNQ
      - GRC
      - GRD
      - GRL
      - GTM
      - GUF
      - GUM
      - GUY
      - HKG
      - HMD
      - HND
      - HRV
      - HTI
      - HUN
      - IDN
      - IMN
      - IND
      - IOT
      - IRL
      - IRN
      - IRQ
      - ISL
      - ISR
      - ITA
      - JAM
      - JEY
      - JOR
      - JPN
      - KAZ
      - KEN
      - KGZ
      - KHM
      - KIR
      - KNA
      - KOR
      - KWT
      - LAO
      - LBN
      - LBR
      - LBY
      - LCA
      - LIE
      - LKA
      - LSO
      - LTU
      - LUX
      - LVA
      - MAC
      - MAF
      - MAR
      - MCO
      - MDA
      - MDG
      - MDV
      - MEX
      - MHL
      - MKD
      - MLI
      - MLT
      - MMR
      - MNE
      - MNG
      - MNP
      - MOZ
      - MRT
      - MSR
      - MTQ
      - MUS
      - MWI
      - MYS
      - MYT
      - NAM
      - NCL
      - NER
      - NFK
      - NGA
      - NIC
      - NIU
      - NLD
      - NOR
      - NPL
      - NRU
      - NZL
      - OMN
      - PAK
      - PAN
      - PCN
      - PER
      - PHL
      - PLW
      - PNG
      - POL
      - PRI
      - PRK
      - PRT
      - PRY
      - PSE
      - PYF
      - QAT
      - REU
      - RKS
      - ROU
      - RUS
      - RWA
      - SAU
      - SDN
      - SEN
      - SGP
      - SGS
      - SHN
      - SJM
      - SLB
      - SLE
      - SLV
      - SMR
      - SOM
      - SPM
      - SRB
      - SSD
      - STP
      - SUR
      - SVK
      - SVN
      - SWE
      - SWZ
      - SXM
      - SYC
      - SYR
      - TCA
      - TCD
      - TGO
      - THA
      - TJK
      - TKL
      - TKM
      - TLS
      - TON
      - TTO
      - TUN
      - TUR
      - TUV
      - TWN
      - TZA
      - UGA
      - UKR
      - UMI
      - URY
      - USA
      - UZB
      - VAT
      - VCT
      - VEN
      - VGB
      - VIR
      - VNM
      - VUT
      - WLF
      - WSM
      - YEM
      - ZAF
      - ZMB
      - ZWE
      type: string
    ErrorProperties_1:
      example:
        type: type
        message: message
      properties:
        type:
          type: string
        message:
          type: string
      title: ErrorProperties
      type: object
    extraction_document_classification:
      example:
        issuing_country: issuing_country
        subtype: full
        issuing_state: issuing_state
        version: version
        document_type: document_type
      properties:
        issuing_country:
          allOf:
          - $ref: '#/components/schemas/country_codes'
          description: Document country in 3-letter ISO code.
          type: string
        document_type:
          allOf:
          - $ref: '#/components/schemas/document_types'
          description: Type of document.
          type: string
        issuing_state:
          description: The state that issued the document (if available).
          type: string
        subtype:
          description: The document subtype (if available).
          enum:
          - full
          - not_full
          - provisional
          type: string
        version:
          description: The document issuing version (if available).
          type: string
      type: object
    Error_1:
      example:
        document_id: document_id
        error:
          type: type
          message: message
      properties:
        document_id:
          description: The unique identifier of the uploaded document
          type: string
        error:
          $ref: '#/components/schemas/ErrorProperties_1'
      title: Error
      type: object
    document_types:
      enum:
      - passport
      - driving_licence
      - national_identity_card
      - residence_permit
      - passport_card
      - tax_id
      - visa
      - voter_id
      - residence_status_document
      - postal_identity_card
      - social_security_card
      - work_permit
      - asylum_registration_card
      - national_health_insurance_card
      - municipality_identity_card
      - private_operators_card
      - proof_of_citizenship
      - service_id_card
      - immigration_status_document
      - indigenous_card
      - vehicle_registration_card
      - certificate_of_naturalisation
      - professional_qualification_card
      - consular_id
      - international_driving_licence
      - home_office_letter
      - birth_certificate
      - vehicle_registration_certificate
      - form_for_affixing_the_visa
      - identification_number_document
      - adoption_certificate
      - bank_building_society_statement
      - bank_statement
      - benefit_letters
      - cbt
      - certificate_of_sponsorship
      - character_reference
      - civil_partnership_certificate
      - council_tax
      - credit_card_statement
      - deed_poll
      - divorce_absolute_decree
      - educational_statement
      - electricity_bill
      - gas_bill
      - government_letter
      - internet_bill
      - marriage_certificate
      - motorcycle_insurance
      - national_insurance_card
      - naturalisation_certificate
      - non_uk_driving_licence
      - p45_p60
      - payslip
      - phone_bill
      - professional_identification_card
      - right_to_work_share_code_result
      - statement_fact
      - t4_student_university_term_dates_evidence
      - uk_biometric_residence_permit
      - uk_driving_licence
      - unknown
      - utility_bill
      - utility_bill_electric
      - utility_bill_gas
      - utility_bill_other
      - water_bill
      - address_certificate
      - general_letter
      - insurance_statement
      - pension_property_statement_letter
      - mortgage_statement
      - mobile_phone_bill
      - identity_document_with_address
      - exchange_house_statement
      - accommodation_tenancy_certificate
      type: string
    extract_request:
      properties:
        document_id:
          description: The unique identifier of the uploaded document to run extraction on
          format: uuid
          type: string
      required:
      - document_id
      type: object
    extraction:
      example:
        extracted_data:
          gender: Male
          date_of_birth: '2000-01-23T00:00:00.000Z'
          address_1: address_1
          address_2: address_2
          address_3: address_3
          address_4: address_4
          address_5: address_5
          widow_name: widow_name
          spouse_name: spouse_name
          issuing_country: issuing_country
          issuing_state: issuing_state
          first_name: first_name
          document_type: document_type
          document_number: document_number
          issuing_date: '2000-01-23T00:00:00.000Z'
          expiry_date: '2000-01-23T00:00:00.000Z'
          last_name: last_name
          alias_name: alias_name
          place_of_birth: place_of_birth
          full_name: full_name
          nationality: nationality
          mrz_line_1: mrz_line_1
          date_of_expiry: '2000-01-23T00:00:00.000Z'
          mrz_line_2: mrz_line_2
          mrz_line_3: mrz_line_3
          issuing_authority: issuing_authority
          personal_number: personal_number
        document_classification:
          issuing_country: issuing_country
          subtype: full
          issuing_state: issuing_state
          version: version
          document_type: document_type
        document_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
      properties:
        document_id:
          description: The unique identifier of the uploaded document.
          format: uuid
          type: string
        document_classification:
          $ref: '#/components/schemas/extraction_document_classification'
        extracted_data:
          $ref: '#/components/schemas/extraction_extracted_data'
      type: object
  securitySchemes:
    Token:
      in: header
      name: Authorization
      type: apiKey
externalDocs:
  url: https://documentation.onfido.com