Integration API reference
Methods, resource paths, row selectors and sample requests for TRAK’s accounting, payroll, ERP, Asset Pre-Start notification and location integrations.
Which address to use
TRAK makes outbound requests to the destination named in each section. Configure accounting and ERP connections under Administration → Import, Export & Integrations → Connections. Asset Pre-Start notifications and site geocoding use their own settings. Each provider path below is relative to its service root. The following examples use illustrative records.
TRAK’s tenant /api/ proxy is disabled. It returns HTTP 404 with reason PUBLIC_API_PROXY_DISABLED. TRAK currently offers file imports and exports for exchanging its own work orders, inventory, users, inspections and reference data. Application login and permissions apply to those workflows.
Import, preview and export company records · Configure a connection
Select records and fields
The ERP sample reader sends GET. Select a feature in Connections, save it and test the connection. Read sample requests records for that feature. The mapping pairs each TRAK target with a source field name or dotted path. For example, map a customer name to displayName in Business Central or name in Dataverse.
Selecting fields happens during mapping. The adapter sends $top for OData samples and reads the fields present in each returned row. No TRAK connector exposes an HTTP SELECT method, free-form SQL or an arbitrary OData $select field editor. The documented Xero filters operate on specific business references.
TRAK accepts 1–200 records per API sample and checks that every sampled external ID is present and unique. It flags a possible next page when it sees a provider continuation or reaches the limit. Selecting a sample fetches one page. Review and approve the mapping before importing its records.
Xero Accounting
Service root https://api.xero.com/api.xro/2.0. Use Connect Xero and choose the intended organisation. The connector sends an OAuth bearer token and the organisation’s xero-tenant-id. Its accounting consent covers offline access, settings, contacts, invoices, payments and attachments as needed. Reauthorise in Connections if a required scope is missing.
| Method and resource | When TRAK uses it |
|---|---|
GET /Organisation | Read Organisation Read the selected organisation and currency to check the connection. |
GET /Contacts | Read Contacts Look up a contact by name or page. Use its ContactID for matching. Query parameters include |
GET /Accounts | Read Accounts Read available account codes and payment-account eligibility. Query parameters include |
GET /TaxRates | Read TaxRates Read available tax types for defaults and line mappings. |
GET /TrackingCategories | Read TrackingCategories Read categories and options for tracking. |
GET /Invoices | Read Invoices Read a sample or locate a synced receivable or supplier bill. For supplier bills TRAK checks the number, contact and ACCPAY type. Query parameters include |
GET /Quotes | Read Quotes Find an existing quote by its quote number. Query parameters include |
GET /Payments | Read Payments Find a prior receipt by its exact Reference before writing it. Query parameters include |
GET /PurchaseOrders | Read PurchaseOrders Check existing POs in the draft date window and reconcile matching records. Query parameters include |
GET /Invoices/{invoiceID} | Read linked Invoices Retrieve the existing document by its stored or reconciled Xero identifier. |
GET /Quotes/{quoteID} | Read linked Quotes Retrieve the existing document by its stored or reconciled Xero identifier. |
GET /PurchaseOrders/{purchaseOrderID} | Read linked PurchaseOrders Retrieve the existing document by its stored or reconciled Xero identifier. |
POST /Invoices | Create a draft sales invoice Send an issued TRAK invoice or approved project package with the matched contact and lines (Type ACCREC). Query parameters include |
POST /Quotes | Create a draft quote Send the customer quote document number, expiry, terms and line items. Query parameters include |
PUT /Invoices | Create a draft supplier bill Use Type ACCPAY, supplier contact, invoice number, due date and approved lines. Query parameters include |
PUT /PurchaseOrders | Create a draft purchase order Use the matched supplier, purchase-order number, document date and inventory lines. Query parameters include |
PUT /Payments | Publish a customer receipt Link the Xero invoice and eligible payment account. Send the date, amount and stable receipt reference. |
POST /Invoices/{invoiceID}/Attachments/{fileName} | Attach an approved evidence pack Upload the ZIP bytes against the linked invoice. The connector sets IncludeOnline=false. Query parameters include |
Request and response fields
Draft documents use a JSON object keyed by Invoices, PurchaseOrders or Quotes, containing a list. Match the supplier or customer with Contact.ContactID. Each line carries Description, Quantity, UnitAmount, AccountCode and TaxType. Document type, date, local number and terms depend on the operation. A successful response contains the provider-issued record ID. Review drafts in Xero before authorisation.
Contact searches request 100 records per page. Supplier bill and PO reconciliation reads pages of 100 and stops for review if multiple records share a reference or 100 full pages are exhausted. Sales invoice and quote sync checks the exact document number before sending. Payment sync checks the linked invoice, amount due, currency and bank account, then matches Reference before a write. Reconcile uncertain results using the same document and receiving account.
Find a matched contact
GET /api.xro/2.0/Contacts?page=1&pageSize=100&searchTerm=Example
Accept: application/json
Authorization: Bearer {access_token}
xero-tenant-id: {organisation_id}{"Contacts":[{"ContactID":"11111111-1111-4111-8111-111111111111","Name":"Example Services"}]}Record a receipt against an authorised invoice
PUT /api.xro/2.0/Payments
Content-Type: application/json
Authorization: Bearer {access_token}
xero-tenant-id: {organisation_id}
Idempotency-Key: {stable_receipt_key}
{"Payments":[{"Invoice":{"InvoiceID":"11111111-1111-4111-8111-111111111111"},"Account":{"AccountID":"22222222-2222-4222-8222-222222222222"},"Date":"2026-11-20","Amount":100,"Reference":"Example receipt 1042"}]}Xero Payroll AU
Service root https://api.xero.com/payroll.xro. Enable Payroll AU for the connected organisation and grant employee-read, settings-read and timesheet access. Map the TRAK employee and pay categories, then review approved time for the employee’s open pay period.
| Method and resource | When TRAK uses it |
|---|---|
GET /1.0/Employees | List payroll employees List payroll employees. Query parameters include |
GET /1.0/Employees/{employeeID} | Read employee status and pay calendar Read employee status and pay calendar. |
GET /1.0/PayrollCalendars/{calendarID} | Read the open pay calendar Read the open pay calendar. |
GET /1.0/PayItems | List earnings rates List earnings rates. |
GET /2.0/timesheets | Find the employee’s timesheet Find the employee’s timesheet. Query parameters include |
GET /2.0/timesheets/{timesheetID} | Read the owned timesheet Read the owned timesheet. |
POST /2.0/timesheets | Create an employee timesheet Applies to an authorized Payroll AU delivery for one employee and pay period. |
POST /2.0/timesheets/{timesheetID}/reverttodraft | Return the owned timesheet to draft Applies to an authorized Payroll AU delivery for one employee and pay period. |
POST /2.0/timesheets/{timesheetID}/lines | Create an approved time line Applies to an authorized Payroll AU delivery for one employee and pay period. |
PUT /2.0/timesheets/{timesheetID}/lines/{lineID} | Update a previously delivered time line Applies to an authorized Payroll AU delivery for one employee and pay period. |
DELETE /2.0/timesheets/{timesheetID}/lines/{lineID} | Remove a superseded delivered line Applies to an authorized Payroll AU delivery for one employee and pay period. |
POST /2.0/timesheets/{timesheetID}/approve | Approve the reconciled timesheet Applies to an authorized Payroll AU delivery for one employee and pay period. |
The employee lookup walks pages until a page returns fewer than 100 records. A calendar must have a supported weekly, fortnightly, four-weekly or monthly period. Delivery matches the employee and period, checks the stored delivery receipt and compares the remote entries before changing lines. If a timesheet already exists without a matching TRAK receipt, review it in Xero.
Update a delivered time line
PUT /payroll.xro/2.0/timesheets/{timesheetID}/lines/{lineID}
Content-Type: application/json
Authorization: Bearer {access_token}
xero-tenant-id: {organisation_id}
Idempotency-Key: {stable_line_key}
{"date":"2026-11-20","earningsRateID":"11111111-1111-4111-8111-111111111111","numberOfUnits":7.5}Dynamics 365 Field Service
Service root https://{organisation}.crm.dynamics.com/api/data/v9.2. Regional organisation hosts can include a number after crm. Entra authenticates the application using client credentials and the organisation URL with /.default. The connector sends a bearer token, Accept: application/json and OData version 4.0 headers.
GET /WhoAmI checks UserId and OrganizationId. Select a feature to sample the relevant entity set. Results are returned as a value array.
| GET resource | Row identity | Display field |
|---|---|---|
| Work orders
| msdyn_workorderid | msdyn_name |
| Customers
| accountid | name |
| Customer assets
| msdyn_customerassetid | msdyn_name |
| Service tasks
| msdyn_workorderservicetaskid | msdyn_name |
| Products and services
| productid | name |
| Bookable resources
| bookableresourceid | name |
| Resource bookings
| bookableresourcebookingid | name |
Read work orders
GET /api/data/v9.2/msdyn_workorders?$top=20
Authorization: Bearer {access_token}
OData-Version: 4.0{"value":[{"msdyn_workorderid":"11111111-1111-4111-8111-111111111111","msdyn_name":"WO-1042"}]}Download Dynamics 365 Field Service operations (OpenAPI JSON)
Business Central
Service root https://api.businesscentral.dynamics.com/v2.0/{directory}/{environment}/api/v2.0. Entra client credentials use scope https://api.businesscentral.dynamics.com/.default. Test the connection to call GET /companies and read value[].id and displayName or name. Select the intended company, save and test again.
| GET resource | Row identity | Display field |
|---|---|---|
| Customers
| id | displayName |
| Items
| id | displayName |
| Suppliers
| id | displayName |
| Purchase orders
| id | number |
| Sales invoice references
| id | number |
| Employees
| id | displayName |
Read items for the selected company
GET /v2.0/{directory}/{environment}/api/v2.0/companies({companyID})/items?$top=20
Authorization: Bearer {access_token}
OData-Version: 4.0{"value":[{"id":"11111111-1111-4111-8111-111111111111","displayName":"Air filter"}]}SAP S/4HANA
Set the HTTPS base URL to the OData service root supplied for the SAP communication arrangement. The connector appends the entity paths below. Choose Basic authentication with the communication user or OAuth client credentials with the configured SAP token URL, client ID, secret and optional scope.
| GET resource | Row identity | Display field |
|---|---|---|
| Maintenance orders
| MaintenanceOrder | MaintenanceOrderDesc |
| Maintenance operations
| MaintenanceOrder + MaintenanceOrderOperation + MaintenanceOrderSubOperation | OperationDescription |
| Equipment
| Equipment + ValidityEndDate | EquipmentName |
Datasets may use value or d.results. For operations, the suboperation identity field must be present and may be empty. For equipment, both the equipment identifier and validity end date must be present. TRAK combines the corresponding fields to identify each source row.
Read maintenance orders from the configured service root
GET /sap/opu/odata/sap/API_MAINTENANCEORDER;v=2/MaintenanceOrder?$top=10
Accept: application/json
Authorization: Bearer {access_token}{"d":{"results":[{"MaintenanceOrder":"40001234","MaintenanceOrderDesc":"Inspect service pump"}]}}Pronto Xi
Obtain the licensed Pronto Connect version, HTTPS service root and GET resource paths from your Pronto partner. Each enabled feature requires a relative path and a stable ID field. Set a records path if the JSON list is nested. Supported credentials are Basic, bearer token or an API-key header supplied by the partner. TRAK records the agreed contract version.
| Feature selection | Partner contract to confirm |
|---|---|
| Maintenance work orders | MaintGetWorkOrders |
| Plant and equipment | MaintGetPlantItems |
| Items and materials | InvGetItems |
| Employees and resources | PayGetEmployees / RmsGetResources |
| Projects and tasks | ProjGetProjects |
| Monitor points and readings | MaintGetMonitorPointReadings |
The names above identify business operations. Enter the exact licensed URL path and records mapping. The adapter uses the configured GET as supplied, then bounds the sample locally. The following JSON illustrates a partner response with records path data.orders and ID field orderNumber.
{"data":{"orders":[{"orderNumber":"WO-1042","description":"Service pump"}]}}Asset Pre-Start notification webhook
A company can route Asset Pre-Start exception notifications to its own HTTPS receiver. Open Asset Pre-Start exceptions → Notification Routes, select the relevant notification type, severity, recipient scope and delivery channel, and choose Webhook. Enter the destination URL, method and timeout, then preview the route. Enable delivery and save the active route. Work-order inspection Pre/Post checks have a separate lifecycle.
The receiver owns the URL. It must handle the method selected on the route: POST by default, PUT or PATCH. Each call sends one JSON event. The default timeout is five seconds, configurable from two to thirty seconds.
| Header | Use |
|---|---|
X-TRAK-Event | asset_prestart_lifecycle_notification identifies this event family. |
X-TRAK-Notification-UUID | Identify repeated delivery of the same notification. |
X-TRAK-Delivery-Attempt-UUID | Correlate one delivery attempt with the route history. |
X-TRAK-Signature | When a signing secret is configured, the value is hmac-sha256-v1= followed by the lowercase hexadecimal HMAC-SHA256 of the exact JSON bytes. Use the configured header name if the route overrides this default. |
The body contains schema_version (1), event, company_id and sent_at_utc. The UTC timestamp uses YYYY-MM-DD HH:MM:SS. notification identifies the message, type, severity and state. subject identifies the affected record and can include asset, case, finding, defect, work-order and restriction IDs. Unused subject IDs are null. delivery identifies the attempt, recipient rule and route.
Compare the signature with the original request bytes before decoding the body. Use the notification UUID to make processing repeatable. Return any 2xx status after acceptance. For example, a receiver can return 204 No Content. A timeout or other HTTP status records a failed attempt. The retry intervals progress through 5 minutes, 15 minutes, 1 hour, 4 hours and 12 hours.
Download the complete Asset Pre-Start webhook schema and methods
Asset Pre-Start SMS delivery
A route configured for SMS resolves the recipient mobile numbers and submits one form-encoded request per recipient to Twilio. This is the company’s Asset Pre-Start notification route.
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json
Content-Type: application/x-www-form-urlencoded
Authorization: Basic {configured_account_credentials}
To={recipient}&Body={notification_text}&MessagingServiceSid={service_sid}
The configured account authenticates using its Account SID and auth token. TRAK sends MessagingServiceSid when configured, otherwise it uses the configured From number. A successful provider response records its message SID when returned. This acknowledges submission to Twilio. Handset delivery has its own provider status.
Download the SMS operation (OpenAPI JSON) · Twilio Message resource
Google address geocoding
When saving a site pin from its street address, TRAK can use the configured Google server geocoding key to resolve latitude and longitude. The connector requests GET https://maps.googleapis.com/maps/api/geocode/json with two query parameters: address and key. A successful response contains status OK and coordinates in results[0].geometry.location.lat and lng.
{"status":"OK","results":[{"geometry":{"location":{"lat":-31.95,"lng":115.86}}}]}
Check the provider status even when the HTTP response succeeds. If the address has no usable coordinates, refine it or enter the pin manually. The browser map uses Google Maps JavaScript and its separately configured browser key. The current server adapter supports forward geocoding.
Download the geocoding operation (OpenAPI JSON) · Google Geocoding documentation
Reporting, fleet data and inbound exchange
Use TRAK’s file import to preview, match and approve externally supplied records. Use report or dataset downloads for customers who consume files. A fleet system can supply a supported file for mapping when its data matches the selected TRAK import. The current connector catalogue has no direct Gearbox vehicle telemetry feed.
TRAK’s ordinary report export uses the delivery options displayed in the selected report workflow. Current public integration contracts do not define a generic report SFTP uploader, a Power BI dataset REST publisher, an incoming vendor webhook receiver or a report-wide HTTPS callback. The Asset Pre-Start notification webhook above has its own event and route configuration. Reports and dashboards · Import and export files
Authorisation and errors
For Microsoft connections, TRAK calls POST https://login.microsoftonline.com/{directory}/oauth2/v2.0/token using the client credentials grant. For SAP OAuth it posts the same grant to the configured token endpoint.
Xero organisation selection. Open Connect Xero to visit the provider’s consent page. TRAK exchanges the returned authorisation code at POST https://identity.xero.com/connect/token and calls GET https://api.xero.com/connections with the bearer token alone. Xero returns an array with id, tenantId, tenantName, tenantType, createdDateUtc and updatedDateUtc. If several organisations are available, select the intended one. If none are returned, repeat authorisation with access to the required organisation.
Subsequent accounting calls use the selected tenantId as xero-tenant-id. GET /api.xro/2.0/Organisation reads that organisation’s details. Disconnect clears the credentials stored in TRAK and records the local disconnect. Manage the provider-side authorisation in Xero. Xero operations and response schema.
| Result | Next action |
|---|---|
| 401 | Review credentials or reconnect the organisation. |
| 403 | Check the connected application’s permission for that resource. |
| 404 | Check the configured URL, entity and licensed module. |
| 429 | Wait for the provider’s rate limit to clear before retrying. |
| Invalid sample | Confirm the records path points to an array of objects. Check that every sampled row has a distinct external ID. |
| Write outcome uncertain | Review the existing provider document, payment or timesheet and reconcile against its TRAK reference before retrying the same operation. |
ERP sample checks require a successful HTTP response and valid JSON. The connector limits each response to 6 MiB. A displayed provider status concerns the remote ERP request. TRAK also validates the record shape and ownership before allowing subsequent actions.
File-based handoffs
For Pronto, SAP, Field Service and Business Central, outbound completion packages use the applicable file export and review workflow. Depending on the provider this includes completion evidence, defects, labour, materials or readings. The recipient imports the approved file according to its own contract. The receiving ERP’s import configuration determines the final mapping.
File import and export instructions · Payroll and approved time