Design & Error Codes
API Design
1. Path
The Nodit Multichain API path is structured as follows.
/{version}/multichain/{API resource}
//EXAMPLE: /v1/multichain/lookupEntities
version: API version (e.g. v1).multichain: Fixed segment indicating the Multichain API endpoint.resource: The part where each API's resource is defined; hierarchical.
2. Response Format
All Multichain API responses are returned as objects. 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.
3. Error Response Format
When an error occurs, the response is returned in the format below. code and message vary by error type; see Error Code Specification for code details.
Error Code Specification
| HTTP Status Code | Description |
|---|---|---|
SUCCESS | 200 OK | Success response |
SUCCESS | 201 Created | Success (resource created) |
MISSING_REQUIRED_PARAMETER | 400 Bad Request | A required parameter is missing. [Example Cases]
|
INVALID_PARAMETER | 400 Bad Request | Invalid value provided for a parameter. [Example Cases]
|
WRONG_RANGE_PARAMETER | 400 Bad Request | A parameter that specifies the query range has a value outside the allowed range. [Example Cases]
|
DEPRECATED_OPERATION | 400 Bad Request | Request to a deprecated API or resource. [Example Cases]
|
NO_AUTHENTICATION_FOUND | 401 Unauthorized | Authentication info is present in the request but is invalid or the account does not exist. [Example Cases]
|
AUTHENTICATION_FAILED | 401 Unauthorized | No authentication information in the request. [Example Cases]
|
PERMISSION_DENIED | 403 Forbidden | Authenticated but access to the resource is not authorized. [Example Cases]
|
WRONG_ENDPOINT | 404 Not Found | The requested API path does not exist. [Example Cases]
|
NOT_SUPPORTED_CHAIN | 404 Not Found | Request to a service path that is not supported on the requested chain. [Example Cases]
|
RESOURCE_NOT_FOUND | 404 Not Found | The requested resource does not exist on the server. [Example Cases]
|
METHOD_NOT_ALLOWED | 405 Method Not Allowed | Request using a disallowed HTTP method. [Example Cases]
|
TIMEOUT | 408 Request Timeout | The call did not complete within the allowed time, or exceeded the time limit set by the WAS controller. [Example Cases]
|
RESOURCE_ALREADY_EXISTS | 409 Conflict | Duplicate create request for an existing resource. [Example Cases]
|
REJECTED | 409 Conflict | The request was rejected by the server. |
CONTENTS_TOO_LARGE | 413 Payload Too Large | Request payload exceeds the maximum set by the server. |
TOO_LONG_URI | 414 URI Too Long | Client request URI exceeds the maximum length the server can handle. |
TOO_MANY_REQUESTS | 429 Too Many Request | Rate limit exceeded. [Example Cases]
|
EXCEEDED_QUOTA_LIMIT | 429 Too many request | Quota limit exceeded. [Example Cases]
|
INTERNAL_SERVER_ERROR | 500 Internal Server Error | Internal server error. [Example Cases]
|
INTERRUPTED | 500 Internal Server Error | Temporary failure processing a specific client request while handling multiple requests. May indicate server load. |
UNAVAILABLE | 503 Service Unavailable | Server cannot provide the service (e.g. infrastructure down or upgrade with service interruption). |