Retrieve a specific batch

Retrieve detailed information about a specific transaction batch by its unique identifier. This endpoint returns comprehensive batch data including status, signatures, actions, and processing details for blockchain transaction management.

GET

Parameters

Path Parameters

BatchId
REQUIRED
Unique identifier of the transaction batch
Status codeDescription
200Batch details successfully retrieved.
400Bad request error - the request contains invalid parameters or malformed data
500Internal server error - an unexpected error occurred on the server
cURL
curl -L \
"https://blockv-labs.io/batches/{batchId}" \
-H 'Accept: application/json'
Response
{
"id": "string",
"hash": "string",
"prev_hash": "string",
"sender": "SP318Q55DEKHRXJK696033DQN5C54D9K2EE6DHRWP",
"l1_tx_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"l1_block_num": 144000,
"commitment": "string",
"affected_actions": [
{
"id": "string",
"hash": "string"
}
],
"actions_count": 1,
"version": 0,
"signatures": [
{
"id": "string",
"type": "zkproof",
"signer": "string",
"signature": "string",
"tx_hash": "string",
"when_created": "2024-01-01T00:00:00Z"
}
],
"status": "pending",
"error": "Error message",
"when_completed": "2024-01-01T00:00:00Z",
"when_modified": "2024-01-01T00:00:00Z",
"when_created": "2024-01-01T00:00:00Z"
}
json
{
"type": "object",
"description": "Batch entity representing a collection of blockchain transactions processed together",
"required": [
"id",
"hash",
"sender",
"l1_tx_hash",
"l1_block_num",
"commitment",
"affected_actions",
"actions_count",
"version",
"status",
"when_created"
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the batch",
"x-oapi-codegen-extra-tags": {
"bson": "_id",
"json": "id"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-go-type-skip-optional-pointer": true
},
"hash": {
"type": "string",
"description": "Cryptographic hash of the batch content",
"x-oapi-codegen-extra-tags": {
"bson": "hash"
}
},
"prev_hash": {
"type": "string",
"description": "Hash of the previous batch in the sequence",
"x-oapi-codegen-extra-tags": {
"bson": "prev_hash"
},
"x-go-type-skip-optional-pointer": true
},
"sender": {
"type": "string",
"description": "Blockchain address that submitted the batch",
"x-oapi-codegen-extra-tags": {
"bson": "sender"
}
},
"l1_tx_hash": {
"type": "string",
"description": "Transaction hash of the batch on the blockchain",
"x-oapi-codegen-extra-tags": {
"bson": "l1_tx_hash"
}
},
"l1_block_num": {
"type": "integer",
"description": "Block number where the batch was included",
"x-oapi-codegen-extra-tags": {
"bson": "l1_block_num"
}
},
"commitment": {
"type": "string",
"description": "Commitment hash for the batch",
"x-oapi-codegen-extra-tags": {
"bson": "commitment"
},
"x-go-type-skip-optional-pointer": true
},
"affected_actions": {
"type": "array",
"description": "List of action identifiers included in this batch",
"items": {
"type": "object",
"required": [
"id",
"hash"
],
"properties": {
"id": {
"type": "string",
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-oapi-codegen-extra-tags": {
"bson": "id"
}
},
"hash": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "hash"
}
}
}
},
"x-oapi-codegen-extra-tags": {
"bson": "affected_actions"
},
"x-go-type-skip-optional-pointer": true
},
"actions_count": {
"type": "integer",
"description": "Total number of actions processed in this batch",
"x-oapi-codegen-extra-tags": {
"bson": "actions_count"
}
},
"version": {
"type": "integer",
"description": "Version number of the batch format",
"x-oapi-codegen-extra-tags": {
"bson": "version"
}
},
"signatures": {
"type": "array",
"description": "Digital signatures validating the batch",
"items": {
"type": "object",
"required": [
"id",
"type",
"signer",
"signature",
"state_root",
"when_created"
],
"properties": {
"id": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"json": "id"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
},
"x-go-type-skip-optional-pointer": true
},
"type": {
"type": "string",
"enum": [
"zkproof",
"validator"
],
"x-oapi-codegen-extra-tags": {
"bson": "type"
}
},
"signer": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "signer"
}
},
"signature": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "signature"
}
},
"tx_hash": {
"type": "string",
"x-oapi-codegen-extra-tags": {
"bson": "tx_hash"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"x-oapi-codegen-extra-tags": {
"bson": "when_created"
}
}
}
},
"x-oapi-codegen-extra-tags": {
"bson": "signatures"
},
"x-go-type-skip-optional-pointer": true
},
"status": {
"description": "Current processing status of the batch",
"type": "string",
"enum": [
"pending",
"processing",
"completed",
"failed"
],
"x-oapi-codegen-extra-tags": {
"bson": "status",
"json": "status"
}
},
"error": {
"type": "string",
"description": "Error message if batch processing failed",
"x-oapi-codegen-extra-tags": {
"bson": "error"
}
},
"when_completed": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the batch processing was completed",
"x-oapi-codegen-extra-tags": {
"bson": "when_completed"
}
},
"when_modified": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the batch was last modified",
"x-oapi-codegen-extra-tags": {
"bson": "when_modified"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the batch was created",
"x-oapi-codegen-extra-tags": {
"bson": "when_created"
}
}
}
}