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

# Retrieve a person

> Retrieve a person by ID.



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json get /persons/{id}
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /persons/{id}:
    get:
      summary: Retrieve a person
      description: Retrieve a person by ID.
      operationId: get_person_persons__id__get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the person.
            title: Id
          description: The ID of the person.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/NaturalPerson'
                  - $ref: '#/components/schemas/LegalPerson'
                discriminator:
                  propertyName: person_type
                  mapping:
                    natural:
                      $ref: '#/components/schemas/NaturalPerson'
                    legal:
                      $ref: '#/components/schemas/LegalPerson'
                title: Response Get Person Persons  Id  Get
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    NaturalPerson:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        person_type:
          const: natural
          title: Person Type
          description: The type of person.
        full_name:
          type: string
          title: Full Name
          description: >-
            The full name of the person (first name and last name for natural
            persons, entity name for legal persons).
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: >-
            The registered address (residential for natural persons, registered
            office for legal persons).
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
          description: The primary phone number of the person.
        first_name:
          type: string
          title: First Name
          description: The first name of the person.
        last_name:
          type: string
          title: Last Name
          description: The last name of the person.
        passport_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Passport Number
          description: The passport number of the person.
        id_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Id Number
          description: The national ID number of the person.
        tax_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Number
          description: The tax number of the person.
        nationalities:
          items:
            type: string
          type: array
          title: Nationalities
          description: The list of country codes for the person's nationalities.
        date_of_birth:
          type: string
          format: date
          title: Date Of Birth
          description: The date of birth of the person.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was created.
        modified_at:
          type: string
          format: date-time
          title: Modified At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was last modified.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - person_type
        - full_name
        - address
        - phone_number
        - first_name
        - last_name
        - passport_number
        - id_number
        - tax_number
        - nationalities
        - date_of_birth
      title: NaturalPerson
    LegalPerson:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        person_type:
          const: legal
          title: Person Type
          description: The type of person.
        full_name:
          type: string
          title: Full Name
          description: >-
            The full name of the person (first name and last name for natural
            persons, entity name for legal persons).
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: >-
            The registered address (residential for natural persons, registered
            office for legal persons).
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
          description: The primary phone number of the person.
        entity_name:
          type: string
          title: Entity Name
          description: The name of the legal entity.
        entity_type:
          anyOf:
            - $ref: '#/components/schemas/LegalEntityType'
            - type: 'null'
          description: The type of legal entity (e.g. limited_company, partnership, etc.).
        lei_code:
          type: string
          title: Lei Code
          description: The LEI code of the legal entity.
        lei_code_expiry_date:
          type: string
          format: date
          title: Lei Code Expiry Date
          description: The expiry date of the LEI code.
        operating_address:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: The operating address of the legal entity.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was created.
        modified_at:
          type: string
          format: date-time
          title: Modified At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was last modified.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - person_type
        - full_name
        - address
        - phone_number
        - entity_name
        - entity_type
        - lei_code
        - lei_code_expiry_date
        - operating_address
      title: LegalPerson
    Error:
      properties:
        detail:
          type: string
          title: Detail
          description: A human-readable description of the error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
        docs:
          title: Docs
          description: A URL to documentation about this error code.
          x-remove-null-from-type-union: true
          type: string
        context:
          title: Context
          description: An optional object for adding extra context to the error.
          x-remove-null-from-type-union: true
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
          type: object
        params:
          title: Params
          description: An optional list of params that failed validation.
          x-remove-null-from-type-union: true
          items:
            $ref: '#/components/schemas/InvalidParam'
          type: array
      type: object
      required:
        - detail
        - code
      title: Error
    Address:
      properties:
        line1:
          type: string
          title: Line1
          description: The first line of the address.
        line2:
          anyOf:
            - type: string
            - type: 'null'
          title: Line2
          description: The second line of the address.
        line3:
          anyOf:
            - type: string
            - type: 'null'
          title: Line3
          description: The third line of the address.
        district_county:
          anyOf:
            - type: string
            - type: 'null'
          title: District County
          description: The district or county of the address.
        city:
          type: string
          title: City
          description: The city of the address.
        postal_code:
          type: string
          title: Postal Code
          description: The postal code of the address.
        country_code:
          type: string
          title: Country Code
          description: The country code of the address.
      type: object
      required:
        - line1
        - line2
        - line3
        - district_county
        - city
        - postal_code
        - country_code
      title: Address
    LegalEntityType:
      type: string
      enum:
        - limited_company
        - partnership
        - sole_proprietorship
        - foundation
        - trust
        - cooperative
        - other
      title: LegalEntityType
      properties: {}
    InvalidParam:
      properties:
        path:
          items:
            anyOf:
              - type: integer
              - type: string
          type: array
          title: Path
          description: Path to the field name (or index if a list) that errored.
        detail:
          type: string
          title: Detail
          description: Human-readable detail for error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
      type: object
      required:
        - path
        - detail
        - code
      title: InvalidParam
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````