API and AuthenticationClient API
List Enquiries
Retrieve the authenticated customer's enquiry history
List Enquiries
Returns a paginated list of enquiries submitted by the authenticated customer.
Endpoint
GET /enquiriesAuthentication
Requires a valid JWT access token.
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Number of enquiries to return (1 to 100) |
cursor | string | - | Enquiry ID to paginate from |
status | string | - | Filter by enquiry status |
Status Values
| Status | Description |
|---|---|
new | Enquiry has been submitted and not yet reviewed |
open | Enquiry is being looked at |
pending | Waiting for additional information or action |
resolved | Enquiry has been resolved |
closed | Enquiry is closed |
Example Request
curl -X GET "https://edge.tiquo.app/api/client/v1/enquiries?status=open&limit=10" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."Response
{
"success": true,
"data": {
"enquiries": [
{
"id": "enq_123",
"enquiryNumber": "ENQ-001234",
"type": "general",
"subject": "Question about services",
"message": "I have a question about your consultation packages.",
"category": "Sales",
"status": "resolved",
"priority": "medium",
"source": "website",
"responseCount": 2,
"createdAt": "2025-01-30T12:00:00Z",
"updatedAt": "2025-01-30T14:00:00Z",
"customerRole": "primary"
}
],
"hasMore": false
}
}Enquiry Object
| Field | Type | Description |
|---|---|---|
id | string | Enquiry document ID |
enquiryNumber | string | Human-readable enquiry number (e.g. ENQ-001234) |
type | string or null | Type of enquiry (e.g. general, support) |
subject | string or null | Subject line |
message | string or null | The enquiry message content |
category | string or null | Enquiry category (e.g. Sales, Support) |
status | string | Enquiry status (see values above) |
priority | string or null | One of: low, medium, high, urgent |
source | string or null | Where the enquiry came from (e.g. website, email) |
responseCount | integer or null | Number of responses to this enquiry |
createdAt | string | ISO 8601 timestamp when the enquiry was created |
updatedAt | string or null | ISO 8601 timestamp of the last update |
customerRole | string | The customer's role (e.g. primary) |
Pagination
When hasMore is true, pass the last enquiry's id as the cursor parameter to fetch the next page.
Errors
| Status | Description |
|---|---|
401 | Invalid or expired access token |
500 | Internal server error |
Code Examples
JavaScript
async function getEnquiries(accessToken, options = {}) {
const params = new URLSearchParams();
if (options.limit) params.set('limit', options.limit);
if (options.cursor) params.set('cursor', options.cursor);
if (options.status) params.set('status', options.status);
const response = await fetch(
`https://edge.tiquo.app/api/client/v1/enquiries?${params}`,
{
headers: { 'Authorization': `Bearer ${accessToken}` },
}
);
return response.json();
}
const result = await getEnquiries(token, { status: 'open' });
console.log(`You have ${result.data.enquiries.length} open enquiries`);