Ledger
List of Ledger Configurations
getReturns the list of ledgers for the associated Bearer. This request will include the ledger hash which is required for token generation
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Header: Authorization | Type: String | Required: Yes |
Description:
Bearer {{YOUR_API_ACCESS_TOKEN}} |
Response Fields (Success 200)
| Field | Type | Description |
|---|---|---|
| Field: name | Type: String |
Description:
The Name of the ledger |
| Field: description | Type: String |
Description:
The description of the ledger |
| Field: hash | Type: String |
Description:
The unique hash of the ledger used for future API interactions |
Error Fields (Error 401)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"Unauthenticated". |
Error Fields (Error 403)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"This action is unauthorised". |
Send a Sample Request
Code Examples
Success Response Example
Error Response Example
401-Error-Response:
HTTP/1.1 401 Unauthorised
{
"message": "Unauthenticated."
}
403-Error-Response:
HTTP/1.1 403 Forbidden
{
"message": "This action is unauthorised."
}
Ledger History
getProvides the ledger history for the supplied token
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Header: Authorization | Type: String | Required: Yes |
Description:
Bearer {{YOUR_API_ACCESS_TOKEN}} |
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| Parameter: token | Type: String | Required: Yes |
Description:
The token to be requested from the ledger |
| Parameter: private_token | Type: String | Required: No |
Description:
The private token for the ledger, required if the ledger mandates the use of a private key |
Response Fields (Success 200)
| Field | Type | Description |
|---|---|---|
| Field: data | Type: Object |
Description:
The ledger history for the requested token |
Error Fields (Error 401)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"Unauthenticated". |
Error Fields (Error 403)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"This action is unauthorised". |
Send a Sample Request
Code Examples
Success Response Example
Error Response Example
401-Error-Response:
HTTP/1.1 401 Unauthorised
{
"message": "Unauthenticated."
}
403-Error-Response:
HTTP/1.1 403 Forbidden
{
"message": "This action is unauthorised."
}
422-Error-Response:
HTTP/1.1 422 Unprocessable Entity
{
"message": "The given token was invalid.",
"errors": {
"token": [
"The token field is required."
]
}
}
Tokens
Append additional token metadata
postSubmits a job to append additional json metadata to the specified token
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Header: Authorization | Type: String | Required: Yes |
Description:
Bearer {{YOUR_API_ACCESS_TOKEN}} |
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| Parameter: token | Type: String | Required: Yes |
Description:
The token to be validated |
| Parameter: metadata | Type: Object | Required: No |
Description:
The additional json metadata required to be stored against the token |
Response Fields (Success 200)
| Field | Type | Description |
|---|---|---|
| Field: jobid | Type: String |
Description:
Returns the unique jobId to track the addition of the metadata |
Error Fields (Error 401)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"Unauthenticated". |
Error Fields (Error 403)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"This action is unauthorised". |
Send a Sample Request
Code Examples
Success Response Example
Error Response Example
401-Error-Response:
HTTP/1.1 401 Unauthorised
{
"message": "Unauthenticated."
}
403-Error-Response:
HTTP/1.1 403 Forbidden
{
"message": "This action is unauthorised."
}
422-Error-Response:
HTTP/1.1 422 Unprocessable Entity
{
"message": "The given token was invalid.",
"errors": {
"token": [
"The token field is required."
]
}
}
Token Claim
postSubmits a job to claim the supplied token(s), the claim result will be invoked to the supplied subscription callback handler.
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Header: Authorization | Type: String | Required: Yes |
Description:
Bearer {{YOUR_API_ACCESS_TOKEN}} |
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| Parameter: token | Type: String | Required: Yes |
Description:
The token to be validated |
| Parameter: tokens | Type: Array | Required: No |
Description:
Token array to support multiple token(s) |
| Parameter: private_token | Type: String | Required: No |
Description:
The private token for the subscription, required if the subscription mandates the use of a private key |
Response Fields (Success 200)
| Field | Type | Description |
|---|---|---|
| Field: jobid | Type: String |
Description:
Returns the unique jobId's to track the claiming process for the supplied tokens |
Error Fields (Error 401)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"Unauthenticated". |
Error Fields (Error 403)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"This action is unauthorised". |
Send a Sample Request
Code Examples
Success Response Example
Error Response Example
401-Error-Response:
HTTP/1.1 401 Unauthorised
{
"message": "Unauthenticated."
}
403-Error-Response:
HTTP/1.1 403 Forbidden
{
"message": "This action is unauthorised."
}
422-Error-Response:
HTTP/1.1 422 Unprocessable Entity
{
"message": "The given token was invalid.",
"errors": {
"token": [
"The token field is required."
]
}
}
Token Generation
postSubmits token generation request as per the specified ledger. Optional public metadata, private metadata, and redirect options can be supplied.
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Header: Authorization | Type: String | Required: Yes |
Description:
Bearer {{YOUR_API_ACCESS_TOKEN}} |
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| Parameter: ledgerId | Type: String | Required: Yes |
Description:
The ledger which the token is being generated against |
| Parameter: metadata | Type: Object | Required: No |
Description:
If the ledger supports the storage of metaData the supplied key/value pairs will be stored with the token |
| Parameter: private_metadata | Type: Object | Required: No |
Description:
Unique attributes used to associate the token with the associated real work asset, this data is encrypted within the trusti token |
| Parameter: csr | Type: String | Required: No |
Description:
An optional Certificate signing request can be provided, if supplied this will be used for the certification generation |
| Parameter: redirect_url | Type: String | Required: No |
Description:
An optional URL to redirect the user to when token is validated |
| Parameter: redirect_meta | Type: Object | Required: No |
Description:
Optional JSON metadata to be passed along with the redirect |
Response Fields (Success 200)
| Field | Type | Description |
|---|---|---|
| Field: string | Type: String |
Description:
Returns the unique jobId to track the creation of the requested token |
Error Fields (Error 401)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"Unauthenticated". |
Error Fields (Error 403)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"This action is unauthorised". |
Send a Sample Request
Code Examples
Success Response Example
Error Response Example
401-Error-Response:
HTTP/1.1 401 Unauthorised
{
"message": "Unauthenticated."
}
403-Error-Response:
HTTP/1.1 403 Forbidden
{
"message": "This action is unauthorised."
}
Token Validation
postValidates the supplied token(s) to confirm their current status. The response will return the current claim status and validity of the supplied token(s)
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Header: Authorization | Type: String | Required: Yes |
Description:
Bearer {{YOUR_API_ACCESS_TOKEN}} |
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| Parameter: token | Type: String | Required: Yes |
Description:
The token to be validated |
| Parameter: tokens | Type: Array | Required: No |
Description:
Token array to support multiple token(s) |
| Parameter: private_token | Type: String | Required: No |
Description:
The private token for the subscription, required if the subscription mandates the use of a private key |
| Parameter: private_metadata | Type: Object | Required: No |
Description:
Unique attributes used to associate the token with the associated real work asset, this data is encrypted within the trusti token. Can be supplied for revalidation |
Response Fields (Success 200)
| Field | Type | Description |
|---|---|---|
| Field: data | Type: Object |
Description:
Returns the validity of the token, including the expiry period and the number of remaining claims |
Error Fields (Error 401)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"Unauthenticated". |
Error Fields (Error 403)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"This action is unauthorised". |
Send a Sample Request
Code Examples
Success Response Example
Error Response Example
401-Error-Response:
HTTP/1.1 401 Unauthorised
{
"message": "Unauthenticated."
}
403-Error-Response:
HTTP/1.1 403 Forbidden
{
"message": "This action is unauthorised."
}
422-Error-Response:
HTTP/1.1 422 Unprocessable Entity
{
"message": "The given token was invalid.",
"errors": {
"token": [
"The token field is required."
]
}
}
Token Job Status
getReturns the status of a token job, if the job has been completed the token details will be returned
Header
| Header | Type | Required | Description |
|---|---|---|---|
| Header: Authorization | Type: String | Required: Yes |
Description:
Bearer {{YOUR_API_ACCESS_TOKEN}} |
Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| Parameter: jobId | Type: String | Required: Yes |
Description:
The jobId to be checked |
Response Fields (Success 200)
| Field | Type | Description |
|---|---|---|
| Field: data | Type: Object |
Description:
Returns the job status if the job hasn't completed. If the job has completed the token details will be returned. |
Error Fields (Error 401)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"Unauthenticated". |
Error Fields (Error 403)
| Field | Type | Description |
|---|---|---|
| Field: message | Type: String |
Description:
"This action is unauthorised". |
Error Fields (Error 404)
| Field | Type | Description |
|---|---|---|
| Field: . | Type: String | Description: |
Send a Sample Request
Code Examples
Success Response Example
Error Response Example
401-Error-Response:
HTTP/1.1 401 Unauthorised
{
"message": "Unauthenticated."
}
403-Error-Response:
HTTP/1.1 403 Forbidden
{
"message": "This action is unauthorised."
}
404-Error-Response:
HTTP/1.1 404 Not Found