A new account for a customer can be created using the POST endpoint: /customers/{customerId}/accounts. .
Create new customer account
post
/customers/{customerId}/accounts
Creates new account for the customer and generates a challenge to be signed in order to create a related blockchain account
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
customerIdstring Β· uuidRequired
Unique customer ID
Header parameters
SignaturestringRequired
HTTP message signature
Signature-InputstringRequired
HTTP message signature input
Idempotency-Keystring Β· uuidRequired
Idempotency key (UUID)
Content-DigeststringRequired
Content digest
Body
typestring Β· enumRequired
Type of the account
Possible values:
currenciesstring[]Required
Currencies of the account, at least one is required (ISO-4217)
Responses
201
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Customer not found
500
Internal error
post
/customers/{customerId}/accounts
Account Entity Updates
Any internal updates to the account entity will be reported through webhook update events. For details on how to set up and manage webhook subscriptions, please refer to Webhooks.
Blockchain Updates
To proceed with account deployment and activation, a challenge issued by the endpoint must be signed and verified (see Blockchain Updates).
Retrieve Account Entities
To retrieve a list of all account entities registered for the programme, make a GET request to /accounts.
Retrieve accounts
get
/accounts
Retrieves accounts' details
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Header parameters
SignaturestringRequired
HTTP message signature
Signature-InputstringRequired
HTTP message signature input
Responses
200
Successful operation
application/json
400
Invalid request
401
Not authorised
500
Internal error
get
/accounts
Retrieve an Individual Customer's Accounts
To retrieve information about an individual customer's accounts, make a GET request to /customers/{customerId}/account with the customer ID as a path parameter.
Retrieve customer accounts
get
/customers/{customerId}/accounts
Retrieves customer's accounts
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
customerIdstring Β· uuidRequired
Unique customer ID
Header parameters
SignaturestringRequired
HTTP message signature
Signature-InputstringRequired
HTTP message signature input
Responses
200
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Customer not found
500
Internal error
get
/customers/{customerId}/accounts
Retrieve an Individual Account
To retrieve information about an individual account, make a GET request to /accounts/{accountId}.
Retrieve account
get
/accounts/{accountId}
Retrieves account's details
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
accountIdstring Β· uuidRequired
Unique account ID
Header parameters
SignaturestringRequired
HTTP message signature
Signature-InputstringRequired
HTTP message signature input
Responses
200
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Account not found
500
Internal error
get
/accounts/{accountId}
Deactivate an Account
To deactivate an account, use a PATCH request to /accounts/{accountId}/deactivate. This action will also deactivate all associated resources, such as cards.
Deactivate account
patch
/accounts/{accountId}/deactivate
Deactivates account and all associated resources
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
accountIdstring Β· uuidRequired
Unique account ID
Header parameters
SignaturestringRequired
HTTP message signature
Signature-InputstringRequired
HTTP message signature input
Idempotency-Keystring Β· uuidRequired
Idempotency key (UUID)
Responses
200
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Account not found
409
Invalid state transition
500
Internal error
patch
/accounts/{accountId}/deactivate
Reactivate an Account
To reactivate a previously deactivated account, use a PATCH request to /accounts/{accountId}/activate.
Activate account
patch
/accounts/{accountId}/activate
Activates account and all associated resources
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
accountIdstring Β· uuidRequired
Unique account ID
Header parameters
SignaturestringRequired
HTTP message signature
Signature-InputstringRequired
HTTP message signature input
Idempotency-Keystring Β· uuidRequired
Idempotency key (UUID)
Responses
200
Successful operation
application/json
400
Invalid request
401
Not authorised
404
Account not found
409
Invalid state transition
500
Internal error
patch
/accounts/{accountId}/activate
Closing an Account
An account can be closed and subsequently removed from the programme using a DELETE request to /account/{accountId}. This will also deactivate all associated resources, including cards, and irreversibly deactivate the smart contract associated with it. All data will be preserved for audit and compliance purposes.
Close account
delete
/accounts/{accountId}
Closes account and generates a challenge to be signed in order to delete related blockchain account
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
GET /v1/customers/{customerId}/accounts HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer YOUR_SECRET_TOKEN
Signature: text
Signature-Input: text
Accept: */*
GET /v1/accounts/{accountId} HTTP/1.1
Host: api.offblocks.xyz
Authorization: Bearer YOUR_SECRET_TOKEN
Signature: text
Signature-Input: text
Accept: */*