Sync Write Operations
Synchronous mode couples your API call directly to the TSP’s response. When you submit a request with is_sync=true, Catena forwards it to the TSP, waits for the response, and returns the result directly to you — all in a single HTTP round-trip.
Best for development and debugging. Sync mode lets you see TSP responses immediately, making it easy to iterate on payloads and troubleshoot field requirements across different providers.
How It Works
You submit a write request with is_sync=true
Send a POST or PATCH request to the Telematics API with the is_sync=true query parameter.
Sync mode does not include automatic retries or rate limiting. If the TSP is temporarily unavailable or rate-limited, the error is returned directly to you and it’s your responsibility to retry.
Example: Sending a Message (Success)
Request
Response (200 OK)
On success, the response contains the completed resource operation with resource_id and source_id populated:
Key differences from the async response:
statusis"success"(not"pending")resource_idcontains the Catena ID of the newly created resourcesource_idcontains the TSP-side ID of the newly created resource
Example: Sending a Message (Failure)
When the TSP returns an error, Catena returns a 502 Bad Gateway response because it acts as a gateway to the TSP and the error originated upstream.
Response (502 Bad Gateway)
When a sync operation fails, resource_id and source_id are both null because the resource was never created on the TSP.
Understanding Error Responses
The logs array contains one entry per attempt with:
When to Use Sync Mode
Building and debugging integrations
When you’re first integrating write operations, sync mode lets you see TSP errors immediately. Different TSPs have different field requirements — sync mode helps you iterate quickly on your payload structure.
Interactive user workflows
When your end user needs immediate confirmation that a resource was created. For example, a dispatcher sending a message who needs to see “Message sent” or an error right away.
Operations requiring the TSP response
When you need the TSP-assigned resource ID (source_id) or other response data immediately to continue your workflow.
Recommended development workflow: Start with is_sync=true while building your integration to quickly identify and fix payload issues. Once your payloads are stable, switch to async mode (is_sync=false) for production to benefit from automatic retries and rate limiting.