FAQ
Answers to the most common questions about the Surfact API.
Why does my request return all objects even though I added a filter?
Invalid filter syntax is ignoredIf a query parameter's syntax is invalid, Surfact ignores it rather than erroring β which can return every object. Double-check the
__separator and attribute name. See Field Filters.
How do I discover an endpoint's fields?
Use an OPTIONS requestYou can send an
OPTIONSrequest to any endpoint to get a detailed JSON description of its attributes β including which arerequiredand which areread_only.
curl -X OPTIONS 'https://api.surfact.com/api/v2.0/devices/' \
-H 'X-Auth-Token: your_token_here'{
"name": "Device List",
"actions": {
"POST": {
"label": { "type": "string", "required": false, "read_only": false, "label": "Label" },
"name": { "type": "string", "required": false, "read_only": false, "label": "Name", "max_length": 200 },
"description": { "type": "string", "required": false, "read_only": false, "label": "Description" }
}
}
}read_only: true on a field means the API accepts it in a write without complaint and then ignores it, so OPTIONS is the fastest way to find out whether a field you are sending will actually take effect.
My timestamps look wrong β what format does Surfact use?
Two formats β check which field you are readingData-point and activity timestamps are POSIX time in milliseconds:
timestampandcreated_atinside a value,lastActivityon devices and variables, andlastTriggeredon events β for example1788442281742.Resource metadata timestamps are ISO-8601 strings:
createdAton devices, variables, organizations, events and event logs β for example2026-08-12T13:39:08.353792Z.A single response can contain both: a reefer's device object carries an ISO-8601
createdAtright next to a millisecondlastActivity. See Data Structure Overview.
How long is my token valid?
Six hoursTokens expire after 6 hours β generate a fresh one as needed. See Authentication.
How do I show a device on a map?
Read lat and lng from thepositionvariableSurfact reads
latandlngfrom a dot'scontext, so a single dot is enough to plot the position. On an Emma tracker those coordinates arrive on thepositionvariable, whose value is the accuracy of the fix in metres. See Device Position.
I'm still not getting a 200 OK
200 OKDrop us a line at [email protected] and we'll help you out.
Updated 7 days ago