Errors
Error responses are { statusCode, code, message }. Branch on code in programs and show message to people. The parenthesis at the end of message names the field or object (e.g. devices.3.serial).
What to do
Section titled “What to do”| Status | What to do |
|---|---|
400 |
Fix the request and send it again. The same request gives the same result. |
401 |
Check the key and client certificate. If revoked or expired, create a new key in the portal. |
403 |
Check the key’s scopes, the vendor status (suspended) and the approved device types. |
404 |
Check the serial or ID. Objects of other vendors also return 404. |
409 |
The current state does not allow it (already exists, pending, revoked). Read the state and decide. |
422 |
The same Idempotency-Key was used for a different request. Use a new key. |
429 |
Retry after Retry-After seconds. |
500, 503 |
Retry later with the same Idempotency-Key. Contact us if it persists. |
All codes
Section titled “All codes”| HTTP | code | Message |
|---|---|---|
| 400 | INVALID_CSR | The CSR could not be read or does not meet the profile (P-256, signature). |
| 400 | PROFILE_NOT_ALLOWED | This profile cannot be used for the device. |
| 400 | RTU_ID_REQUIRED | The RTU profile needs rtuId on the device (CN rtu-{RTU ID}). |
| 400 | VALIDATION | The request is not valid. |
| 401 | API_KEY_EXPIRED | The API key has expired. |
| 401 | API_KEY_REQUIRED | Send the API key in the Authorization: Bearer header. |
| 401 | API_KEY_REVOKED | The API key has been revoked. |
| 401 | CLIENT_CERT_MISMATCH | The client certificate is not the one bound to this API key. |
| 401 | CLIENT_CERT_REQUIRED | A client certificate (mTLS) is required. |
| 401 | CLIENT_CERT_REVOKED | The client certificate is revoked or expired. |
| 401 | INVALID_API_KEY | The API key is not valid. |
| 403 | DEVICE_TYPE_NOT_APPROVED | The vendor is not approved for this device type. |
| 403 | INSUFFICIENT_SCOPE | The API key does not have the scope for this call. |
| 403 | VENDOR_INACTIVE | The vendor is not approved. |
| 403 | VENDOR_SUSPENDED | The vendor is suspended. Reads and revocations still work. |
| 404 | BATCH_NOT_FOUND | No batch with this ID. |
| 404 | CERTIFICATE_NOT_FOUND | No certificate with this serial for your vendor. |
| 404 | DEVICE_NOT_FOUND | No device with this serial in your registry. |
| 404 | NOT_FOUND | Not found. |
| 404 | REQUEST_NOT_FOUND | No issuance request with this ID. |
| 409 | CERTIFICATE_EXISTS | The device already has a valid certificate. Renew it instead. |
| 409 | CERTIFICATE_REVOKED | The certificate is already revoked. |
| 409 | DEVICE_EXISTS | A device with this serial is already registered with different values. |
| 409 | DEVICE_INACTIVE | The device is returned or retired. |
| 409 | DEVICE_LOCKED | chipId and rtuId cannot change while the device has a valid certificate. |
| 409 | DUPLICATE_CHIP | This chip ID is already used by another device or a valid certificate. |
| 409 | IDEMPOTENCY_IN_PROGRESS | A request with this Idempotency-Key is still being processed. |
| 409 | REQUEST_PENDING | The device already has a request waiting for approval. |
| 409 | RTU_ID_IN_USE | This RTU ID is already used by another device or a valid certificate. |
| 422 | IDEMPOTENCY_KEY_REUSED | This Idempotency-Key was used with a different request. |
| 429 | RATE_LIMITED | Too many requests. Retry after the Retry-After seconds. |
| 500 | INTERNAL | Internal error. |
| 503 | NOT_CONFIGURED | Issuance is not available in this environment right now. |
Without any client certificate the TLS handshake fails and there is no response. A certificate from a CA the API does not trust (such as a device certificate) gets 403 Forbidden from the front door (body {"message":"Forbidden"}, no code).