The MyGeotab software development kit (SDK) exposes the same platform capabilities that power MyGeotab. This flexibility means the integration must make deliberate choices about data access, identity, scale, recovery, and side effects. Use this guide before the method and entity reference to choose a pattern and avoid common production failures.
Start with the behavior your application needs, not with an API method. The wrong access pattern can work in a test database and then become slow, incomplete, or difficult to recover at customer scale.
| Need | Use | Why |
|---|---|---|
| Read current state or answer a bounded question | Get | Search, property selection, sorting, and supported pagination make the request explicit and bounded. |
| Continuously synchronize changes | GetFeed | A durable version cursor avoids repeatedly scanning the same history and returns later corrections. |
| Run analytics over large historical data sets | Data Connector | Analytics workloads do not have to compete with operational API traffic or maintain polling infrastructure. |
| Combine a small number of independent, short reads | ExecuteMultiCall | One HTTP round trip reduces network overhead while preserving result order. |
| Add a workflow inside MyGeotab or Geotab Drive | Add-In | The application can use the host context and the signed-in user's data scope. |
These patterns can coexist. For example, an Add-In can use Get for an interactive view while a server-side process usesGetFeed to maintain a local operational store. Confirm that the entities and fields you need are supported by the selected pattern before committing to the architecture.
The API applies the authenticated user's security clearances and data-access groups. A successful call can therefore return an empty or partial result when the same call returns data for an administrator. Design and test with the permissions the integration will use in production.
Changing the API user or its data scope can change which records are visible. Revalidate snapshots and feed checkpoints after an access change instead of assuming the old state is complete for the new scope.
Authenticate once, retain the returned credentials securely, and reuse the session. Reauthenticating before every request adds latency, consumes the lower authentication rate limit, and eventually invalidates older sessions for the same user.
my.geotab.comunless you already know the customer's server.LoginResult.path. If it is not ThisServer, send subsequent requests to that server. A database can move, so use an API client that handles federation or retain this redirect behavior in your client.InvalidUserException or an invalid-session error, refresh or authenticate once, then retry the original call once. Repeated authentication is not a recovery strategy for permission or request errors.Sessions can expire because of age, a password change, or the per-user concurrent-session limit. See the authentication lifecycle and current rate limits for details.
A Get call without a search can return every accessible entity of that type. Make broad reads intentional by adding a supported search, a result limit, and pagination where the entity supports it.
| Rough edge | Reliable approach |
|---|---|
| Search objects are entity-specific, and similarly named fields can have different meanings. | Use the search object documented for the requested entity. Read each property description; for example, an entityFromDate can describe its active lifecycle rather than its creation time. |
| Names can use wildcard matching and are not guaranteed to be unique. | Resolve a name to exactly one entity, reject ambiguous matches, and retain the returned ID for later calls. |
| Entity IDs are opaque and some system IDs are readable constants rather than GUIDs. | Treat IDs as opaque strings. Do not reject an ID only because it is not a GUID. |
resultsLimit truncates a response; by itself, it does not prove that the complete result was returned. | For entities that support pagination, pass a supported sort object and carry both offset and lastIdfrom the final row. See pagination. |
PropertySelector is beta and is not supported by every entity, property, or search combination. | Use it only where documented, include id when the result will be joined or updated, and test the selected fields on every supported server version. An empty field list returns the default full object. |
| Nested entity properties commonly contain only an ID. | Load referenced entities in bounded batches and cache stable reference data such as devices, diagnostics, sources, and users instead of issuing one request per record. |
| Telemetry queries can accidentally scan an unbounded history. | Supply UTC fromDate and toDate bounds where supported, particularly when filteringStatusData, LogRecord, faults, trips, and other high-volume records. See the Telemetry and Diagnostics guide for diagnostic filtering, units, interpolation, and bounded fallback behavior. |
Use ExecuteMultiCall for a modest number of independent, short reads. Calls run in order and stop at the first error; later calls are not executed. Keep long-running or large-response calls separate, and limit nested calls to the recommended maximum described in the MultiCall guide.
This browser-side pattern uses the JavaScript API client to retrieve a complete, bounded device list. It retains both pagination cursor values because device names are not unique, and it continues until the API returns an empty page. A short page alone is not proof that pagination is complete.
If the integration needs only one device, search by an exact ID or serial number and set resultsLimit to a small value. If a human-entered name matches more than one result, ask for a more precise selector instead of choosing the first result.
The equivalent server-side pattern uses the Geotab.Checkmate.ObjectModel NuGet package. The client handles JSON serialization and authentication federation.
Keep the NuGet package current and compile examples against the package version your application deploys. The .NET client guide covers setup and client behavior.
Treat a GetFeed cursor as a durable checkpoint, not as a timestamp. Maintain an independent checkpoint for each database, entity type, and integration scope.
fromVersion to start from now, use "0" for available history, or use a supported fromDate search on the first request to seed from a date.toVersion as fromVersion. Do not repeat the date-to-version search on every restart.CompanyGroup root scope for full-fleet synchronization. A user scoped below the root can make feed queries materially slower and can cause a 180-second timeout. Use bounded Get queries when the integration must read only a restricted subset.toVersion only after the entire batch is durably processed. Saving it first can lose records if the process fails before the batch is committed. Saving it afterward can replay a batch, so processing must be idempotent.Search support differs by feed type, and many search properties are ignored. Check the GetFeed reference before relying on a filter. See the Data Feed guide for calculated-data invalidation, trip identity, and type-specific limits.
Add entities with all fields required by that entity type. For Set, retrieve the current entity, apply the intended change, preserve its ID and required fields, and send the resulting entity. Do not assume Set is a JSON Patch operation.Add. A network failure can leave the client uncertain whether a mutation completed.Remove as destructive and irreversible unless the entity documentation provides a recovery lifecycle. Its entity argument is not a filter. Prefer a documented archive or deactivation lifecycle when the business object supports one.Do not place mutations in ExecuteMultiCall. MultiCall is not transactional: earlier calls remain committed when a later call fails, and calls after the failure are not run.
Classify the failure before retrying. Retrying every error can amplify an outage, duplicate writes, or hide a permission problem.
| Failure | Response |
|---|---|
| HTTP 429, an over-limit response, a temporary server failure, or a network timeout during a safe, idempotent request | Retry a bounded number of times with exponential backoff and jitter. Honor Retry-After when present and reduce request concurrency or volume. For a mutation or any request that might have been accepted, reconcile the target state before deciding whether to retry. |
| Invalid or expired session | Refresh or authenticate once, then retry the original request once. |
| Missing method, invalid argument, unsupported entity, duplicate, or insufficient clearance | Do not retry unchanged. Correct the request, feature expectation, or access configuration. |
| Timeout after a mutation was sent | Read the target state or query by its unique reference before deciding whether to retry. |
Record the method, entity type, database alias, duration, retry count, HTTP status, JSON-RPC error type, and the server-provided error ID. For MultiCall, also record requestIndex. Redact credentials and customer payloads. Monitor rate-limit responses, feed backlog, checkpoint age, processing failures, and the time of the last successful call.
Generic messages such as Object reference not setcan result from a missing required parameter, an invalid referenced ID, or a referenced entity that is outside the user's scope. Validate those conditions first. If the request is valid, include the server-provided error ID when escalating the response as a possible server defect.