> ## 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 customer

> Retrieve a customer by ID.



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json get /customers/{id}
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /customers/{id}:
    get:
      summary: Retrieve a customer
      description: Retrieve a customer by ID.
      operationId: get_customer_customers__id__get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the customer.
            title: Id
          description: The ID of the customer.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/IndividualCustomer'
                  - $ref: '#/components/schemas/JointCustomer'
                  - $ref: '#/components/schemas/BusinessCustomer'
                discriminator:
                  propertyName: customer_type
                  mapping:
                    individual:
                      $ref: '#/components/schemas/IndividualCustomer'
                    joint:
                      $ref: '#/components/schemas/JointCustomer'
                    business:
                      $ref: '#/components/schemas/BusinessCustomer'
                title: Response Get Customer Customers  Id  Get
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    IndividualCustomer:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
          description: A friendlier, shorter, customer-visible ID.
        status:
          allOf:
            - $ref: '#/components/schemas/CustomerStatus'
          description: The status of the customer (active, suspended, closing, closed).
        full_name:
          type: string
          title: Full Name
          description: The full name of the customer.
        onboarding:
          anyOf:
            - type: string
            - type: 'null'
          title: Onboarding
          description: The onboarding ID of the customer.
        mifid_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Mifid Category
          description: The MIFID category of the customer (retail, professional, etc.).
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
        risk_profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Profile
        risk_score:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Score
        referrer_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Referrer Code
        customer_type:
          const: individual
          title: Customer Type
          description: The type of customer.
        first_name:
          type: string
          title: First Name
          description: The first name of the customer.
        last_name:
          type: string
          title: Last Name
          description: The last name of the customer.
        date_of_birth:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Date Of Birth
        nationalities:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Nationalities
        passport_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Passport Number
        id_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Id Number
        tax_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Number
        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
        - reference
        - status
        - full_name
        - onboarding
        - mifid_category
        - address
        - phone_number
        - risk_profile
        - risk_score
        - referrer_code
        - customer_type
        - first_name
        - last_name
        - date_of_birth
        - nationalities
        - passport_number
        - id_number
        - tax_number
      title: IndividualCustomer
    JointCustomer:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
          description: A friendlier, shorter, customer-visible ID.
        status:
          allOf:
            - $ref: '#/components/schemas/CustomerStatus'
          description: The status of the customer (active, suspended, closing, closed).
        full_name:
          type: string
          title: Full Name
          description: The full name of the customer.
        onboarding:
          anyOf:
            - type: string
            - type: 'null'
          title: Onboarding
          description: The onboarding ID of the customer.
        mifid_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Mifid Category
          description: The MIFID category of the customer (retail, professional, etc.).
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
        risk_profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Profile
        risk_score:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Score
        referrer_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Referrer Code
        customer_type:
          const: joint
          title: Customer Type
          description: The type of customer.
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: The concatenated first names of the joint owners.
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: The concatenated last names of the joint owners.
        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
        - reference
        - status
        - full_name
        - onboarding
        - mifid_category
        - address
        - phone_number
        - risk_profile
        - risk_score
        - referrer_code
        - customer_type
        - first_name
        - last_name
      title: JointCustomer
    BusinessCustomer:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
          description: A friendlier, shorter, customer-visible ID.
        status:
          allOf:
            - $ref: '#/components/schemas/CustomerStatus'
          description: The status of the customer (active, suspended, closing, closed).
        full_name:
          type: string
          title: Full Name
          description: The full name of the customer.
        onboarding:
          anyOf:
            - type: string
            - type: 'null'
          title: Onboarding
          description: The onboarding ID of the customer.
        mifid_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Mifid Category
          description: The MIFID category of the customer (retail, professional, etc.).
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
        risk_profile:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Profile
        risk_score:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Score
        referrer_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Referrer Code
        customer_type:
          const: business
          title: Customer Type
          description: The type of customer.
        entity_name:
          type: string
          title: Entity Name
        entity_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Type
        lei_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Lei Code
        lei_code_expiry_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Lei Code Expiry Date
        operating_address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
        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
        - reference
        - status
        - full_name
        - onboarding
        - mifid_category
        - address
        - phone_number
        - risk_profile
        - risk_score
        - referrer_code
        - customer_type
        - entity_name
        - entity_type
        - lei_code
        - lei_code_expiry_date
        - operating_address
      title: BusinessCustomer
    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
    CustomerStatus:
      type: string
      enum:
        - active
        - suspended
        - closing
        - closed
      title: CustomerStatus
      properties: {}
    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
    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

````