Validation API
Overview
The Validation REST API provides endpoints for validating a transaction by sending the transaction data and other relevant information. It is secured using a Validation API key found under Settings > API keys in Panorama UI.
Authentication
All endpoints require a valid Validation API key in the X-Api-Key header. API Keys
Endpoints
1. Validate transaction
Validates transaction and provides the signature to use with Cube3 protocol integration ().
URL: api/v1/transaction/validate
Method: POST
Headers:
X-Api-Key: <Validation API key (string)>
accept: application/json
(Specifies that the response format should be in JSON.)Content-Type: application/json
(Specifies the format of the request body, which must be in JSON format.)
Request Body:
Request Body fields description:
transaction.to (
string
): The address to which the transaction is being sent.transaction.from (
string
): The address from which the transaction is being sent.transaction.nonce (
string
): The nonce for the transaction (optional).transaction.data (
string
): Hexadecimal-encoded transaction data, typically used for calling smart contracts (optional).transaction.value (
string
): The value of the transaction in Wei (optional).transaction.chainId (
string
): The ID of the blockchain network. Supported chains: CUBE3 Detect ProductstrackNonce (
boolean
): Indicates whether to track the nonce of the transaction.clientData (
object
): Client data related to the transaction (optional).clientData.userAgent (
string
): The user agent of the client (optional).clientData.ip (
string
): The IP address of the client (optional).signTransaction (
boolean
): Indicates whether the transaction should be signed.
Responses:
200 OK: Returns the validation result response.
400 Bad Request: Invalid input, such as missing required fields or incorrectly formatted data.
401 Unauthorized: Missing or invalid API key
Example request:
Example Response:
Response Body fields description:
valid
(boolean
):Indicates whether the transaction passed the validation.
payload
(String
):This field typically contains a Signature payload to use in transaction.
error
(String
):If any error occurs during the validation, it will be detailed here.
combinedScore
(integer
):Represents the overall risk score for the transaction, with higher values indicating greater risk.
combinedScoreDetails
(object
):Provides a breakdown of the risk score and the factors contributing to it. Fraud, compliance, and cyber risks, with higher values indicating greater overall risk.
value
(integer
): n number measuring cyber risk, with higher values indicating higher threat levels.category
(string
): Specifies the particular type of combined risk identified.subCategory
(string
): Identifies the type of risk.subCategoryDescription
(string
): Providing a detailed explanation of the identified combined risk category, describing the nature and characteristics of the combined risk including the rules that impacted the validation outcome.tagName
,tagDescription
(string
): These fields provide additional categorization and details.
cube3TxId
(string
):The unique identifier for the transaction within the Cube3 system.
2. Update validated transaction
This API is used to update transaction details based on a unique Cube3 transaction ID (cube3TxId
).
URL: /api/v1/transaction/{cube3TxId}
Method: PUT
Headers:
X-Api-Key: <Validation API key (string)>
accept: application/json
(Specifies that the response format should be in JSON.)Content-Type: application/json
(Specifies the format of the request body, which must be in JSON format.)
Request Body:
Request Body fields description:
transactionId (
string
): The unique identifier(hash) of the transaction (required).blockNumber (
string
): The number of the block that contains the transaction (optional).blockTime (
string
): The timestamp of when the block was mined (required, in ISO 8601 format)(optional).
Responses:
200 OK: Indicates the change was accepted
400 Bad Request: Invalid input, such as missing required fields or incorrectly formatted data.
401 Unauthorized: Missing or invalid API key
404 Not Found: The specified
cube3TxId
could not be found.
Example request:
Last updated