Tiquo
API and AuthenticationAdmin APICustomers

List Customers

Retrieve a paginated list of customers with optional filters including parameter-based filtering

List Customers

Returns a paginated list of customers. Supports full-text search, status filtering, and filtering by customer parameters.

Endpoint

GET /customers

Authentication

Requires a valid Admin API key.

Authorization: Bearer your_api_key_here

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoPage size (1–100, default 50)
cursorstringNoPagination cursor from a previous response
searchstringNoFull-text search across name, email, phone, and customer number. Cannot be combined with parameterId or parameterName.
statusstringNoFilter by status: active, inactive, or banned
parameterIdstringNoFilter to customers that have this parameter set. Use the system parameter ID (e.g. system_marketing_opt_in) or the schema document ID for custom parameters. Cannot be combined with search.
parameterNamestringNoFilter by parameter name (e.g. Marketing Opt-In). Alternative to parameterId. Cannot be combined with search.
parameterValuestringNoWhen combined with parameterId or parameterName, only return customers whose parameter matches this exact value.

System Parameter IDs

These are the built-in system parameter IDs you can use with parameterId:

Parameter IDNameType
system_marketing_opt_inMarketing Opt-Inboolean ("true" / "false")
system_sms_opt_inSMS Opt-Inboolean ("true" / "false")
system_date_of_birthDate of Birthdate
system_sourceSourceselect
system_campaignCampaigntext
system_mediumMediumselect
system_browserBrowsermultiselect
system_deviceDevicemultiselect
system_locationLocationselect
system_languageLanguageselect

For custom parameters defined in your organization, use the parameter's schema document ID or pass the parameter name via parameterName.

Example Requests

Basic list with pagination

curl "https://api.tiquo.app/api/v1/customers?limit=25&status=active" \
  -H "Authorization: Bearer your_api_key_here"
curl "https://api.tiquo.app/api/v1/customers?search=john" \
  -H "Authorization: Bearer your_api_key_here"

Filter by parameter name

curl "https://api.tiquo.app/api/v1/customers?parameterName=Marketing+Opt-In&parameterValue=true" \
  -H "Authorization: Bearer your_api_key_here"

Filter by parameter ID

curl "https://api.tiquo.app/api/v1/customers?parameterId=system_marketing_opt_in&parameterValue=true" \
  -H "Authorization: Bearer your_api_key_here"

Filter by custom parameter

curl "https://api.tiquo.app/api/v1/customers?parameterName=Loyalty+Tier&parameterValue=Gold" \
  -H "Authorization: Bearer your_api_key_here"

Paginating through results

# First page
curl "https://api.tiquo.app/api/v1/customers?limit=10" \
  -H "Authorization: Bearer your_api_key_here"

# Next page (using cursor from previous response)
curl "https://api.tiquo.app/api/v1/customers?limit=10&cursor=abc123..." \
  -H "Authorization: Bearer your_api_key_here"

Response

