Responses
The NOBI Labs Staking API standardizes its response structure for consistency and ease of parsing. Below are the descriptions of the fields you'll encounter in each response:
| Field | Type | Values | Description |
|---|---|---|---|
| status | int | 0 or 1 | Reflect request status |
| status_number | string | hex string | Unique error cases for support references |
| status_code | string | General error code | |
| status_message | string | Error message for debugging purpose | |
| message | string | Response summary in human readable format | |
| data | Object or Array | Actual response data from API call |
Success Response Sample
Responses for successful API calls will have a status of 1. The structure of the data payload may be an object or an array, contingent upon the specific endpoint.
Wrapped as Object
{
"status": 1,
"status_number": "",
"status_code": "",
"status_message": "",
"message": "",
"data": {
"flow": {
"network_code": "polygon",
"chain_code": "testnet",
"operation": "unstaking"
}
}
}
Wrapped as Array
{
"status": 1,
"status_number": "",
"status_code": "",
"status_message": "",
"message": "",
"data": [
{
"network_code": "polygon",
"chain_code": "testnet",
"operation": "unstaking"
}
]
}
info
The specific format for the data field is determined by the endpoint being called. Refer to each endpoint's respective sample for precise formatting.
Failed Response Sample
Details
{
"status": 0,
"status_number": "",
"status_code": "",
"status_message": "",
"message": "",
"data": null
}