Skip to main content
Devices belong to the optional teams, dispatch and missions module. A field device (a dispatcher tablet, a vehicle terminal) can keep creating dispatch requests with no connection. It numbers each request with its own sequence number, starting at 1, and sends the queue when it reconnects. wede stores each request once, checks that no sequence number is missing, and processes the requests with the same mechanism as an online Action dispatch.

Authentication

Session token (Authorization: Bearer <token>).
The integration API key (x-wede-api-key) has neither permission. Calls with an API key return 403 forbidden.

Register a device

Registers the device for your tenant. Safe to call on every app start: calling it again updates app_version and the device’s last seen time.
string
required
Your stable identifier for the device, 1 to 200 characters.
string
required
ios, android, web or other.
string
Up to 50 characters.
Response 201

Sync a device

string
required
A device registered for your tenant.
integer
required
0 or more. The last sequence number the device has confirmed on its side. wede stores the highest value it receives.
object[]
required
Up to 500 queued dispatch requests. Send [] to process what is already pending.
integer
required
1 or more, one per request, with no gaps.
string
required
When the request was created on the device, ISO 8601 in UTC, for example 2026-06-09T18:30:00Z.
string
UUID of the catalog action. Needed for processing.
number
Incident latitude. Needed for processing.
number
Incident longitude. Needed for processing.
string
Vertical code.
string
Priority of the incident.
object
Any data you want to keep with the request.
Response 200
integer[]
Sequence numbers stored in this call.
integer[]
Sequence numbers wede already had for this device. They are not stored again, so retrying a sync is safe.
integer[]
Sequence numbers that could not be stored.
integer
Highest sequence number wede has received from this device.
integer
Highest last_received_seq the device has reported.
string
ISO 8601 timestamp of this sync.
boolean
true when a sequence number is missing for this device.
string | null
The security incident wede recorded for the gap, or null.
wede sends the device.synced webhook with { device_id, accepted, duplicates }, where accepted and duplicates are counts.

Sequence integrity

Sequence numbers must start at 1 and have no gaps for each device. When one is missing, wede:
  1. Blocks every pending request that comes after the first missing number (status blocked_integrity). Requests before the gap are still processed.
  2. Records a security incident and alerts your tenant administrators by email.
  3. Returns integrity_gap_detected: true with the incident id.

Processing

In the same call, wede processes every pending request of the device in sequence order, including requests stored in earlier syncs: Because the event id is fixed per request, processing the same request again never creates a second mission for the same team.

Read a device queue

Returns up to 100 queued requests of the device with one status, in sequence order.
string
required
Device identifier.
string
default:"pending"
pending, processing, processed, failed or blocked_integrity. Any other value reads pending.
Response 200
sequence_number, event_lat and event_lng are returned as strings.

Errors on every device endpoint

SDKs

registerDevice and syncDeviceQueue in JavaScript, register_device and sync_device_queue in Python.