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

# Get a customer

> Get an existing customer.



## OpenAPI

````yaml GET /v1/platform/businesses/{business_id}/customers/{customer_id}/
openapi: 3.0.3
info:
  title: Thredfi Accounting Platform API
  version: 1.0.0
  description: >-
    Comprehensive API for accounting, invoice management, open banking, and
    intelligence services.
servers: []
security: []
paths:
  /v1/platform/businesses/{business_id}/customers/{customer_id}/:
    get:
      tags:
        - Customers
      summary: Get a customer
      description: Get an existing customer.
      operationId: get_customer
      parameters:
        - in: path
          name: business_id
          schema:
            type: string
            format: uuid
          description: Business UUID provided by Thred (unique identifier for the business)
          required: true
        - in: path
          name: customer_id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this customer.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
          description: Validation errors in request data
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication required - missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Permission denied - insufficient privileges
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict - resource already exists or invalid state transition
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable entity - business logic validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      security:
        - PartnerJWT: []
        - BusinessScopedJWT: []
        - BasicAuth: []
        - BearerUnscoped: []
        - BearerBusinessScoped: []
components:
  schemas:
    Customer:
      type: object
      description: |-
        Main customer serializer for customer API endpoints
        Returns customer information with comprehensive details
        Used for both list and detail responses
      properties:
        type:
          type: string
          description: Type identifier (always 'CustomerData')
          readOnly: true
        id:
          type: string
          format: uuid
          readOnly: true
          description: Unique identifier for the customer
        external_id:
          type: string
          description: Your unique identifier for this customer (used for idempotency)
        reference_number:
          type: string
          description: Customer reference number for invoices and statements
        individual_name:
          type: string
          description: >-
            Individual/contact person name (required if company_name not
            provided)
        company_name:
          type: string
          description: Registered company name (required if individual_name not provided)
        display_name:
          type: string
          readOnly: true
          description: >-
            Display name for the customer (auto-generated from company_name or
            individual_name)
        email:
          type: string
          format: email
          description: Primary email address for the customer
        mobile_phone:
          type: string
          description: Mobile phone number
        office_phone:
          type: string
          description: Office/landline phone number
        address_line1:
          type: string
          description: Street address line 1
        address_line2:
          type: string
          description: Street address line 2 (building, suite, etc.)
        city:
          type: string
          description: City or town
        state_county:
          type: string
          description: State, county, or region
        postal_code:
          type: string
          description: Postal/ZIP code
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code
        full_address:
          type: string
          readOnly: true
          description: Complete formatted address with all fields
        address_string:
          type: string
          readOnly: true
          description: Single-line formatted address
        vat_number:
          type: string
          description: 'VAT registration number (for UK: GB followed by 9 digits)'
        tax_exempt:
          type: boolean
          description: Whether customer is exempt from tax/VAT
        status:
          type: string
          description: Customer status (ACTIVE or ARCHIVED)
          readOnly: true
        is_active:
          type: boolean
          readOnly: true
          description: Whether the customer is active (read-only)
        is_archived:
          type: boolean
          readOnly: true
          description: Whether the customer is archived (read-only)
        transaction_tags:
          type: array
          items: {}
          description: Array of tags for categorization and filtering
        notes:
          type: string
          description: Internal notes about the customer
        metadata:
          description: Custom JSON metadata for partner-specific data
        payment_terms_days:
          type: integer
          description: Number of days for payment terms (e.g., 30 for Net 30)
        credit_limit:
          type: integer
          description: Maximum credit limit in cents (e.g., 100000 for £1,000)
          readOnly: true
        credit_limit_cents:
          type: integer
          description: Maximum credit limit in cents (e.g., 100000 for £1,000)
        outstanding_balance:
          type: integer
          description: Current outstanding balance in cents (read-only, computed)
          readOnly: true
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentFileUrl'
          readOnly: true
          description: >-
            All documents linked to this customer with presigned URLs (retrieve
            only, not in list)
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: Date and time when the customer was created
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: Date and time when the customer was last updated
        archived_at:
          type: string
          format: date-time
          readOnly: true
          description: Date and time when the customer was archived (null if active)
      required:
        - address_line1
        - address_line2
        - address_string
        - archived_at
        - city
        - company_name
        - country
        - created_at
        - credit_limit
        - credit_limit_cents
        - display_name
        - documents
        - email
        - external_id
        - full_address
        - id
        - individual_name
        - is_active
        - is_archived
        - metadata
        - mobile_phone
        - notes
        - office_phone
        - outstanding_balance
        - payment_terms_days
        - postal_code
        - reference_number
        - state_county
        - status
        - tax_exempt
        - transaction_tags
        - type
        - updated_at
        - vat_number
    ValidationErrorResponse:
      type: object
      description: Validation error response with field-specific errors
      properties:
        error_code:
          type: string
          description: Error code (e.g., 'validation_error')
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Contains field_errors and additional context
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - detail
        - error_code
        - message
    ErrorResponse:
      type: object
      description: Standard error response format
      properties:
        error_code:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          nullable: true
          description: Human-readable error message
        detail:
          type: object
          additionalProperties: {}
          description: Additional error details including field_errors and debug info
        request_id:
          type: string
          description: Request ID for tracing
      required:
        - error_code
        - message
    DocumentFileUrl:
      type: object
      description: Serializer for document file URL with metadata.
      properties:
        url:
          type: string
          format: uri
          description: Presigned URL for document download
        expires_in:
          type: integer
          description: Seconds until URL expires
        document_id:
          type: string
          format: uuid
          description: Document UUID
        file_name:
          type: string
          description: Original document filename
        file_size:
          type: integer
          description: File size in bytes
        mime_type:
          type: string
          description: MIME type of the document
      required:
        - document_id
        - expires_in
        - file_name
        - file_size
        - mime_type
        - url
  securitySchemes:
    PartnerJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner-level JWT token (unscoped). Token payload includes `partner_id`.
        Business access is validated via partner ownership. Format: `Bearer
        <your-jwt-token>`


        **Use this for**: Multi-business operations where the business_id is
        specified in the URL and partner has access to multiple businesses.
    BusinessScopedJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT token. Token payload includes `business_id` to
        automatically scope requests. Format: `Bearer <your-jwt-token>`


        **Use this for**: Business-specific operations where the business
        context is embedded in the token.
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication for OAuth2 token endpoint. Use partner_uuid:api_key
        as username:password. Example: Authorization: Basic
        base64(partner_uuid:api_key)
    BearerUnscoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Partner (unscoped) JWT Bearer token. Obtain via POST
        /v1/platform/oauth2/token with Basic auth (partner_uuid:api_key). Use
        header: Authorization: Bearer {access_token}
    BearerBusinessScoped:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Business-scoped JWT Bearer token. Obtain via POST
        /v1/platform/{business_id}/oauth2/token/ using a partner Bearer token.
        Only valid for endpoints whose URL contains that business_id.

````