Admin APICustomers

Get Customer

Look up a customer by ID, email, phone number, or document ID

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

Test the API

Enter your Admin API key and a customer identifier, then select Send. The request is sent directly from your browser to the live Admin API.

GET
/customers/{customerId}

Authorization

BearerAuth
AuthorizationBearer <token>

API key from the Tiquo dashboard (Settings > Developer > Admin API)

In: header

Path Parameters

customerId*string

Customer number, email, phone, or document ID

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api.tiquo.app/api/v1/customers/string"
{
  "success": true,
  "data": {
    "id": "string",
    "customerNumber": "string",
    "firstName": "string",
    "lastName": "string",
    "displayName": "string",
    "title": "mr",
    "customTitle": "string",
    "nickname": "string",
    "emails": [
      {
        "address": "user@example.com",
        "isPrimary": true
      }
    ],
    "phones": [
      {
        "number": "string",
        "isPrimary": true
      }
    ],
    "profilePhoto": "string",
    "status": "active",
    "source": "string",
    "totalOrders": 0,
    "totalSpent": 0,
    "averageOrderValue": 0,
    "lifetimeValue": 0,
    "lastOrderDate": 0,
    "lastActivityDate": 0,
    "createdAt": 0,
    "updatedAt": 0,
    "marketingOptIn": true,
    "smsOptIn": true
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": "string",
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": "string",
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": "string",
  "timestamp": "2019-08-24T14:15:22Z"
}

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",
    "title": "mr",
    "nickname": "Johnny",
    "emails": [
      { "address": "john@example.com", "isPrimary": true }
    ],
    "phones": [
      { "number": "+15554567890", "isPrimary": true }
    ],
    "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
titlestring or nullTitle code: mr, mrs, ms, miss, mx, dr, prof, or other
customTitlestring or nullThe title text when title is other
nicknamestring or nullThe name the customer likes to be called
emailsarrayList of email objects with address (string) and isPrimary (boolean)
phonesarrayList of phone objects with number (string) and isPrimary (boolean)
profilePhotostring or nullURL to the customer's profile photo
statusstringOne of: active, inactive, banned
sourcestring or nullHow the customer was acquired (e.g. website, admin)
parametersarraySaved values with id, parameterId, value, and lastModified; use parameterId as the schema key
marketingOptInbooleanWhether the customer has opted in to email marketing
smsOptInbooleanWhether the customer has opted in to messaging communications delivered through SMS or WhatsApp, using their preferred messaging channel
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

marketingOptIn and smsOptIn are read-only response summaries. To edit them, use the parameters object on Update Customer. The saved value row's id is not the parameter schema ID; write using parameterId.

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. Please retry after the current window resets.",
  "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);
  const primaryEmail = data.data.emails.find(e => e.isPrimary)?.address;
  console.log(primaryEmail);
} 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"