Overview
This article collects ready-to-use request examples for the TeamTrace API. For each endpoint you will find the URL, the headers and parameters it needs, a cURL example you can copy, and what to expect back. Use it as a quick reference when you build or test your integration.
Before You Begin
- You need a valid authorization token for every endpoint except the authorization endpoint itself. See How to Authenticate with the TeamTrace API.
- Replace placeholders such as YOUR_TOKEN, YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your own values. The IDs and dates in the examples are samples.
- All endpoints are on https://api-info.teamtrace.app.
- Make sure you can send HTTPS requests, for example with cURL, Postman or code in your own application.
Endpoints at a Glance
| API | Method | Path | What it returns |
| API Authorization | POST | /api/authorization | An authorization token for your application. |
| Customer List | GET | /api/v1/fetch-customer-list | A list of customers. |
| Customer Task List | POST | /api/v1/fetch-customer-task-list | The tasks of one customer. |
| User List | GET | /api/v1/user/list | A list of users. |
| Leave List | POST | /api/v1/company-leave/list | Employee leave records. |
| Employee Screenshot Fetch | POST | /api/v1/screenshot-fetch | An employee's screenshots for a date. |
| Detailed Timesheet | POST | /api/v1/worklog-summary/detailed-timesheet-report | Detailed timesheet entries for a date. |
| Field People Timesheet | POST | /api/v1/worklog-summary/field-people-timesheet | Timesheets and visits of field employees. |
Headers Used in Every Request
| Header | Used for | Value |
| x-client-id | The authorization request only. | Your Client ID. |
| x-client-secret | The authorization request only. | Your Client Secret. |
| authorization | Every other request. | Your authorization token. |
| Content-Type | Requests that send a JSON body. | application/json |
Example 1: Get an Authorization Token
Send your Client ID and Client Secret in the headers. No request body is needed.
curl -X POST "https://api-info.teamtrace.app/api/authorization" \ -H "x-client-id: YOUR_CLIENT_ID" \ -H "x-client-secret: YOUR_CLIENT_SECRET"
If the credentials are valid, the API returns a successful response, which typically includes an authorization token or confirmation. Use the token in the authorization header of the requests below.
Example 2: Fetch the Customer List
A GET request. The filters go in the URL.
| Parameter | Required | Description |
| customer_status | Yes | ACTIVE (current customers) or INACTIVE (past customers). |
| name | No | Search by customer name. |
| company_name | No | Search by company name. |
| limit | No | Results per page. A whole number of 1 or more. |
| page | No | Page number. A whole number of 1 or more. |
This request returns the first 10 current customers whose company name matches "Tech".
curl --request GET "https://api-info.teamtrace.app/api/v1/fetch-customer-list?customer_status=ACTIVE&company_name=Tech&page=1&limit=10" \ --header "authorization: YOUR_TOKEN"
Example 3: Fetch the Customer Task List
A POST request. Pagination goes in the URL, and the filters go in a JSON body.
| Where | Field | Required | Description |
| Body | uuid | Yes | The customer's UUID. It must be a valid UUID. |
| Body | task_name | No | Filter by task name. |
| Body | created_start_date | No | Tasks created on or after this date (YYYY-MM-DD). |
| Body | created_end_date | No | Tasks created on or before this date (YYYY-MM-DD). |
| URL | limit, page | No | Pagination. Whole numbers of 1 or more. |
curl --request POST "https://api-info.teamtrace.app/api/v1/fetch-customer-task-list?page=1&limit=10" \
--header "authorization: YOUR_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"task_name": "Development",
"created_start_date": "2026-04-01",
"created_end_date": "2026-04-30"
}'Example 4: Fetch the User List
A GET request. All parameters are optional. With no filters, the API returns all users.
| Parameter | Description |
| user_current_status | P for past users, C for current users, or empty for all users. |
| limit | Records per page. A whole number of 1 or more. |
| page | Page number. A whole number of 1 or more. |
This request returns the first 10 current users.
curl --request GET "https://api-info.teamtrace.app/api/v1/user/list?user_current_status=C&limit=10&page=1" \ --header "authorization: YOUR_TOKEN"
Example 5: Fetch the Leave List
A POST request. Pagination goes in the URL, and the optional filters go in a JSON body.
| Field | Required | Description |
| uuid | No | The employee ID. |
| apply_date | No | The date the leave was applied for (YYYY-MM-DD). |
| from_date | No | The leave start date (YYYY-MM-DD). |
| to_date | No | The leave end date (YYYY-MM-DD). |
| status | No | The leave status. See the values below. |
| Status value | Meaning |
| P | Pending |
| C | Completed |
| R | Rejected |
| CN | Cancelled |
| Empty or null | All statuses |
curl -X POST "https://api-info.teamtrace.app/api/v1/company-leave/list?limit=10&page=1" \
-H "authorization: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"uuid": "EMP123",
"apply_date": "2026-04-01",
"from_date": "2026-04-10",
"to_date": "2026-04-12",
"status": "P"
}'Example 6: Fetch an Employee's Screenshots
A POST request with a JSON body. Both fields are required.
| Field | Required | Description |
| date | Yes | The date, in YYYY-MM-DD format. |
| user_id | Yes | The employee's ID. It must be a valid UUID. |
curl --request POST \
--url https://api-info.teamtrace.app/api/v1/screenshot-fetch \
--header 'Content-Type: application/json' \
--header 'authorization: YOUR_AUTH_TOKEN' \
--data '{
"date": "2026-04-21",
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}'If there are no screenshots for that date, the list in the response is empty. This is not an error.
Example 7: Fetch the Detailed Timesheet
A POST request. page and limit are required in the URL, and the filters go in a JSON body.
| Where | Field | Required | Description |
| URL | page | Yes | Page number. A whole number of 1 or more. |
| URL | limit | Yes | Items per page. A whole number of 1 or more. |
| Body | date | Yes | The date, in YYYY-MM-DD format. |
| Body | user_id | No | Filter by one user. It must be a valid UUID. |
curl --request POST \
--url 'https://api-info.teamtrace.app/api/v1/worklog-summary/detailed-timesheet-report?page=1&limit=10' \
--header 'Content-Type: application/json' \
--header 'authorization: YOUR_AUTH_TOKEN' \
--data '{
"date": "2026-04-21",
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}'Example success response
{
"status": "success",
"page": 1,
"limit": 10,
"total": 45,
"data": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"date": "2026-04-21",
"total_hours": "07:30",
"entries": [
{
"start_time": "09:00",
"end_time": "11:30",
"duration": "02:30",
"activity": "Development"
}
]
}
]
}If there are no records, the response has "total": 0 and an empty data list. This is not an error.
Example 8: Fetch the Field People Timesheet
This request works like the Detailed Timesheet request. page and limit are required in the URL, and date is required in the body. The optional user_id filters by one field employee.
curl --request POST \
--url 'https://api-info.teamtrace.app/api/v1/worklog-summary/field-people-timesheet?page=1&limit=10' \
--header 'Content-Type: application/json' \
--header 'authorization: YOUR_AUTH_TOKEN' \
--data '{
"date": "2026-04-21",
"user_id": "123e4567-e89b-12d3-a456-426614174000"
}'Example success response
{
"status": "success",
"page": 1,
"limit": 10,
"total": 20,
"data": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Field Employee 1",
"date": "2026-04-21",
"total_hours": "06:45",
"visits": [
{
"location": "Client Site A",
"check_in": "09:00",
"check_out": "11:15",
"duration": "02:15"
}
]
}
]
}Common Error Responses
When a request fails, the API returns an error in this shape:
{
"status": "error",
"message": "Unauthorized",
"code": 401
}| Code | Message | What to do |
| 401 | Unauthorized | Check that the token is present and correct. Request a new token if it has expired. |
| 400 | Invalid date format. Use YYYY-MM-DD | Send the date as YYYY-MM-DD, for example 2026-04-21. |
| 400 | Invalid user_id | Send a valid UUID. |
| 400 | Page and limit must be integers ≥ 1 | Send page and limit as whole numbers of 1 or more. |
| 500 | Internal server error | Wait a moment and retry. If it keeps happening, contact TeamTrace support. |
Validate before you send
You can catch most 400 errors by checking your values in code first.
function isValidDate(date) {
return /^\d{4}-\d{2}-\d{2}$/.test(date);
}
function isUUID(id) {
return /^[0-9a-fA-F-]{36}$/.test(id);
}Retry on failures
If a request fails because of a network problem, you can retry it a few times before giving up.
async function fetchWithRetry(url, options, retries = 3) {
try {
const res = await fetch(url, options);
return res;
} catch (err) {
if (retries > 0) {
return fetchWithRetry(url, options, retries - 1);
}
throw err;
}
}Tips
- Start with the authorization request. Confirm you can get a token before you test anything else.
- Match the method. Customer List and User List use GET with filters in the URL. The others use POST with a JSON body.
- Use YYYY-MM-DD for every date. This format is required in every request that has a date.
- Look up IDs first. Fetch the customer list or user list to get the UUIDs the other requests need.
- Handle empty results. An empty list is a valid response, not an error.
- Keep your token and secret private. Never put them in front-end code or share them in public places.
Notes
- Requests with a JSON body need the Content-Type: application/json header.
- In the Customer List request, customer_status is required. In the Customer Task List request, uuid is required.
- In the timesheet requests, page and limit are required. In the other list requests, they are optional.
- If you don't send page and limit where they are optional, default values from the server may be used.
Troubleshooting
| Problem | What to check |
| I get 401 Unauthorized | Check that the authorization header is present and holds a valid token. Request a new token if it has expired. |
| I get an invalid date error | Use the YYYY-MM-DD format, for example 2026-04-21. |
| I get an invalid user_id error | Send a valid UUID. Get it from the user list. |
| I get a page and limit error | Send both as whole numbers of 1 or more, and put them in the URL, not in the body. |
| The Customer List request fails | Add customer_status with the value ACTIVE or INACTIVE. |
| The Customer Task List request fails | Add a valid customer uuid to the JSON body. |
| My POST request body is ignored | Add the Content-Type: application/json header and send valid JSON. |
| The response is empty | Check your filters and the date. An empty list means no records match. |
| I get a 500 error | Wait a moment and retry. If it keeps happening, contact TeamTrace support. |
Related Articles
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article