List Organization Devices

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
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

  1. Start with no cursor and a limit between 1 and 500 (default 200).
  2. Check the HTTP status and response Content-Type, then decrypt the entire successful JWE response.
  3. Upsert the returned items in your own system using deviceId as the key. Save the next cursor after the page has been stored successfully.
  4. 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.
  5. Stop when hasMore is false and nextCursor is null. An empty organization returns items: [], hasMore: false, and nextCursor: null after decryption.
  6. 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.

curl --get 'https://api.elecq.com/api/v1/access/organization/devices' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --header 'Accept: application/jose' \
  --data-urlencode 'limit=1' \
  --data-urlencode 'fields=deviceId,productModel,pin,randomCode,importedAt'

Next-page request

After decrypting and storing the previous page, replace OPAQUE_CURSOR with its nextCursor. Keep all other query parameters unchanged. Continue until hasMore is false.

curl --get 'https://api.elecq.com/api/v1/access/organization/devices' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --header 'Accept: application/jose' \
  --data-urlencode 'limit=1' \
  --data-urlencode 'fields=deviceId,productModel,pin,randomCode,importedAt' \
  --data-urlencode 'cursor=OPAQUE_CURSOR'

Optional import-time range

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.

importedAtFrom=2026-10-01T00:00:00Z
importedAtTo=2026-11-01T00:00:00Z

Actual HTTP success body

The following segments are placeholders, not a decryptable test vector:

BASE64URL_PROTECTED_HEADER.BASE64URL_ENCRYPTED_KEY.BASE64URL_IV.BASE64URL_CIPHERTEXT.BASE64URL_TAG

Decrypted page example

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.

{
  "items": [
    {
      "deviceId": "EXAMPLE_DEVICE_SN",
      "productModel": "EXAMPLE_MODEL",
      "pin": "001234",
      "randomCode": "EXAMPLE_RANDOM_CODE",
      "importedAt": "2026-10-20T08:00:00Z"
    }
  ],
  "nextCursor": "OPAQUE_CURSOR",
  "hasMore": true
}
Decrypted fieldTypeMeaning
itemsarrayDevices in this page; always present, possibly empty.
items[].deviceIdstringDevice SN; always present and suitable for idempotent import.
items[].productModelstring or nullProduct model; included by default.
items[].pinstring or nullDevice PIN; explicit field selection and credential scope required.
items[].randomCodestring or nullDevice Random Code; explicit field selection and credential scope required.
items[].importedAtstring or nullCurrently effective import timestamp, formatted as RFC 3339; explicitly selected.
nextCursorstring or nullContinuation cursor; null on the last page.
hasMorebooleanWhether 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.

StatusAction
400Correct invalid parameters. On CURSOR_EXPIRED, start again without a cursor.
401Obtain another client-credentials token and retry the page. A replacement token for the same client and organization can continue a valid cursor.
403Check organization access, granted scopes, and recipient-key registration. Repeatedly requesting tokens does not fix missing permissions or keys.
406Send Accept: application/jose.
429A 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.
500An unexpected internal error occurred. Retry with bounded backoff; contact ELECQ if it persists.
503A 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.

Query Params
integer
1 to 500
Defaults to 200

Maximum devices per page. Keep the same value throughout a pagination run.

string
length ≥ 1

Opaque nextCursor from a successfully decrypted previous page. Omit for the first page; do not decode or modify it.

fields
array of strings, unique
length between 1 and 5
Defaults to deviceId,productModel

Comma-separated field names. Defaults to deviceId,productModel; deviceId is always included. pin and randomCode additionally require application.device.credentials.read.

date-time

Inclusive lower bound of the currently effective import time. Use RFC 3339 with an explicit offset. Replacement imports update this time.

date-time

Exclusive upper bound of the currently effective import time. Must be later than importedAtFrom when both are provided.

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.

FieldTypeRequiredDescription
codestringYesMachine-readable error code.
messagestringYesHuman-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."
}

{
  "code": "INVALID_TOKEN",
  "message": "A valid access token is required."
}
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.

FieldTypeRequiredDescription
codestringYesMachine-readable error code.
messagestringYesHuman-readable explanation without device credentials.

insufficientScope

{
  "code": "INSUFFICIENT_SCOPE",
  "message": "The requested fields require application.device.credentials.read."
}

organizationAccessDenied

{
  "code": "ORGANIZATION_ACCESS_DENIED",
  "message": "An organization client-credentials token is required."
}

encryptionKeyMissing

{
  "code": "ENCRYPTION_KEY_NOT_CONFIGURED",
  "message": "Register an encryption public key for this client before requesting device data."
}
406

Accept excludes the supported application/jose success format. Ordinary JSON business responses are not supported.

Error response: Content-Type: application/json. This format is used only for errors and never for successful device data.

FieldTypeRequiredDescription
codestringYesMachine-readable error code.
messagestringYesHuman-readable explanation without device credentials.

example

{
  "code": "NOT_ACCEPTABLE",
  "message": "Use Accept: application/jose."
}

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.

FieldTypeRequiredDescription
codestringYesMachine-readable error code.
messagestringYesHuman-readable explanation without device credentials.

example

{
  "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.

FieldTypeRequiredDescription
codestringYesMachine-readable error code.
messagestringYesHuman-readable explanation without device credentials.

example

{
  "code": "SERVICE_UNAVAILABLE",
  "message": "The service is temporarily unavailable."
}
Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/jose
*/*