# Retrieve a customer

Operation ID: `getCustomer`

Group: Accounting › Customers

[Open in the interactive reference](https://docs.api.lensing.ai/lensing/v1/endpoints/getCustomer)

`GET /accounting/customers/{id}`

Read-only: Reads and returns; changes nothing.

Retrieves a customer. Use the customer's id, not its customerNumber.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |
| `id` | path | string | yes | The unique identifier of the customer you want to retrieve. |

## Response

`200` Success

Under `data` (getCustomerOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The unique identifier for the customer. |
| `name` | string | yes | The name of the customer, as it appears on invoices. |
| `customerNumber` | string | yes | The customer number. Example: 'CUS-789012'. |
| `customerType` | string | no | The customer type. Possible values: 'default' (a direct customer), 'partner' (a reseller or third-party payer that is invoiced for its end customers), 'endCustomer' (a customer that buys through a partner). |
| `partnerType` | string | no | The partner type of a customer whose customerType is 'partner'. Possible values: 'reseller', 'thirdPartyPayer'. |
| `businessType` | string | no | The business type of the customer. Possible values: 'company', 'individual'. |
| `entityId` | string | yes | The legal entity that invoices this customer. |
| `entityName` | string | no | The name of the legal entity that invoices this customer. |
| `lastModifiedDate` | date-time | yes | The date and time the customer record last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. |
| `invoiceEmail` | string | no | The email address invoices are sent to. |
| `mainEmail` | string | no | The email address of the customer's main contact. |
| `taxExempt` | boolean | no | Whether the customer is exempt from tax. |
| `defaultCurrency` | string | no | The default currency for the customer's transactions, as a 3-letter ISO 4217 code. |
| `segment` | string | no | The market segment of the customer. Possible values: 'SMB', 'MidMarket', 'Enterprise'. Absent when businessType is 'individual'. |
| `paymentTermLabel` | string | no | The display name of the payment term applied to the customer's invoices. See label on GET accounting/payment-terms. |
| `exemptionNumber` | string | no | The tax-exemption certificate number. Absent when taxExempt is false. |
| `addresses` | array<object> | no | The customer's addresses, bill-to entries first, then sold-to. Each entry names its type and whether it is that type's default. An empty array when the customer has no address. |
| `addresses[].type` | string | yes | The address type. Possible values: 'billTo', 'soldTo'. |
| `addresses[].isDefault` | boolean | yes | Whether this is the customer's default address of its type. |
| `addresses[].addressId` | string | no | The unique identifier for the address. |
| `addresses[].attention` | string | no | The person or department that mail to this address is for. |
| `addresses[].line1` | string | no | The first address line: street number and name, or PO box. |
| `addresses[].line2` | string | no | The second address line: apartment, suite, unit, building, or floor. |
| `addresses[].city` | string | no | The city or locality. |
| `addresses[].stateProvince` | string | no | The state, province, or region. |
| `addresses[].country` | string | no | The country, as a name or ISO 3166-1 code. |
| `addresses[].zipCode` | string | no | The postal or ZIP code. |
| `taxExemptCode` | string | no | The tax-exemption reason code. |
| `salesChannel` | string | no | The sales channel for this customer. Possible values: 'salesAssisted' (sold through a salesperson), 'selfServe'. |
| `additionalContactEmail` | string | no | Another email address for the customer, besides invoiceEmail and mainEmail. |
| `mainContactName` | string | no | The name of the customer's main contact. |
| `preferredLanguage` | string | no | The customer's preferred language. Possible values: 'english'. |
| `crmCustomerId` | string | no | The customer's identifier in an external CRM system. |
| `businessIdentificationNumber` | string | no | The customer's business registration number. |
| `invoiceConsolidation` | string | no | How the customer's invoices are consolidated. Possible values: 'customer', 'purchaseOrderNumber', 'salesArrangement'. |
| `invoiceDeliveryMode` | string | no | How invoices are delivered to the customer. Possible values: 'manual', 'automated'. |
| `isExemptFromCreditCardFee` | boolean | no | Whether the customer is exempt from credit-card fees. |
| `billableTravelExpenseInvoiceDetail` | string | no | How billable travel and expense items appear on invoices. Possible values: 'detailed', 'consolidated'. |
| `status` | string | no | The status of the customer. Possible values: 'active', 'inactive'. |
| `paymentTerm` | string | no | The code of the payment term applied to the customer's invoices. See code on GET accounting/payment-terms. `paymentTermLabel` is its display name. |
| `taxRegistrations` | array<object> | no | The customer's tax registrations. An empty array when the customer has none. |
| `taxRegistrations[].country` | string | yes | The country the registration applies in, as an ISO 3166-1 code. |
| `taxRegistrations[].taxNumber` | string | yes | The tax identification number issued by the tax authority. |
| `taxRegistrations[].type` | string | yes | The kind of tax registration. Possible values: 'tax', 'salesTax', 'VAT', 'GST', 'EIN', 'TIN'. |
| `taxRegistrations[].effectiveDate` | string | no | The date the registration takes effect. Format YYYY-MM-DD. |
| `taxRegistrations[].isActive` | boolean | no | Whether the registration is active. Only one active registration is allowed per country and tax type. |
| `taxRegistrations[].note` | string | no | An internal note on the registration. |
| `taxRegistrations[].validationStatus` | string | no | The validation state the tax engine assigned. |
| `taxRegistrations[].validationMessages` | string | no | Detail behind the validation state, when the tax engine recorded any. |
| `payment` | object | no | The customer's link to a payment provider. Absent when no provider is linked. |
| `payment.provider` | string | no | The name of the payment provider. Example: 'Stripe'. |
| `payment.externalCustomerId` | string | no | The customer's identifier in the payment provider's system. |
| `payment.externalPaymentMethodId` | string | no | The customer's default payment method in the payment provider's system. |
| `externalIdentifiers` | array<object> | no | The customer's identifiers in other systems, one per configured field name. An empty array when the customer has none. |
| `externalIdentifiers[].fieldName` | string | yes | The configured field name of the identifier. Example: 'netsuiteCustomerId'. |
| `externalIdentifiers[].value` | string | yes | The identifier in the other system. |
| `externalIdentifiers[].externalUrl` | string | no | A link to the record in the other system. |

```json
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "<name>",
    "customerNumber": "<customerNumber>",
    "customerType": "<customerType>",
    "partnerType": "<partnerType>",
    "businessType": "<businessType>",
    "entityId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "entityName": "<entityName>",
    "lastModifiedDate": "2026-01-15T09:30:00.000Z",
    "invoiceEmail": "<invoiceEmail>",
    "mainEmail": "<mainEmail>",
    "taxExempt": true,
    "defaultCurrency": "<defaultCurrency>",
    "segment": "<segment>",
    "paymentTermLabel": "<paymentTermLabel>",
    "exemptionNumber": "<exemptionNumber>",
    "addresses": [
      {
        "type": "<type>",
        "isDefault": true,
        "addressId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "attention": "<attention>",
        "line1": "<line1>",
        "line2": "<line2>",
        "city": "<city>",
        "stateProvince": "<stateProvince>",
        "country": "<country>",
        "zipCode": "<zipCode>"
      }
    ],
    "taxExemptCode": "<taxExemptCode>",
    "salesChannel": "<salesChannel>",
    "additionalContactEmail": "<additionalContactEmail>",
    "mainContactName": "<mainContactName>",
    "preferredLanguage": "<preferredLanguage>",
    "crmCustomerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "businessIdentificationNumber": "<businessIdentificationNumber>",
    "invoiceConsolidation": "<invoiceConsolidation>",
    "invoiceDeliveryMode": "<invoiceDeliveryMode>",
    "isExemptFromCreditCardFee": true,
    "billableTravelExpenseInvoiceDetail": "<billableTravelExpenseInvoiceDetail>",
    "status": "<status>",
    "paymentTerm": "<paymentTerm>",
    "taxRegistrations": [
      {
        "country": "<country>",
        "taxNumber": "<taxNumber>",
        "type": "<type>",
        "effectiveDate": "<effectiveDate>",
        "isActive": true,
        "note": "<note>",
        "validationStatus": "<validationStatus>",
        "validationMessages": "<validationMessages>"
      }
    ],
    "payment": {
      "provider": "<provider>",
      "externalCustomerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "externalPaymentMethodId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    },
    "externalIdentifiers": [
      {
        "fieldName": "<fieldName>",
        "value": "<value>",
        "externalUrl": "<externalUrl>"
      }
    ]
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}
```

## Errors

| Code | Status |
| --- | --- |
| `NOT_FOUND` | 400 |

## Statuses

- `400` — Invalid request or business failure. Codes: NOT_FOUND
- `401` — The request carries no valid access token.
- `403` — Not authorized
- `404` — Not found
- `429` — Too many requests from this client address. The response has no body and no `Retry-After` header.
- `500` — Internal server error
