Use the intended application base URL
This reference covers authenticated Field Sales and HRM Team Approvals contracts reviewed on 28 November 2026. Use your tenant’s HTTPS application URL, not the public marketing website. Examples use placeholders and synthetic IDs; they do not authorise access.
Field Sales paths below start with /crm/mobile_field_sales/. Team Approvals paths start with /hrm/api/daily_team/. Keep each application prefix once. The legacy CRM connection object and signed website-integration headers are separate contracts.
Authentication and company scope
- Field Sales accepts an existing authenticated
Userkeyheader or its supported bearer token. The login endpoint remains available for the supported username/password flow and returns its own authentication result. - HRM Team Approvals uses the existing authenticated
Userkeyand HRM API subscription/company checks. Do not assume a Field Sales bearer token works here. - The server derives the current employee and tenant from authentication. Do not send a root/user ID to switch the scope of an authenticated request.
- Role access and company feature availability are checked separately from authentication.
GET https://YOUR-TENANT/hrm/api/daily_team/availability
Userkey: YOUR_EXISTING_USERKEY
GET https://YOUR-TENANT/crm/mobile_field_sales/settings
Authorization: Bearer YOUR_FIELD_SALES_TOKENStore and transmit keys securely. Never place a real key in public documentation, screenshots, source repositories or query-string examples.
Field Sales: discover the scheduling mode
| Method / relative path | Contract |
|---|---|
GET settings | Read settings.scheduling_mode and settings.customer_visit_cycles. |
GET dashboard | Review mode-aware due/overdue information alongside existing dashboard/attendance data. |
GET assigned_customers?q=&limit=50&offset=0 | In cycle mode, returns strictly owned customers and rows,total,limit,offset. The default route mode retains its existing list shape. |
GET due_customers?limit=50&offset=0 | Cycle mode only; active assigned customers due today or earlier, oldest first. Returns 409 when that mode is disabled. |
GET my_plan | Due cycle plans in cycle mode; ordinary plans otherwise. |
GET visit_list | Existing card shape with cycle fields where applicable. Completed customers leave the actionable cycle queue. |
GET plan_detail?plan_id=123 | Checks the current employee’s ownership and pending-plan eligibility. |
GET visit_detail?visit_id=456 | Read the permitted visit and handle correction/void states as read-only. |
Customer pages are capped at 200 records. Continue paging until the returned offset plus rows reaches total. Do not add pagination assumptions to endpoints that retain their existing non-paginated shape.
When optional customer navigation is enabled, destination data may be returned for a configured customer location. Treat a missing destination as unavailable; do not invent coordinates. Confirm the matching client’s Maps/Drive To behaviour on an actual supported device.
Start, complete and refresh a visit
In cycle mode, use the due response’s plan_id and valid coordinates to start. A customer ID is not a plan ID. Refresh after an assignment, interval, customer-status or policy change.
POST /crm/mobile_field_sales/start_visit
Content-Type: application/json
{"plan_id":123,"latitude":25.2048493,"longitude":55.2707828,"accuracy_meters":12}
POST /crm/mobile_field_sales/stop_visit
Content-Type: application/json
{"visit_id":456,"latitude":25.2048493,"longitude":55.2707828,"visit_outcome":"order_taken"}end_visit uses the same completion path as stop_visit. Preserve the returned state and refresh the actionable list. Retried completion must not advance a cycle twice; the current service can return already_completed.
A voided visit retains its evidence and correction history but cannot be checked out, edited or given more attachments. Plan deletion and visit voiding are authorised manager web actions, not destructive public mobile endpoints. Location-history/offline sync is separate from accepting historical offline visit-completion timestamps.
HRM Team Approvals endpoints
All paths below are relative to /hrm/api/daily_team/. Dates use YYYY-MM-DD. Use the configured company timezone returned by availability.
| Method / path | Fields and purpose |
|---|---|
GET availability | Returns feature visibility, can_review_team and, when available, timezone and default_date. |
GET context?date=2026-11-27 | Load the scoped board, policy revision, row source hashes and permitted review actions. |
POST confirm | date,revision,request_id,items[]; each item includes the scoped employee, current source hash, attendance/work values, remarks and explicit approval decisions. |
GET mine?date=2026-11-27 | Read the authenticated employee’s own review. |
POST reply | date,revision,note,request_id; submit the employee’s explanation. |
POST resolve | employee_id,date,revision,outcome,note,request_id,source_hash; authorised HR records an explained resolution. |
GET history?employee_id=123&date=2026-11-27 | Read permitted history; employee ID does not grant colleague access. |
Team review writes and stale evidence
Send JSON with Content-Type: application/json. A JSON string in the supported form payload field is also accepted. Use a fresh 32-character lowercase hexadecimal request_id per distinct logical action. Preserve it only when retrying that same action.
For confirmation, each item uses employee_id,source_hash,attendance,work,remarks,approval. Attendance choices are present,remote,field,reported_leave,not_present,needs_hr; work choices are reviewed,summary,not_required,needs_followup. Explicit approval.presence and approval.work use approve,reject,clarify and must agree with the selected attendance/work outcome. Use the current board’s eligibility and required explanation rules; a submitted enum alone does not make the decision valid.
Do not reuse an old row’s source_hash after attendance, leave or work evidence changes. On a stale response, reload context and ask the reviewer to review again. A batch accepts at most 250 checked employees.
HR resolution uses the exact upheld, overturned or returned outcome. It requires the current revision, source hash and a reason. An employee reply alone does not resolve the dispute, and none of these decisions directly rewrites payroll, attendance or approved leave.
Responses, errors and native-client acceptance
Field Sales generally returns its ok-based result and endpoint-specific fields. Team Approvals uses the HRM wrapper below. Parse the actual endpoint’s contract; do not assume the same envelope across the applications.
{"success":true,"message":"OK","data":{"enabled":true},"errors":[]}
{"success":false,"message":"Review unavailable. Refresh before retrying.","data":null,"errors":[]}- 401: missing/expired authentication; restore the intended session.
- 402: HRM subscription activation can be required by the existing API guard.
- 403: the company/role/record scope does not permit the action.
- 404: the feature or requested record is unavailable within the applicable scope.
- 405: use the endpoint’s required HTTP method.
- 409: a mode, revision, evidence or state conflict requires review/refresh. Field Sales start/completion failures may use their existing 400 result instead.
- 422: validation failure; correct fields before resubmitting.
- 503: a dependency or service is unavailable; retain the record reference and contact support.
Backend endpoints and responsive web pages do not prove the native app implements every screen. Test the actual app build, role, company mode, device navigation, correction state, pagination and refresh behaviour before rollout.