Tiquo
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 /enquiries

Authentication

Requires a valid JWT access token.

Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...

Query Parameters

ParameterTypeDefaultDescription
limitinteger50Number of enquiries to return (1 to 100)
cursorstring-Enquiry ID to paginate from
statusstring-Filter by enquiry status

Status Values

StatusDescription
newEnquiry has been submitted and not yet reviewed
openEnquiry is being looked at
pendingWaiting for additional information or action
resolvedEnquiry has been resolved
closedEnquiry 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

FieldTypeDescription
idstringEnquiry document ID
enquiryNumberstringHuman-readable enquiry number (e.g. ENQ-001234)
typestring or nullType of enquiry (e.g. general, support)
subjectstring or nullSubject line
messagestring or nullThe enquiry message content
categorystring or nullEnquiry category (e.g. Sales, Support)
statusstringEnquiry status (see values above)
prioritystring or nullOne of: low, medium, high, urgent
sourcestring or nullWhere the enquiry came from (e.g. website, email)
responseCountinteger or nullNumber of responses to this enquiry
createdAtstringISO 8601 timestamp when the enquiry was created
updatedAtstring or nullISO 8601 timestamp of the last update
customerRolestringThe 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

StatusDescription
401Invalid or expired access token
500Internal 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`);

Sur cette page