Tiquo
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_here

Path Parameters

ParameterTypeRequiredDescription
customerIdstringYesA customer identifier. Accepts multiple formats (see below).

Supported Identifier Formats

You can look up customers using any of these formats:

FormatExampleDescription
Customer numberCUST-000001The human-readable customer ID assigned by Tiquo
Email addressjohn@example.comThe customer's primary email
Phone number+15554567890The customer's phone number (multiple formats supported)
Document IDk1234567890abcdefThe 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-7890 or +15554567890
  • Double zero prefix: 00 1 555 456 7890 or 0015554567890
  • No prefix: 1 555 456 7890 or 15554567890

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

FieldTypeDescription
idstringInternal document ID
customerNumberstringHuman-readable customer ID (e.g. CUST-000001)
firstNamestring or nullCustomer's first name
lastNamestring or nullCustomer's last name
displayNamestring or nullFull display name
emailstring or nullPrimary email address
phonestring or nullPrimary phone number
profilePhotostring or nullURL to the customer's profile photo
statusstringOne of: active, inactive, archived
sourcestring or nullHow the customer was acquired (e.g. website, manual)
marketingOptInbooleanWhether the customer has opted in to marketing emails
smsOptInbooleanWhether the customer has opted in to SMS messages
totalOrdersinteger or nullTotal number of orders placed
totalSpentnumber or nullTotal amount spent in the customer's currency
averageOrderValuenumber or nullAverage value per order
lastOrderDateinteger or nullUnix timestamp in milliseconds of the last order
lastActivityDateinteger or nullUnix timestamp in milliseconds of the last activity
lifetimeValuenumber or nullCustomer lifetime value
createdAtintegerUnix timestamp in milliseconds when the record was created
updatedAtintegerUnix 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"

On this page