Design & Error Code
API Design
1. Path
The Nodit Web3 Data API path is structured as follows.
/{version}/{protocol}/{network}/{API resource}
//EXAMPLE: /v1/ethereum/mainnet/accounts
version: API version (e.g. v1).protocol: The blockchain protocol to call.network: The blockchain network to call.resource: The part where each API's resource is defined; hierarchical.
2. Listing & Paging
When an API response includes list-style data, the count and items fields are used to separate list size from the data. Most list responses support query parameters for paging. See the table below for parameter usage.
Property | Type | Description | Example Value |
|---|---|---|---|
| Integer | Total number of items. | 20 |
| array:object | Array (list) of response objects. | |
| Integer | Page number for list pagination. Supported as a query parameter to fetch results from a specific page. Integer from 1 to 100. Invalid values are ignored. Default is 1. | 1 |
| Integer | Number of result items per page for list pagination. Integer from 1 to less than 100. Default is 20. | 20 |
| string | The cursor parameter is used for pagination and supports moving between previous and next pages. Providing the cursor value from the previous response loads the next page. If neither page nor cursor is provided, cursor-based pagination is assumed. This parameter cannot be used together with |
3. Response Format
All Nodit Web3 Data API responses include data in object form. Responses that are not single-item include a pagination field.
Key | Value Description |
|---|---|
pagination | Values as in section 2. Listing & Paging; used to separate response size from data. Fields include |
For successful responses (HTTP 2xx), the response body contains the actual response object in domain form.
Key | Value Description |
|---|---|
data | Result data object for the request. |
For non-success responses, a message field is included together with code, describing the error.
Key | Value Description |
|---|---|
message | Error description message. |
Response examples for success and failure cases are shown below.