cURL
curl --request GET \ --url https://api.example.com/v1/customers/{id} \ --header 'Authorization: <authorization>'
{ "success": true, "data": {}, "id": "<string>", "firstName": "<string>", "lastName": "<string>", "email": "<string>", "phone": "<string>", "dateOfBirth": "<string>", "address": { "line1": "<string>", "line2": "<string>", "city": "<string>", "state": "<string>", "postalCode": "<string>", "country": "<string>" }, "loyaltyPoints": 123, "totalSpent": 123, "visitCount": 123, "tags": [ {} ], "notes": "<string>", "preferredLocationId": "<string>", "marketingConsent": true, "companyId": "<string>", "createdAt": "<string>", "updatedAt": "<string>", "lastVisit": "<string>" }
Retrieve a single customer by ID
GET /v1/customers/{id}
customers:read
cust_abc123
curl -X GET "https://api.tiquo.co/v1/customers/cust_abc123" \ -H "Authorization: Bearer sk_live_xxxxx"
{ "success": true, "data": { "id": "cust_abc123", "firstName": "John", "lastName": "Doe", "email": "[email protected]", "phone": "+1234567890", "dateOfBirth": "1990-05-15", "address": { "line1": "123 Main Street", "line2": "Apt 4B", "city": "New York", "state": "NY", "postalCode": "10001", "country": "US" }, "loyaltyPoints": 150, "totalSpent": 2500.00, "visitCount": 12, "tags": ["VIP", "frequent"], "notes": "Prefers morning appointments", "preferredLocationId": "loc_xyz789", "marketingConsent": true, "companyId": "comp_def456", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-20T14:00:00Z", "lastVisit": "2024-01-18T15:30:00Z" } }
Show address properties
401
403
404
{ "success": false, "error": { "code": "not_found", "message": "Customer not found" } }
const customerId = 'cust_abc123'; const response = await fetch(`https://api.tiquo.co/v1/customers/${customerId}`, { headers: { 'Authorization': `Bearer ${apiKey}` } }); const { data: customer } = await response.json(); console.log(customer.firstName, customer.lastName);