Skip to main content

Cloud API

Formance Cloud API (1.0.0)

Download OpenAPI specification:Download

Auth

Check JWT Token

Check JWT Token

Responses

Refresh JWT Token

Refresh JWT Token

Responses

Generate JWT Token

Authenticate by generating a JWT

Request Body schema: application/json
strategy
required
string
token
required
string
serviceSecret
string

Responses

Request samples

Content type
application/json
{
  • "strategy": "string",
  • "token": "string",
  • "serviceSecret": "string"
}

Ledger

Server Info

Show server informations

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

List all accounts

Authorizations:
path Parameters
ledger
required
string

ledger

query Parameters
after
string

pagination cursor, will return accounts after given address (in descending order)

address
string

account address

metadata
string

account address

Responses

Response samples

Content type
application/json
{
  • "cursor": {
    }
}

Count accounts

Authorizations:
path Parameters
ledger
required
string

ledger

query Parameters
after
string

pagination cursor, will return accounts after given address (in descending order)

address
string

account address

metadata
string

metadata

Responses

Get account by address

Authorizations:
path Parameters
ledger
required
string

ledger

accountId
required
string

accountId

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Add metadata to account

Authorizations:
path Parameters
ledger
required
string

ledger

accountId
required
string

accountId

Request Body schema: application/json

metadata

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "property1": null,
  • "property2": null
}

Get mapping

Get ledger mapping

Authorizations:
path Parameters
ledger
required
string

ledger

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Put mapping

Update ledger mapping

Authorizations:
path Parameters
ledger
required
string

ledger

Request Body schema: application/json

mapping

required
Array of objects
Array
account
string
expr
required
object

Responses

Request samples

Content type
application/json
{
  • "contracts": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Execute Numscript

Execute a Numscript and create the transaction if any

Authorizations:
path Parameters
ledger
required
string

ledger

query Parameters
preview
string

Preview mode

Request Body schema: application/json

script

plain
required
string
vars
object

Responses

Request samples

Content type
application/json
{
  • "plain": "string",
  • "vars": { }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "error_code": "INTERNAL",
  • "error_message": "string",
  • "transaction": {
    }
}

Get Stats

Get ledger stats (aggregate metrics on accounts and transactions) The stats for account

Authorizations:
path Parameters
ledger
required
string

ledger

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get all Transactions

Get all ledger transactions

Authorizations:
path Parameters
ledger
required
string

ledger

query Parameters
after
string

pagination cursor, will return transactions after given txid (in descending order)

reference
string

find transactions by reference field

account
string

find transactions with postings involving given account, either as source or destination

Responses

Response samples

Content type
application/json
{
  • "cursor": {
    }
}

Count transactions

Count transactions mathing given criteria

Authorizations:
path Parameters
ledger
required
string

ledger

query Parameters
after
string

pagination cursor, will return transactions after given txid (in descending order)

reference
string

find transactions by reference field

account
string

find transactions with postings involving given account, either as source or destination

Responses

Create Transaction

Create a new ledger transaction Commit a new transaction to the ledger

Authorizations:
path Parameters
ledger
required
string

ledger

query Parameters
preview
string

Preview mode

Request Body schema: application/json

transaction

metadata
object
required
Array of objects
reference
string

Responses

Request samples

Content type
application/json
{
  • "metadata": { },
  • "postings": [
    ],
  • "reference": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create Transactions Batch

Create a new ledger transactions batch Commit a batch of new transactions to the ledger

Authorizations:
path Parameters
ledger
required
string

ledger

Request Body schema: application/json

transactions

required
Array of objects
Array
metadata
object
required
Array of objects
reference
string

Responses

Request samples

Content type
application/json
{
  • "transactions": [
    ]
}

Response samples

Content type
application/json
{
  • "cursor": {
    },
  • "data": [
    ]
}

Get Transaction

Get transaction by transaction id

Authorizations:
path Parameters
ledger
required
string

ledger

txid
required
string

txid

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set Transaction Metadata

Set a new metadata to a ledger transaction by transaction id

Authorizations:
path Parameters
ledger
required
string

ledger

txid
required
string

txid

Request Body schema: application/json

metadata

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "property1": null,
  • "property2": null
}

Revert Transaction

Revert a ledger transaction by transaction id

Authorizations:
path Parameters
ledger
required
string

ledger

txid
required
string

txid

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Search

search

Request Body schema: application/json

the query

ledgers
Array of strings
nextToken
string
size
integer
terms
Array of strings

Responses

Request samples

Content type
application/json
{
  • "ledgers": [
    ],
  • "nextToken": "string",
  • "size": 0,
  • "terms": [
    ]
}

Response samples

Content type
application/json
{
  • "data": { },
  • "kind": "string",
  • "ledger": "string"
}

Reports

Get all headers

Get all headers

path Parameters
idOrganization
required
string

Id of organization

Responses

Create a header

Create header

path Parameters
idOrganization
required
string

Id of organization

Request Body schema: application/json
leftBlock
required
string
rightBlock
string
logoUrl
string
name
required
string

Responses

Request samples

Content type
application/json
{
  • "leftBlock": "string",
  • "rightBlock": "string",
  • "logoUrl": "string",
  • "name": "string"
}

Get a header

Get a header

path Parameters
idOrganization
required
string

Id of organization

idHeader
required
string

Id of header

Responses

Get all reports

Get all reports

path Parameters
idOrganization
required
string

Id of organization

Responses

Create a report

Create report

path Parameters
idOrganization
required
string

Id of organization

Request Body schema: application/json
startDate
required
object
endDate
required
object
resourceId
required
string
kind
required
string
extension
required
string
idHeader
string
leftBlockHeader
string
rightBlockHeader
string
ledger
required
string

Responses

Request samples

Content type
application/json
{
  • "startDate": { },
  • "endDate": { },
  • "resourceId": "string",
  • "kind": "string",
  • "extension": "string",
  • "idHeader": "string",
  • "leftBlockHeader": "string",
  • "rightBlockHeader": "string",
  • "ledger": "string"
}

Get a report

Get a report

path Parameters
idReport
required
string

Id of report

idOrganization
required
string

Id of organization

Responses

Get pre-signed url

Get pre-signed url

path Parameters
idReport
required
string

Id of report

idOrganization
required
string

Id of organization

Responses