Get a customer
Retrieves one customer only when it belongs to both the authenticated account and the company in the path.
GET
/v1/companies/{company_id}/customers/{customer_id}Authorization
AuthorizationBearer token (JWT) · headerrequiredWorkOS AuthKit user, service, or agent access token
Path parameters
company_idstring<uuid>requiredcustomer_idstring<uuid>requiredResponses
200Customer
addressobjectrequiredShow propertiesHide properties
citystringrequiredmin length 1 · max length 120
country_codestringrequiredmatches ^[A-Z]{2}$
line_1stringrequiredmin length 1 · max length 200
line_2stringmax length 200
postal_codestringrequiredmin length 1 · max length 32
regionstringmax length 120
archived_atstring<date-time> | nullrequiredcompany_idstring<uuid>requiredcreated_atstring<date-time>requiredemailstring<email>external_referencestringmin length 1 · max length 255
idstring<uuid>requiredidentifiersobject[]max items 20 · default: []
Show propertiesHide properties
Array of
objectcountry_codestringmatches ^[A-Z]{2}$
schemestringrequiredmatches ^[a-z][a-z0-9._-]{0,63}$
valuestringrequiredmin length 1 · max length 200
namestringrequiredmin length 1 · max length 200
updated_atstring<date-time>requiredversionintegerrequired401Authentication failed
errorobjectrequiredShow propertiesHide properties
codestringrequireddetailsobject[]Show propertiesHide properties
Array of
objectmessagestringrequiredpathstringrequiredmessagestringrequiredrequest_idstringrequired403Permission denied
errorobjectrequiredShow propertiesHide properties
codestringrequireddetailsobject[]Show propertiesHide properties
Array of
objectmessagestringrequiredpathstringrequiredmessagestringrequiredrequest_idstringrequired404Resource not found
errorobjectrequiredShow propertiesHide properties
codestringrequireddetailsobject[]Show propertiesHide properties
Array of
objectmessagestringrequiredpathstringrequiredmessagestringrequiredrequest_idstringrequired422Request validation failed
errorobjectrequiredShow propertiesHide properties
codestringrequireddetailsobject[]Show propertiesHide properties
Array of
objectmessagestringrequiredpathstringrequiredmessagestringrequiredrequest_idstringrequired500Unexpected server error
errorobjectrequiredShow propertiesHide properties
codestringrequireddetailsobject[]Show propertiesHide properties
Array of
objectmessagestringrequiredpathstringrequiredmessagestringrequiredrequest_idstringrequiredRequest
curl -X GET "/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"address": {
"city": "string",
"country_code": "string",
"line_1": "string",
"line_2": "string",
"postal_code": "string",
"region": "string"
},
"archived_at": "2019-08-24T14:15:22Z",
"company_id": "b2e6a1c3-1a5e-44ae-a8fd-81f76fd715cf",
"created_at": "2019-08-24T14:15:22Z",
"email": "user@example.com",
"external_reference": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"identifiers": [],
"name": "string",
"updated_at": "2019-08-24T14:15:22Z",
"version": 0
}{
"error": {
"code": "string",
"details": [
{
"message": "string",
"path": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"message": "string",
"path": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"message": "string",
"path": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"message": "string",
"path": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"message": "string",
"path": "string"
}
],
"message": "string",
"request_id": "string"
}
}