Skip to main content
The Orbscan API uses standard HTTP status codes to signal the outcome of every request. When a request fails, the response body uses the same JSON envelope as a successful response — but with success set to false, data set to null, and code set to the HTTP status as a string.

The Error Envelope

Every error response follows this shape:
Check success first to determine whether the request succeeded, then branch on code (or the HTTP status, which always matches) to decide how to respond.

Error Codes

A successful lookup that finds no matching data still returns 200 with success: true — never 404. For list endpoints, data.items will be an empty array. For single-record lookups, data will be null. Treat these as valid empty results, not errors.

Handling Errors in Code

The pattern below is a reliable approach for any integration: inspect success first, then switch on code to handle specific cases. Anything unexpected can surface as a generic exception with the message included for debugging.
Python