API and AuthenticationAdmin APICustomers
Get Customer
Look up a customer by ID, email, phone number, or document ID
Get Customer
Retrieve a customer record using any of the supported identifier formats.
Endpoint
GET /customers/{customerId}Authentication
Requires a valid Admin API key.
Authorization: Bearer your_api_key_herePath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customerId | string | Yes | A customer identifier. Accepts multiple formats (see below). |
Supported Identifier Formats
You can look up customers using any of these formats:
| Format | Example | Description |
|---|---|---|
| Customer number | CUST-000001 | The human-readable customer ID assigned by Tiquo |
| Email address | john@example.com | The customer's primary email |
| Phone number | +15554567890 | The customer's phone number (multiple formats supported) |
| Document ID | k1234567890abcdef | The internal Tiquo document ID |
Phone Number Format Support
The API normalizes phone numbers automatically, so you can pass them in any common format:
- International:
+1 (555) 456-7890or+15554567890 - Double zero prefix:
00 1 555 456 7890or0015554567890 - No prefix:
1 555 456 7890or15554567890
Spaces, dashes, parentheses, and dots are all handled automatically.
Example Request
curl -X GET "https://api.tiquo.app/api/v1/customers/CUST-000001" \
-H "Authorization: Bearer your_api_key_here"Response
{
"success": true,
"data": {
"id": "k1234567890abcdef",
"customerNumber": "CUST-000001",
"firstName": "John",
"lastName": "Doe",
"displayName": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"profilePhoto": "https://example.com/photo.jpg",
"status": "active",
"source": "website",
"marketingOptIn": true,
"smsOptIn": false,
"totalOrders": 15,
"totalSpent": 2450.50,
"averageOrderValue": 163.37,
"lastOrderDate": 1640995200000,
"lastActivityDate": 1640995200000,
"lifetimeValue": 2450.50,
"createdAt": 1640995200000,
"updatedAt": 1640995200000
},
"timestamp": "2025-01-15T10:30:00.000Z"
}Customer Object
| Field | Type | Description |
|---|---|---|
id | string | Internal document ID |
customerNumber | string | Human-readable customer ID (e.g. CUST-000001) |
firstName | string or null | Customer's first name |
lastName | string or null | Customer's last name |
displayName | string or null | Full display name |
email | string or null | Primary email address |
phone | string or null | Primary phone number |
profilePhoto | string or null | URL to the customer's profile photo |
status | string | One of: active, inactive, archived |
source | string or null | How the customer was acquired (e.g. website, manual) |
marketingOptIn | boolean | Whether the customer has opted in to marketing emails |
smsOptIn | boolean | Whether the customer has opted in to SMS messages |
totalOrders | integer or null | Total number of orders placed |
totalSpent | number or null | Total amount spent in the customer's currency |
averageOrderValue | number or null | Average value per order |
lastOrderDate | integer or null | Unix timestamp in milliseconds of the last order |
lastActivityDate | integer or null | Unix timestamp in milliseconds of the last activity |
lifetimeValue | number or null | Customer lifetime value |
createdAt | integer | Unix timestamp in milliseconds when the record was created |
updatedAt | integer | Unix timestamp in milliseconds of the last update |
Error Responses
400 Bad Request
{
"success": false,
"error": "Invalid customer identifier format",
"timestamp": "2025-01-15T10:30:00.000Z"
}401 Unauthorized
{
"success": false,
"error": "Missing or invalid API key",
"timestamp": "2025-01-15T10:30:00.000Z"
}404 Not Found
{
"success": false,
"error": "Customer not found with ID: CUST-999999",
"timestamp": "2025-01-15T10:30:00.000Z"
}429 Too Many Requests
{
"success": false,
"error": "Rate limit exceeded. Maximum 1,000 requests per hour.",
"timestamp": "2025-01-15T10:30:00.000Z"
}Code Examples
JavaScript
const response = await fetch(
'https://api.tiquo.app/api/v1/customers/CUST-000001',
{
headers: {
'Authorization': `Bearer ${apiKey}`,
},
}
);
const data = await response.json();
if (data.success) {
console.log(data.data.displayName);
console.log(data.data.email);
} else {
console.error(data.error);
}Python
import requests
response = requests.get(
'https://api.tiquo.app/api/v1/customers/CUST-000001',
headers={'Authorization': f'Bearer {api_key}'}
)
data = response.json()
if data['success']:
customer = data['data']
print(customer['displayName'])
else:
print(data['error'])Looking Up by Email
curl -X GET "https://api.tiquo.app/api/v1/customers/john@example.com" \
-H "Authorization: Bearer your_api_key_here"Looking Up by Phone
curl -X GET "https://api.tiquo.app/api/v1/customers/+15554567890" \
-H "Authorization: Bearer your_api_key_here"