{
  "success": true,
  "data": [
    {
      "id": "k1234567890abcdef",
      "customerNumber": "CUST-000001",
      "firstName": "John",
      "lastName": "Doe",
      "displayName": "John Doe",
      "emails": [
        { "address": "john@example.com", "isPrimary": true }
      ],
      "phones": [
        { "number": "+15554567890", "isPrimary": true }
      ],
      "profilePhoto": "https://example.com/photo.jpg",
      "status": "active",
      "source": "website",
      "totalOrders": 15,
      "totalSpent": 2450.50,
      "averageOrderValue": 163.37,
      "lifetimeValue": 2450.50,
      "lastOrderDate": 1640995200000,
      "lastActivityDate": 1640995200000,
      "createdAt": 1640995200000,
      "updatedAt": 1640995200000
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "abc123...",
    "pageSize": 25
  },
  "timestamp": "2025-01-15T10:30:00.000Z"
}

When filtering by parameter, each customer also includes a parameterValue field:

{
  "success": true,
  "data": [
    {
      "id": "k1234567890abcdef",
      "customerNumber": "CUST-000001",
      "firstName": "John",
      "lastName": "Doe",
      "displayName": "John Doe",
      "emails": [
        { "address": "john@example.com", "isPrimary": true }
      ],
      "phones": [
        { "number": "+15554567890", "isPrimary": true }
      ],
      "status": "active",
      "source": "website",
      "totalOrders": 15,
      "totalSpent": 2450.50,
      "averageOrderValue": 163.37,
      "lifetimeValue": 2450.50,
      "createdAt": 1640995200000,
      "updatedAt": 1640995200000,
      "parameterValue": "true"
    }
  ],
  "pagination": {
    "hasMore": false,
    "nextCursor": null,
    "pageSize": 25
  },
  "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
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)
totalOrdersinteger or nullTotal number of orders placed
totalSpentnumber or nullTotal amount spent
averageOrderValuenumber or nullAverage value per order
lifetimeValuenumber or nullCustomer lifetime value
lastOrderDateinteger or nullUnix timestamp (ms) of the last order
lastActivityDateinteger or nullUnix timestamp (ms) of the last activity
createdAtintegerUnix timestamp (ms) when the record was created
updatedAtintegerUnix timestamp (ms) of the last update
parameterValuestring or undefinedOnly present when filtering by parameter. The matched parameter's value for this customer.

Pagination Object

FieldTypeDescription
hasMorebooleanWhether more results are available
nextCursorstring or nullCursor to pass in the next request to get the next page
pageSizeintegerThe page size used for this request

Error Responses

400 Bad Request

Returned when search is combined with parameter filters:

{
  "success": false,
  "error": "The 'search' parameter cannot be combined with parameter filters (parameterId/parameterName)",
  "timestamp": "2025-01-15T10:30:00.000Z"
}

401 Unauthorized

{
  "success": false,
  "error": "Missing or invalid API key",
  "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 baseUrl = 'https://api.tiquo.app/api/v1';
const headers = { 'Authorization': `Bearer ${apiKey}` };

// List all active customers
const response = await fetch(
  `${baseUrl}/customers?status=active&limit=50`,
  { headers }
);
const data = await response.json();
console.log(`Found ${data.data.length} customers`);

// Filter by parameter
const marketingResponse = await fetch(
  `${baseUrl}/customers?parameterName=Marketing+Opt-In&parameterValue=true`,
  { headers }
);
const marketingData = await marketingResponse.json();
console.log(`${marketingData.data.length} marketing opt-in customers`);

// Paginate through all results
let cursor = null;
let allCustomers = [];

do {
  const url = new URL(`${baseUrl}/customers`);
  url.searchParams.set('limit', '100');
  if (cursor) url.searchParams.set('cursor', cursor);

  const res = await fetch(url, { headers });
  const page = await res.json();

  allCustomers = allCustomers.concat(page.data);
  cursor = page.pagination.nextCursor;
} while (cursor);

console.log(`Total: ${allCustomers.length} customers`);

Python

import requests

base_url = 'https://api.tiquo.app/api/v1'
headers = {'Authorization': f'Bearer {api_key}'}

# List active customers
response = requests.get(
    f'{base_url}/customers',
    headers=headers,
    params={'status': 'active', 'limit': 50}
)
data = response.json()
print(f"Found {len(data['data'])} customers")

# Filter by parameter
response = requests.get(
    f'{base_url}/customers',
    headers=headers,
    params={
        'parameterName': 'Marketing Opt-In',
        'parameterValue': 'true'
    }
)
data = response.json()
print(f"{len(data['data'])} marketing opt-in customers")

# Paginate through all results
all_customers = []
cursor = None

while True:
    params = {'limit': 100}
    if cursor:
        params['cursor'] = cursor

    response = requests.get(
        f'{base_url}/customers',
        headers=headers,
        params=params
    )
    page = response.json()
    all_customers.extend(page['data'])

    if not page['pagination']['hasMore']:
        break
    cursor = page['pagination']['nextCursor']

print(f"Total: {len(all_customers)} customers")

Sur cette page