Retrieve organization-assigned devices for initial import and periodic reconciliation. Requires Application Access and a JWE-encrypted success response.
Recent Requests
Log in to see full request history
Time
Status
User Agent
Retrieving recent requests…
Loading…
Availability: Available to onboarded Application Access clients with the required scopes and a registered recipient public key. The base URL https://api.elecq.com covers Europe-region data.
Authentication and organization scope
Obtain an access token from Obtain / Refresh Tokens using grant_type=client_credentials. Authenticate the Token request with your dedicated Application Access client ID and secret using HTTP Basic, explicitly request the required scopes, and send the returned token here as Authorization: Bearer ACCESS_TOKEN.
Use separate client IDs for User Access and Application Access. A user-authorized token is not a substitute for an organization token. This server-to-server flow needs no browser login, consent, authorization code, redirect URI, or refresh token. Cache and reuse the token until it expires, then request another using the same client-credentials grant. Omitting scope from the Token request does not grant resource API permissions.
The application determines the organization. Requests apply only to that organization; parent organizations, child organizations, and other organizations are not included. There is no caller-supplied organization or merchant ID parameter. This endpoint lists organization-assigned devices, not devices bound to an individual user. Access remains subject to the client's assigned permissions.
Required scope: application.device.read. Requesting pin or randomCode additionally requires application.device.credentials.read. Field selection does not grant permission; requesting a restricted field without its scope returns 403 rather than silently omitting it.
Request and field selection
This GET request has no body. Use Accept: application/jose to declare the supported success-response format; a request Content-Type does not select response encryption.
Omit fields to receive deviceId,productModel. To import device credentials, request fields=deviceId,productModel,pin,randomCode. Add importedAt when the import time is needed. deviceId is always included, even when it is not explicitly selected. Unknown fields or an empty field selection return 400. Unrequested fields are omitted; a requested field with no available value is null. A failed data lookup fails the page instead of silently skipping devices or substituting nulls for a dependency failure.
deviceId is the device serial number (SN), not an internal numeric database ID. Device identifiers, PINs, and Random Codes are strings, preserving leading zeroes. Clients should ignore additional response fields they do not use.
Import-time filtering
importedAtFrom is inclusive and importedAtTo is exclusive. Both use RFC 3339 timestamps with an explicit UTC offset; UTC values ending in Z are recommended. If both are provided, the start must be earlier than the end. Either bound may be omitted.
The import time is the currently effective import timestamp. A replacement import updates it, so the device subsequently belongs to the new time range. It is not the first-ever import time or a historical shipment record. Time filters select an import range; they are not an incremental change feed. Omit both bounds for a complete organization reconciliation.
Cursor pagination and reconciliation
Start with no cursor and a limit between 1 and 500 (default 200).
Check the HTTP status and response Content-Type, then decrypt the entire successful JWE response.
Upsert the returned items in your own system using deviceId as the key. Save the next cursor after the page has been stored successfully.
If hasMore is true, send nextCursor unchanged with the same limit, field selection, and time filters. Do not infer completion from the number of returned items.
Stop when hasMore is false and nextCursor is null. An empty organization returns items: [], hasMore: false, and nextCursor: null after decryption.
Start the next full reconciliation without a cursor. Do not treat a cursor as a permanent synchronization checkpoint, and do not remove locally stored devices based on an incomplete run.
Cursors are opaque and belong to the same client, organization, and query. By default, a run expires 24 hours after its first page; following pages do not extend that deadline. Reacquiring an access token for the same client and organization does not itself invalidate a cursor. Retry the same cursor after a transient failure; process records idempotently. On CURSOR_EXPIRED, restart from the first page. Changing filters or field selection requires a new run.
Devices are ordered by the currently effective import time descending, then by deviceId descending to break ties. Pagination uses search_after without a point-in-time snapshot (PIT); a run does not freeze the device list. Records imported ahead of the current cursor are retrieved by a later run started without a cursor. Concurrent replacement imports, assignment changes, or index updates can cause records to be repeated or missed within a run. Process every page idempotently by deviceId and perform periodic full reconciliation. Allow for index synchronization delay rather than assuming immediate read-after-write visibility. Devices without an import time sort last and are excluded when an import-time bound is supplied.
Mandatory encrypted success response
Every 200 response is a JWE Compact string with Content-Type: application/jose and Cache-Control: no-store. Encryption is mandatory for every client, including requests that select only basic fields. There is no ordinary-JSON success mode and no plaintext fallback.
Provide ELECQ with your RSA public key as a PEM file and the corresponding OAuth2 client ID. Wait for ELECQ to confirm activation and provide the key identifier (kid) before calling this endpoint. The private key remains on your server. ELECQ selects the registered recipient key; the request cannot provide an arbitrary replacement key. Use RSA-OAEP-256 + A256GCM, as specified in Business Data Encryption.
The encrypted plaintext is the complete UTF-8 page object, including items, nextCursor, and hasMore. The response body is the raw five-segment Compact value, without JSON quotation marks or a wrapper. Each generated response uses fresh encryption randomness; retry ciphertext can differ while containing the same business records.
Omitting Accept or using */* still results in JWE. An Accept header that excludes application/jose returns 406. Missing or invalid recipient-key configuration returns 403; a known encryption failure returns 503. Neither returns unencrypted device data. OAuth2 Token responses and API-generated errors are ordinary JSON. Gateways may return a different error format: inspect HTTP status and Content-Type before attempting JWE decryption.
First-page request
This example omits time filters and uses limit=1 to make the one-item response below easy to verify. Use a larger limit, up to 500, for normal imports.
After decrypting and storing the previous page, replace OPAQUE_CURSOR with its nextCursor. Keep all other query parameters unchanged. Continue until hasMore is false.
To start a separate filtered run, omit the cursor and add these parameters to the first-page request. Replace the dates with your intended import range, and repeat the same bounds on every continuation request.
This JSON is available only after successful decryption and authentication-tag verification. It is not an application/json HTTP success response. All device values below are illustrative. This page uses limit=1 and assumes that more devices remain.
Devices in this page; always present, possibly empty.
items[].deviceId
string
Device SN; always present and suitable for idempotent import.
items[].productModel
string or null
Product model; included by default.
items[].pin
string or null
Device PIN; explicit field selection and credential scope required.
items[].randomCode
string or null
Device Random Code; explicit field selection and credential scope required.
items[].importedAt
string or null
Currently effective import timestamp, formatted as RFC 3339; explicitly selected.
nextCursor
string or null
Continuation cursor; null on the last page.
hasMore
boolean
Whether another page can be requested.
Error handling
API-generated errors use application/json with code and message, without device credentials. A page that cannot be completed is an error, not an apparently successful partial reconciliation.
Status
Action
400
Correct invalid parameters. On CURSOR_EXPIRED, start again without a cursor.
401
Obtain another client-credentials token and retry the page. A replacement token for the same client and organization can continue a valid cursor.
403
Check organization access, granted scopes, and recipient-key registration. Repeatedly requesting tokens does not fix missing permissions or keys.
406
Send Accept: application/jose.
429
A gateway may apply rate limits. Honor Retry-After if present; otherwise use bounded exponential backoff. The gateway's error body and Content-Type may differ.
500
An unexpected internal error occurred. Retry with bounded backoff; contact ELECQ if it persists.
503
A required service is unavailable or encryption could not complete. Retry the same cursor with bounded backoff while it remains valid.
For persistent 503 responses, provide ELECQ with your client ID, UTC request time, HTTP status, and error code. Do not send your client secret, access token, private key, PIN, or Random Code. Requesting new tokens does not resolve a service or encryption configuration failure.
Responses
400
Invalid parameters, invalid cursor, changed continuation parameters, or an expired cursor. Restart from the first page on CURSOR_EXPIRED.
Error response:Content-Type: application/json. This format is used only for errors and never for successful device data.
Field
Type
Required
Description
code
string
Yes
Machine-readable error code.
message
string
Yes
Human-readable explanation without device credentials.
invalidParameter
{
"code": "INVALID_PARAMETER",
"message": "importedAtFrom must be earlier than importedAtTo."
}
invalidCursor
{
"code": "INVALID_CURSOR",
"message": "The cursor is invalid for this request."
}
expiredCursor
{
"code": "CURSOR_EXPIRED",
"message": "Restart this query without a cursor."
}
403
Organization access or a required scope is missing, or no recipient encryption key is configured for the client.
Error response:Content-Type: application/json. This format is used only for errors and never for successful device data.
Field
Type
Required
Description
code
string
Yes
Machine-readable error code.
message
string
Yes
Human-readable explanation without device credentials.
insufficientScope
JSON
{
"code": "INSUFFICIENT_SCOPE",
"message": "The requested fields require application.device.credentials.read."
}
An upstream gateway may return 429 when a rate limit is reached. Honor Retry-After if present; otherwise use bounded exponential backoff. The gateway response body and Content-Type are deployment-dependent; no fixed JSON error code is guaranteed. No plaintext device data is returned.
500
An unexpected internal error prevented a complete response. Known encryption failures use 503. No plaintext business data is returned.
Error response:Content-Type: application/json. This format is used only for errors and never for successful device data.
Field
Type
Required
Description
code
string
Yes
Machine-readable error code.
message
string
Yes
Human-readable explanation without device credentials.
example
JSON
{
"code": "INTERNAL_ERROR",
"message": "The request could not be completed."
}
503
A required service is unavailable or encryption could not complete. Retry the same cursor with bounded backoff while it remains valid. For persistent errors, contact ELECQ with your client ID and UTC request time; repeatedly obtaining new tokens does not resolve this error.
Error response:Content-Type: application/json. This format is used only for errors and never for successful device data.
Field
Type
Required
Description
code
string
Yes
Machine-readable error code.
message
string
Yes
Human-readable explanation without device credentials.
example
JSON
{
"code": "SERVICE_UNAVAILABLE",
"message": "The service is temporarily unavailable."
}
Updated 18 days ago
Did this page help you?
Yes
No
Language
ShellNodeRubyPHPPython
Credentials
OAuth2
Loading…
Response
Click Try It! to start a request and see the response here! Or choose an example: