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

# Get customer

> Get detailed information about a specific customer, including exemption certificates.

Retrieves detailed information about a specific customer.

## Path parameters

<ParamField path="id" type="string" required>
  The unique identifier for the customer
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique identifier for the customer
</ResponseField>

<ResponseField name="name" type="string">
  Customer name
</ResponseField>

<ResponseField name="email" type="string">
  Customer email address
</ResponseField>

<ResponseField name="corporation_id" type="string">
  The corporation ID this customer belongs to
</ResponseField>

<ResponseField name="created_at" type="int64">
  Unix timestamp of when the customer was created
</ResponseField>

<ResponseField name="source_platform_id" type="string">
  Source platform identifier (if applicable)
</ResponseField>

<ResponseField name="source_platform" type="string">
  Source platform name (if applicable)
</ResponseField>

<ResponseField name="business_identification_number" type="string">
  The customer's tax or business registration number, if provided
</ResponseField>

<ResponseField name="shipping_address" type="object">
  Customer's shipping address

  <Expandable title="shipping_address properties">
    <ResponseField name="line1" type="string">
      Street address line 1
    </ResponseField>

    <ResponseField name="line2" type="string">
      Street address line 2
    </ResponseField>

    <ResponseField name="city" type="string">
      City name
    </ResponseField>

    <ResponseField name="state" type="string">
      State or province code
    </ResponseField>

    <ResponseField name="postal_code" type="string">
      Postal or ZIP code
    </ResponseField>

    <ResponseField name="country" type="string">
      ISO 3166 2-letter country code
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="exemption_metadata" type="object">
  Exemption certificate information for the customer
</ResponseField>

<RequestExample>
  ```bash theme={null}
  GET /customers/cust_789
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "cust_789",
    "name": "Acme Corporation",
    "email": "contact@acme.com",
    "corporation_id": "corp_123",
    "created_at": 1706000000,
    "shipping_address": {
      "line1": "123 Main St",
      "line2": "Suite 100",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94105",
      "country": "US"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /customers/{id}
openapi: 3.0.1
info:
  title: Commenda Public APIs
  description: >-
    APIs for Commenda entity management, partner incorporation, indirect tax,
    compliance, and corporate operations.
  license:
    name: NONE
    url: NONE
  version: 1.0.0
servers:
  - url: https://api.prod.commenda.io/api/v1
    description: Commenda platform APIs, including Partner Incorporation and Commenda OS.
  - url: https://transaction-tax.api.in.commenda.io/api/v1
    description: Global Indirect Tax API.
security:
  - bearerAuth: []
paths:
  /customers/{id}:
    get:
      summary: Get customer
      description: >-
        Get detailed information about a specific customer, including exemption
        certificates.
      operationId: getCustomer
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The unique identifier of the customer to fetch.
      responses:
        '200':
          description: Detailed information about a specific customer
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CustomerExtended'
                  message:
                    type: string
                    example: Successfully fetched customer.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CustomerExtended:
      allOf:
        - $ref: '#/components/schemas/CustomerInfo'
        - type: object
          properties:
            exemption_metadata:
              $ref: '#/components/schemas/ExemptionMetadata'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: 'Specific Error type. Example: CLIENT_INVALID_REQUEST_BODY.'
              example: CLIENT_INVALID_REQUEST_BODY
            doc_url:
              type: string
              description: >-
                A link to the docs with details about this error. Example:
                https://sales-tax-docs.commenda.io/
              example: https://sales-tax-docs.commenda.io/
            title:
              type: string
              description: >-
                A short title describing the error. Example: Missing query
                parameters.
              example: Failed to validate the request body
            detail:
              type: string
              description: >-
                A json string with a description on how to fix the error.
                Example {"description":"Please pass in a valid corporation_id"}
            status:
              type: number
              description: >-
                The status code. It should be the same as the HTTP protocol
                status code. Example: 200
              example: 400
            instance:
              type: string
              description: >-
                The relative path that was hit by the user. Example:
                /api/v1/corporations/1
            Errors:
              type: array
              items:
                type: object
                properties:
                  details:
                    type: string
                    description: More details on how to solve this particular error.
                  pointer:
                    type: string
                    description: >-
                      Relative reference to missing or invalid piece of passed
                      information.
    CustomerInfo:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for this customer.
          example: b6d009b0-d174-463f-b030-94643c28e209
        corporation_id:
          type: string
          description: >-
            The unique identifier for the corporation associated with this
            customer.
          example: 2535af08-a139-4d0c-9827-1651e46dfbcf
        name:
          type: string
          description: A display name for this customer.
          example: John Doe
        email:
          type: string
          description: Email address of the customer.
          format: email
        shipping_address:
          $ref: '#/components/schemas/Address'
        external_id:
          type: string
          description: External identifier for the customer.
        business_identification_number:
          type: string
          description: >-
            Business identification number for the customer (e.g., tax ID, VAT
            number, or EIN).
    ExemptionMetadata:
      type: object
      properties:
        total_certificates:
          type: integer
          description: Total number of exemption certificates for this customer
        certificate_types:
          type: array
          items:
            type: string
          description: List of unique certificate types held by this customer
        total_exempted_states:
          type: integer
          description: Total number of states where the customer has exemptions
        expired_exemptions_count:
          type: integer
          description: Number of expired exemption certificates
        inactive_exemptions_count:
          type: integer
          description: Number of inactive exemption certificates
        exempted_states:
          type: array
          items:
            type: string
          description: List of states where the customer has exemptions
        active_exemptions_count:
          type: integer
          description: Number of active exemption certificates
        non_expired_exemptions_count:
          type: integer
          description: Number of non-expired exemption certificates
    Address:
      type: object
      required:
        - country
      description: >
        Address object. Only `country` is required at the schema level. All
        other field requirements (including `postal_code` and `state`) vary by
        country — use the `/address-requirements` endpoint to check which fields
        are REQUIRED, OPTIONAL, or IGNORED for a given country. When provided,
        postal codes and state codes are validated against country-specific
        formats and allowed values.
      properties:
        address_line_1:
          type: string
          example: 1776 Main St
          description: Primary street address. Required for some countries (e.g., US).
        address_line_2:
          type: string
          example: 'Apt. #123'
          description: >-
            Secondary address line (apartment, suite, etc.). Optional for most
            countries.
        address_line_3:
          type: string
          description: Tertiary address line. Ignored for most countries.
        postal_code:
          type: string
          description: >
            Postal or ZIP code. Required for many countries (e.g., US, GB, DE,
            FR) and optional for others (e.g., CA). Format varies by country.
            For US addresses, either 5-digit ZIP or 9-digit ZIP+4 is accepted.
            Use the `/address-requirements` endpoint to check whether this field
            is required and to get the validation regex for each country.
          example: '90401'
        city:
          type: string
          example: Santa Monica
          description: City name. Required for some countries (e.g., US).
        state:
          $ref: '#/components/schemas/State'
          description: >
            State or province code. Required for some countries (e.g., US) and
            optional for others (e.g., GB, DE). Must be a valid ISO 3166-2
            subdivision code for the given country when provided. Use the
            `/address-requirements` endpoint to check whether this field is
            required and to get the list of valid state codes for each country.
        country:
          $ref: '#/components/schemas/Country'
    State:
      type: string
      example: CA
      description: >-
        2-letter code for each state. Suffix of the ISO 3166-2 code. Ex: CA, NY,
        TX.
    Country:
      type: string
      example: US
      description: 'ISO 3166 2-letter country code. Ex: US, IN, GB.'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````