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

# Get a customer

> One customer by id. A customer of another entity, or a deleted one, is not found. Needs a key holding `customers:read`.



## OpenAPI

````yaml https://app.synthetic.ai/api/v1/openapi.json get /customers/{id}
openapi: 3.1.0
info:
  title: Synthetic API
  description: Read access to your Synthetic data.
  version: 0.1.0
servers:
  - url: https://app.synthetic.ai/api/v1
security: []
paths:
  /customers/{id}:
    get:
      tags:
        - Customers
      summary: Get a customer
      description: >-
        One customer by id. A customer of another entity, or a deleted one, is
        not found. Needs a key holding `customers:read`.
      operationId: customers-get
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            description: The customer id.
          required: true
          description: The customer id.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '400':
          description: Input validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: The record does not exist for your business.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: An unexpected error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - BearerAuth: []
components:
  schemas:
    Customer:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        name:
          type: string
        billingEmail:
          type: string
          description: >-
            The address invoices, payment receipts, payment reminders and
            autopay notices are sent to.
        invoiceCcEmails:
          type: array
          items:
            type: string
          description: >-
            Addresses copied on invoice, payment receipt, payment reminder and
            autopay notice emails.
        emailPaymentFollowUps:
          type: boolean
          description: >-
            Whether Synthetic emails this customer reminders about unpaid
            invoices.
        lastPaymentFollowUpAt:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            When Synthetic last started a reminder to this customer, whether or
            not the email went out; null if it never has.
        note:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            A note for the entity's own staff. It is never printed on an
            invoice.
        invoiceNote:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Text printed on this customer's invoices. An invoice copies it when
            issued and keeps that copy if this changes; an invoice issued while
            this was empty shows the current note.
        outstandingIssuedAmount:
          type: object
          propertyNames:
            type: string
            enum:
              - USD
              - CAD
              - EUR
              - USDC
          additionalProperties:
            type: object
            properties:
              value:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              currencyCode:
                type: string
                enum:
                  - USD
                  - CAD
                  - EUR
                  - USDC
            required:
              - value
              - currencyCode
            additionalProperties: false
          description: >-
            What the customer still owes on issued invoices: their totals less
            what payments with status POSTED have paid on them. Keyed by
            currency code, one money object per currency, in the currency of the
            contract each invoice bills; amounts in different currencies are
            never added together. A currency whose total is 0 is left out, so {}
            means nothing is owed. Each value is a whole number of the
            currency's smallest unit, so { "USD": { "value": 200000,
            "currencyCode": "USD" } } is $2,000.00.
        contractCount:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: How many contracts the customer has that are not deleted.
        contractValueAmount:
          type: object
          propertyNames:
            type: string
            enum:
              - USD
              - CAD
              - EUR
              - USDC
          additionalProperties:
            type: object
            properties:
              value:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              currencyCode:
                type: string
                enum:
                  - USD
                  - CAD
                  - EUR
                  - USDC
            required:
              - value
              - currencyCode
            additionalProperties: false
          description: >-
            The total of every invoice that is not voided on the customer's
            contracts that are not deleted, keyed by currency the same way.
        remainingToInvoiceAmount:
          type: object
          propertyNames:
            type: string
            enum:
              - USD
              - CAD
              - EUR
              - USDC
          additionalProperties:
            type: object
            properties:
              value:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              currencyCode:
                type: string
                enum:
                  - USD
                  - CAD
                  - EUR
                  - USDC
            required:
              - value
              - currencyCode
            additionalProperties: false
          description: >-
            The total of the invoices on those contracts that have not been
            issued yet, keyed by currency the same way.
        contractHealth:
          type: string
          enum:
            - RENEWAL_DUE
            - ENDING
            - HEALTHY
            - UPCOMING
            - NO_ACTIVE_CONTRACT
            - DRAFT_ONLY
            - NO_CONTRACTS
          description: >-
            The first of these states, in this order, that any of the customer's
            contracts is in. Each is read from the terms in force today, whose
            end can differ from the contract's end date while agreed terms that
            change it have not started. A contract is running when its terms are
            agreed and today is between its start date and the end of its terms
            in force. RENEWAL_DUE: running, does not renew automatically, has no
            agreed cancellation, is inside its renewal notice period, and the
            customer has no other agreed contract that begins on or after the
            end of its terms in force. ENDING: running, does not renew
            automatically, has no agreed cancellation and no renewal notice
            period, and its terms in force end within 30 days. HEALTHY: running.
            UPCOMING: agreed but not started. NO_ACTIVE_CONTRACT: ended or
            cancelled. DRAFT_ONLY: its terms are still being written.
            NO_CONTRACTS: the customer has no contract that is not deleted.
        coverageContractId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
          description: >-
            The contract contractHealth is read from; null when the customer has
            no contract that is not deleted.
        coverageContractStartAt:
          anyOf:
            - type: string
            - type: 'null'
          format: date-time
          description: >-
            The calendar date that contract starts, carried at UTC midnight;
            null when the customer has no contract that is not deleted. The time
            is not data.
        coverageContractEndAt:
          anyOf:
            - type: string
            - type: 'null'
          format: date-time
          description: >-
            The calendar date that contract ends, carried at UTC midnight: it
            covers the days before this date, not the date itself. Null when the
            customer has no contract that is not deleted. The time is not data.
        coverageContractAutoRenew:
          type: boolean
          description: >-
            Whether that contract renews automatically; false when the customer
            has no contract that is not deleted.
        coverageContractRenewed:
          type: boolean
          description: >-
            Whether the customer has another contract, not deleted, that renews
            that contract and whose terms are agreed and not cancelled or ended.
            False when the customer has no contract that is not deleted.
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
        - id
        - name
        - billingEmail
        - invoiceCcEmails
        - emailPaymentFollowUps
        - lastPaymentFollowUpAt
        - note
        - invoiceNote
        - outstandingIssuedAmount
        - contractCount
        - contractValueAmount
        - remainingToInvoiceAmount
        - contractHealth
        - coverageContractId
        - coverageContractStartAt
        - coverageContractEndAt
        - coverageContractAutoRenew
        - coverageContractRenewed
        - createdAt
        - updatedAt
      additionalProperties: false
      description: >-
        Someone the entity bills: who to send invoices to, and what their
        contracts and invoices add up to.
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Input validation failed
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Input validation failed error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Input validation failed
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Unauthorized
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Unauthorized error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Unauthorized
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: The record does not exist for your business.
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: The record does not exist for your business. error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: The record does not exist for your business.
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: An unexpected error occurred.
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: An unexpected error occurred. error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: An unexpected error occurred.
        issues: []
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'An API key created in Settings, sent as `Authorization: Bearer <key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.