Files

15733 lines
396 KiB
JSON

{
"openapi": "3.0.3",
"info": {
"title": "Formance Stack API",
"description": "Open, modular foundation for unique payments flows\n\n# Introduction\nThis API is documented in **OpenAPI format**.\n\n# Authentication\nFormance Stack offers one forms of authentication:\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n<SecurityDefinitions />\n",
"contact": {
"name": "Formance",
"url": "https://www.formance.com",
"email": "[email protected]"
},
"x-logo": {
"url": "https://avatars.githubusercontent.com/u/84325077?s=200&v=4",
"altText": "Formance"
},
"version": "v2.0.0-beta.6"
},
"servers": [
{
"url": "http://localhost",
"description": "local server"
}
],
"security": [
{
"Authorization": []
}
],
"paths": {
"/versions": {
"get": {
"summary": "Show stack version information",
"operationId": "getVersions",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetVersionsResponse"
}
}
}
}
}
}
},
"/api/auth/.well-known/openid-configuration": {
"get": {
"responses": {
"200": {
"description": "OpenID provider configuration.\nSee https://swagger.io/docs/specification/authentication/openid-connect-discovery/ for details\n"
}
}
}
},
"/api/auth/_info": {
"get": {
"summary": "Get server info",
"operationId": "getServerInfo",
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "Server information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerInfo"
}
}
}
}
}
}
},
"/api/auth/clients": {
"get": {
"summary": "List clients",
"tags": [
"Auth",
"Clients"
],
"operationId": "listClients",
"responses": {
"200": {
"description": "List of clients",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListClientsResponse"
}
}
}
}
}
},
"post": {
"summary": "Create client",
"tags": [
"Auth",
"Clients"
],
"operationId": "createClient",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateClientRequest"
}
}
}
},
"responses": {
"201": {
"description": "Client created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateClientResponse"
}
}
}
}
}
}
},
"/api/auth/clients/{clientId}": {
"get": {
"summary": "Read client",
"tags": [
"Auth",
"Clients"
],
"operationId": "readClient",
"parameters": [
{
"description": "Client ID",
"in": "path",
"name": "clientId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Retrieved client",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReadClientResponse"
}
}
}
}
}
},
"put": {
"summary": "Update client",
"tags": [
"Auth",
"Clients"
],
"operationId": "updateClient",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateClientRequest"
}
}
}
},
"parameters": [
{
"description": "Client ID",
"in": "path",
"name": "clientId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Updated client",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateClientResponse"
}
}
}
}
}
},
"delete": {
"summary": "Delete client",
"tags": [
"Auth",
"Clients"
],
"operationId": "deleteClient",
"parameters": [
{
"description": "Client ID",
"in": "path",
"name": "clientId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Client deleted"
}
}
}
},
"/api/auth/clients/{clientId}/secrets": {
"post": {
"summary": "Add a secret to a client",
"tags": [
"Auth",
"Clients"
],
"operationId": "createSecret",
"parameters": [
{
"description": "Client ID",
"in": "path",
"name": "clientId",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateSecretRequest"
}
}
}
},
"responses": {
"200": {
"description": "Created secret",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateSecretResponse"
}
}
}
}
}
}
},
"/api/auth/clients/{clientId}/secrets/{secretId}": {
"delete": {
"summary": "Delete a secret from a client",
"tags": [
"Auth",
"Clients"
],
"operationId": "deleteSecret",
"parameters": [
{
"description": "Client ID",
"in": "path",
"name": "clientId",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Secret ID",
"in": "path",
"name": "secretId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Secret deleted"
}
}
}
},
"/api/auth/users": {
"get": {
"summary": "List users",
"tags": [
"Auth",
"Users"
],
"description": "List users",
"operationId": "listUsers",
"responses": {
"200": {
"description": "List of users",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListUsersResponse"
}
}
}
}
}
}
},
"/api/auth/users/{userId}": {
"get": {
"summary": "Read user",
"tags": [
"Auth",
"Users"
],
"description": "Read user",
"operationId": "readUser",
"parameters": [
{
"description": "User ID",
"in": "path",
"name": "userId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Retrieved user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReadUserResponse"
}
}
}
}
}
}
},
"/api/ledger/_info": {
"get": {
"tags": [
"Ledger",
"Server"
],
"summary": "Show server information",
"operationId": "getInfo",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigInfoResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/_info": {
"get": {
"summary": "Get information about a ledger",
"operationId": "getLedgerInfo",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LedgerInfoResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/accounts": {
"head": {
"summary": "Count the accounts from a ledger",
"operationId": "countAccounts",
"tags": [
"Ledger",
"Accounts"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "query",
"description": "Filter accounts by address pattern (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:.+"
}
},
{
"name": "metadata",
"in": "query",
"description": "Filter accounts by metadata key value pairs. The filter can be used like this metadata[key]=value1&metadata[a.nested.key]=value2",
"style": "deepObject",
"explode": true,
"schema": {
"type": "object",
"additionalProperties": true
},
"example": "metadata[key]=value1&metadata[a.nested.key]=value2"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"Count": {
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
},
"get": {
"summary": "List accounts from a ledger",
"description": "List accounts from a ledger, sorted by address in descending order.",
"operationId": "listAccounts",
"tags": [
"Ledger",
"Accounts"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"default": 15
}
},
{
"name": "page_size",
"x-speakeasy-ignore": true,
"in": "query",
"description": "The maximum number of results to return per page.\nDeprecated, please use `pageSize` instead.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"default": 15
},
"deprecated": true
},
{
"name": "after",
"in": "query",
"description": "Pagination cursor, will return accounts after given address, in descending order.",
"schema": {
"type": "string",
"example": "users:003"
}
},
{
"name": "address",
"in": "query",
"description": "Filter accounts by address pattern (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:.+"
}
},
{
"name": "metadata",
"in": "query",
"description": "Filter accounts by metadata key value pairs. Nested objects can be used as seen in the example below.",
"style": "deepObject",
"explode": true,
"schema": {
"type": "object",
"additionalProperties": true
},
"example": "metadata[key]=value1&metadata[a.nested.key]=value2"
},
{
"name": "balance",
"in": "query",
"description": "Filter accounts by their balance (default operator is gte)",
"schema": {
"type": "integer",
"format": "int64",
"example": 2400
}
},
{
"name": "balanceOperator",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.\n",
"schema": {
"type": "string",
"enum": [
"gte",
"lte",
"gt",
"lt",
"e",
"ne"
],
"example": "gte"
}
},
{
"name": "balance_operator",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Operator used for the filtering of balances can be greater than/equal, less than/equal, greater than, less than, equal or not.\nDeprecated, please use `balanceOperator` instead.\n",
"schema": {
"type": "string",
"enum": [
"gte",
"lte",
"gt",
"lt",
"e",
"ne"
],
"example": "gte"
},
"deprecated": true
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
{
"name": "pagination_token",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\nDeprecated, please use `cursor` instead.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
},
"deprecated": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountsCursorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/accounts/{address}": {
"get": {
"summary": "Get account by its address",
"operationId": "getAccount",
"tags": [
"Ledger",
"Accounts"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "path",
"description": "Exact address of the account. It must match the following regular expressions pattern:\n```\n^\\w+(:\\w+)*$\n```\n",
"required": true,
"schema": {
"type": "string",
"example": "users:001"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/accounts/{address}/metadata": {
"post": {
"summary": "Add metadata to an account",
"operationId": "addMetadataToAccount",
"tags": [
"Ledger",
"Accounts"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "path",
"description": "Exact address of the account. It must match the following regular expressions pattern:\n```\n^\\w+(:\\w+)*$\n```\n",
"required": true,
"schema": {
"type": "string",
"example": "users:001"
}
}
],
"requestBody": {
"description": "metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Metadata1"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "No Content",
"content": {}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/mapping": {
"get": {
"tags": [
"Ledger",
"Mapping"
],
"operationId": "getMapping",
"summary": "Get the mapping of a ledger",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MappingResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
},
"put": {
"tags": [
"Ledger",
"Mapping"
],
"operationId": "updateMapping",
"summary": "Update the mapping of a ledger",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Mapping"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MappingResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/script": {
"post": {
"deprecated": true,
"tags": [
"Ledger",
"Script"
],
"operationId": "runScript",
"summary": "Execute a Numscript",
"description": "This route is deprecated, and has been merged into `POST /{ledger}/transactions`.\n",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "preview",
"in": "query",
"description": "Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker.",
"schema": {
"type": "boolean",
"example": true
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Script"
}
}
}
},
"responses": {
"200": {
"description": "On success, it will return a 200 status code, and the resulting transaction under the `transaction` field.\n\nOn failure, it will also return a 200 status code, and the following fields:\n - `details`: contains a URL. When there is an error parsing Numscript, the result can be difficult to read—the provided URL will render the error in an easy-to-read format.\n - `errorCode` and `error_code` (deprecated): contains the string code of the error\n - `errorMessage` and `error_message` (deprecated): contains a human-readable indication of what went wrong, for example that an account had insufficient funds, or that there was an error in the provided Numscript.\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ScriptResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/stats": {
"get": {
"tags": [
"Ledger",
"Stats"
],
"operationId": "readStats",
"summary": "Get statistics from a ledger",
"description": "Get statistics from a ledger. (aggregate metrics on accounts and transactions)\n",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "name of the ledger",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StatsResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/transactions": {
"head": {
"tags": [
"Ledger",
"Transactions"
],
"summary": "Count the transactions from a ledger",
"operationId": "countTransactions",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "reference",
"in": "query",
"description": "Filter transactions by reference field.",
"schema": {
"type": "string",
"example": "ref:001"
}
},
{
"name": "account",
"in": "query",
"description": "Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "source",
"in": "query",
"description": "Filter transactions with postings involving given account at source (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "destination",
"in": "query",
"description": "Filter transactions with postings involving given account at destination (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "startTime",
"in": "query",
"description": "Filter transactions that occurred after this timestamp.\nThe format is RFC3339 and is inclusive (for example, \"2023-01-02T15:04:01Z\" includes the first second of 4th minute).\n",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "start_time",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Filter transactions that occurred after this timestamp.\nThe format is RFC3339 and is inclusive (for example, \"2023-01-02T15:04:01Z\" includes the first second of 4th minute).\nDeprecated, please use `startTime` instead.\n",
"schema": {
"type": "string",
"format": "date-time"
},
"deprecated": true
},
{
"name": "endTime",
"in": "query",
"description": "Filter transactions that occurred before this timestamp.\nThe format is RFC3339 and is exclusive (for example, \"2023-01-02T15:04:01Z\" excludes the first second of 4th minute).\n",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "end_time",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Filter transactions that occurred before this timestamp.\nThe format is RFC3339 and is exclusive (for example, \"2023-01-02T15:04:01Z\" excludes the first second of 4th minute).\nDeprecated, please use `endTime` instead.\n",
"schema": {
"type": "string",
"format": "date-time"
},
"deprecated": true
},
{
"name": "metadata",
"in": "query",
"description": "Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below.",
"style": "deepObject",
"explode": true,
"schema": {
"type": "object",
"properties": {}
},
"example": "metadata[key]=value1&metadata[a.nested.key]=value2"
}
],
"responses": {
"200": {
"description": "OK",
"headers": {
"Count": {
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
},
"get": {
"tags": [
"Ledger",
"Transactions"
],
"summary": "List transactions from a ledger",
"description": "List transactions from a ledger, sorted by txid in descending order.",
"operationId": "listTransactions",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"default": 15
}
},
{
"name": "page_size",
"x-speakeasy-ignore": true,
"in": "query",
"description": "The maximum number of results to return per page.\nDeprecated, please use `pageSize` instead.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"default": 15
},
"deprecated": true
},
{
"name": "after",
"in": "query",
"description": "Pagination cursor, will return transactions after given txid (in descending order).",
"schema": {
"type": "string",
"example": 1234
}
},
{
"name": "reference",
"in": "query",
"description": "Find transactions by reference field.",
"schema": {
"type": "string",
"example": "ref:001"
}
},
{
"name": "account",
"in": "query",
"description": "Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "source",
"in": "query",
"description": "Filter transactions with postings involving given account at source (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "destination",
"in": "query",
"description": "Filter transactions with postings involving given account at destination (regular expression placed between ^ and $).",
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "startTime",
"in": "query",
"description": "Filter transactions that occurred after this timestamp.\nThe format is RFC3339 and is inclusive (for example, \"2023-01-02T15:04:01Z\" includes the first second of 4th minute).\n",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "start_time",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Filter transactions that occurred after this timestamp.\nThe format is RFC3339 and is inclusive (for example, \"2023-01-02T15:04:01Z\" includes the first second of 4th minute).\nDeprecated, please use `startTime` instead.\n",
"schema": {
"type": "string",
"format": "date-time"
},
"deprecated": true
},
{
"name": "endTime",
"in": "query",
"description": "Filter transactions that occurred before this timestamp.\nThe format is RFC3339 and is exclusive (for example, \"2023-01-02T15:04:01Z\" excludes the first second of 4th minute).\n",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "end_time",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Filter transactions that occurred before this timestamp.\nThe format is RFC3339 and is exclusive (for example, \"2023-01-02T15:04:01Z\" excludes the first second of 4th minute).\nDeprecated, please use `endTime` instead.\n",
"schema": {
"type": "string",
"format": "date-time"
},
"deprecated": true
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
{
"name": "pagination_token",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\nDeprecated, please use `cursor` instead.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
},
"deprecated": true
},
{
"name": "metadata",
"in": "query",
"description": "Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below.",
"style": "deepObject",
"explode": true,
"schema": {
"type": "object",
"additionalProperties": true
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionsCursorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
},
"post": {
"tags": [
"Ledger",
"Transactions"
],
"summary": "Create a new transaction to a ledger",
"operationId": "createTransaction",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "preview",
"in": "query",
"description": "Set the preview mode. Preview mode doesn't add the logs to the database or publish a message to the message broker.",
"schema": {
"type": "boolean",
"example": true
}
}
],
"requestBody": {
"required": true,
"description": "The request body must contain at least one of the following objects:\n - `postings`: suitable for simple transactions\n - `script`: enabling more complex transactions with Numscript\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostTransaction"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionsResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/transactions/{txid}": {
"get": {
"tags": [
"Ledger",
"Transactions"
],
"summary": "Get transaction from a ledger by its ID",
"operationId": "getTransaction",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "txid",
"in": "path",
"description": "Transaction ID.",
"required": true,
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/transactions/{txid}/metadata": {
"post": {
"tags": [
"Ledger",
"Transactions"
],
"summary": "Set the metadata of a transaction by its ID",
"operationId": "addMetadataOnTransaction",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "txid",
"in": "path",
"description": "Transaction ID.",
"required": true,
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
}
}
],
"requestBody": {
"description": "metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Metadata1"
}
}
}
},
"responses": {
"204": {
"description": "No Content",
"content": {}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/transactions/{txid}/revert": {
"post": {
"tags": [
"Ledger",
"Transactions"
],
"operationId": "revertTransaction",
"summary": "Revert a ledger transaction by its ID",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "txid",
"in": "path",
"description": "Transaction ID.",
"required": true,
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
}
},
{
"name": "disableChecks",
"in": "query",
"description": "Allow to disable balances checks",
"required": false,
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/transactions/batch": {
"post": {
"tags": [
"Ledger",
"Transactions"
],
"summary": "Create a new batch of transactions to a ledger",
"operationId": "CreateTransactions",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Transactions"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionsResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/balances": {
"get": {
"tags": [
"Ledger",
"Balances"
],
"summary": "Get the balances from a ledger's account",
"operationId": "getBalances",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "query",
"description": "Filter balances involving given account, either as source or destination.",
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "after",
"in": "query",
"description": "Pagination cursor, will return accounts after given address, in descending order.",
"schema": {
"type": "string",
"example": "users:003"
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
{
"name": "pagination_token",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Parameter used in pagination requests.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nDeprecated, please use `cursor` instead.",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
},
"deprecated": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BalancesCursorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/aggregate/balances": {
"get": {
"tags": [
"Ledger",
"Balances"
],
"summary": "Get the aggregated balances from selected accounts",
"operationId": "getBalancesAggregated",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "query",
"description": "Filter balances involving given account, either as source or destination.",
"schema": {
"type": "string",
"example": "users:001"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AggregateBalancesResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/{ledger}/logs": {
"get": {
"tags": [
"Ledger",
"Logs"
],
"summary": "List the logs from a ledger",
"description": "List the logs from a ledger, sorted by ID in descending order.",
"operationId": "listLogs",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"default": 15
}
},
{
"name": "page_size",
"x-speakeasy-ignore": true,
"in": "query",
"description": "The maximum number of results to return per page.\nDeprecated, please use `pageSize` instead.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"default": 15
},
"deprecated": true
},
{
"name": "after",
"in": "query",
"description": "Pagination cursor, will return the logs after a given ID. (in descending order).",
"schema": {
"type": "string",
"example": 1234
}
},
{
"name": "startTime",
"in": "query",
"description": "Filter transactions that occurred after this timestamp.\nThe format is RFC3339 and is inclusive (for example, \"2023-01-02T15:04:01Z\" includes the first second of 4th minute).\n",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "start_time",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Filter transactions that occurred after this timestamp.\nThe format is RFC3339 and is inclusive (for example, \"2023-01-02T15:04:01Z\" includes the first second of 4th minute).\nDeprecated, please use `startTime` instead.\n",
"schema": {
"type": "string",
"format": "date-time"
},
"deprecated": true
},
{
"name": "endTime",
"in": "query",
"description": "Filter transactions that occurred before this timestamp.\nThe format is RFC3339 and is exclusive (for example, \"2023-01-02T15:04:01Z\" excludes the first second of 4th minute).\n",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "end_time",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Filter transactions that occurred before this timestamp.\nThe format is RFC3339 and is exclusive (for example, \"2023-01-02T15:04:01Z\" excludes the first second of 4th minute).\nDeprecated, please use `endTime` instead.\n",
"schema": {
"type": "string",
"format": "date-time"
},
"deprecated": true
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
{
"name": "pagination_token",
"x-speakeasy-ignore": true,
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\nDeprecated, please use `cursor` instead.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
},
"deprecated": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LogsCursorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/_info": {
"get": {
"tags": [
"Ledger"
],
"summary": "Show server information",
"operationId": "v2GetInfo",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ConfigInfoResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2": {
"get": {
"summary": "List ledgers",
"operationId": "v2ListLedgers",
"parameters": [
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
}
],
"tags": [
"Ledger"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LedgerListResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}": {
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"get": {
"summary": "Get a ledger",
"operationId": "v2GetLedger",
"tags": [
"Ledger"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2Ledger"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
},
"post": {
"summary": "Create a ledger",
"operationId": "v2CreateLedger",
"tags": [
"Ledger"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2CreateLedgerRequest"
}
}
}
},
"responses": {
"204": {
"description": "OK"
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/_info": {
"get": {
"summary": "Get information about a ledger",
"operationId": "v2GetLedgerInfo",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LedgerInfoResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/_bulk": {
"post": {
"x-speakeasy-errors": {
"override": true,
"statusCodes": [
"5XX"
]
},
"summary": "Bulk request",
"operationId": "v2CreateBulk",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2Bulk"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2BulkResponse"
}
}
}
},
"400": {
"description": "Failure",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2BulkResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/accounts": {
"head": {
"summary": "Count the accounts from a ledger",
"operationId": "v2CountAccounts",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"responses": {
"204": {
"description": "OK",
"headers": {
"Count": {
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
},
"get": {
"summary": "List accounts from a ledger",
"description": "List accounts from a ledger, sorted by address in descending order.",
"operationId": "v2ListAccounts",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
{
"name": "expand",
"in": "query",
"schema": {
"type": "string",
"items": {
"type": "string"
}
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2AccountsCursorResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/accounts/{address}": {
"get": {
"summary": "Get account by its address",
"operationId": "v2GetAccount",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "path",
"description": "Exact address of the account. It must match the following regular expressions pattern:\n```\n^\\w+(:\\w+)*$\n```\n",
"required": true,
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "expand",
"in": "query",
"schema": {
"type": "string",
"items": {
"type": "string"
}
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2AccountResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/accounts/{address}/metadata": {
"post": {
"summary": "Add metadata to an account",
"operationId": "v2AddMetadataToAccount",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "path",
"description": "Exact address of the account. It must match the following regular expressions pattern:\n```\n^\\w+(:\\w+)*$\n```\n",
"required": true,
"schema": {
"type": "string",
"example": "users:001"
}
},
{
"name": "dryRun",
"in": "query",
"description": "Set the dry run mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker.",
"schema": {
"type": "boolean",
"example": true
}
},
{
"name": "Idempotency-Key",
"in": "header",
"description": "Use an idempotency key",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2Metadata"
}
}
},
"required": true
},
"responses": {
"204": {
"description": "No Content",
"content": {}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/accounts/{address}/metadata/{key}": {
"delete": {
"description": "Delete metadata by key",
"operationId": "v2DeleteAccountMetadata",
"tags": [
"Ledger"
],
"summary": "Delete metadata by key",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "address",
"in": "path",
"description": "Account address",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "key",
"in": "path",
"description": "The key to remove.",
"required": true,
"schema": {
"type": "string",
"example": "foo"
}
}
],
"responses": {
"2XX": {
"description": "Key deleted",
"content": {}
}
}
}
},
"/api/ledger/v2/{ledger}/stats": {
"get": {
"tags": [
"Ledger"
],
"operationId": "v2ReadStats",
"summary": "Get statistics from a ledger",
"description": "Get statistics from a ledger. (aggregate metrics on accounts and transactions)\n",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "name of the ledger",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2StatsResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/transactions": {
"head": {
"tags": [
"Ledger"
],
"summary": "Count the transactions from a ledger",
"operationId": "v2CountTransactions",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"responses": {
"204": {
"description": "OK",
"headers": {
"Count": {
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
},
"get": {
"tags": [
"Ledger"
],
"summary": "List transactions from a ledger",
"description": "List transactions from a ledger, sorted by id in descending order.",
"operationId": "v2ListTransactions",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
{
"name": "expand",
"in": "query",
"schema": {
"type": "string",
"items": {
"type": "string"
}
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2TransactionsCursorResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
},
"post": {
"tags": [
"Ledger"
],
"summary": "Create a new transaction to a ledger",
"operationId": "v2CreateTransaction",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "dryRun",
"in": "query",
"description": "Set the dryRun mode. dry run mode doesn't add the logs to the database or publish a message to the message broker.",
"schema": {
"type": "boolean",
"example": true
}
},
{
"name": "Idempotency-Key",
"in": "header",
"description": "Use an idempotency key",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"description": "The request body must contain at least one of the following objects:\n - `postings`: suitable for simple transactions\n - `script`: enabling more complex transactions with Numscript\n",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2PostTransaction"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2CreateTransactionResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/transactions/{id}": {
"get": {
"tags": [
"Ledger"
],
"summary": "Get transaction from a ledger by its ID",
"operationId": "v2GetTransaction",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "id",
"in": "path",
"description": "Transaction ID.",
"required": true,
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
}
},
{
"name": "expand",
"in": "query",
"schema": {
"type": "string",
"items": {
"type": "string"
}
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2GetTransactionResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/transactions/{id}/metadata": {
"post": {
"tags": [
"Ledger"
],
"summary": "Set the metadata of a transaction by its ID",
"operationId": "v2AddMetadataOnTransaction",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "id",
"in": "path",
"description": "Transaction ID.",
"required": true,
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
}
},
{
"name": "dryRun",
"in": "query",
"description": "Set the dryRun mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker.",
"schema": {
"type": "boolean",
"example": true
}
},
{
"name": "Idempotency-Key",
"in": "header",
"description": "Use an idempotency key",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "metadata",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2Metadata"
}
}
}
},
"responses": {
"204": {
"description": "No Content",
"content": {}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/transactions/{id}/metadata/{key}": {
"delete": {
"description": "Delete metadata by key",
"operationId": "v2DeleteTransactionMetadata",
"summary": "Delete metadata by key",
"tags": [
"Ledger"
],
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "id",
"in": "path",
"description": "Transaction ID.",
"required": true,
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
}
},
{
"name": "key",
"in": "path",
"required": true,
"description": "The key to remove.",
"schema": {
"type": "string",
"example": "foo"
}
}
],
"responses": {
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"2XX": {
"description": "Key deleted",
"content": {}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/transactions/{id}/revert": {
"post": {
"tags": [
"Ledger"
],
"operationId": "v2RevertTransaction",
"summary": "Revert a ledger transaction by its ID",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "id",
"in": "path",
"description": "Transaction ID.",
"required": true,
"schema": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
}
},
{
"name": "force",
"in": "query",
"description": "Force revert",
"required": false,
"schema": {
"type": "boolean"
}
}
],
"responses": {
"201": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2RevertTransactionResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/aggregate/balances": {
"get": {
"tags": [
"Ledger"
],
"summary": "Get the aggregated balances from selected accounts",
"operationId": "v2GetBalancesAggregated",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2AggregateBalancesResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/ledger/v2/{ledger}/logs": {
"get": {
"tags": [
"Ledger"
],
"summary": "List the logs from a ledger",
"description": "List the logs from a ledger, sorted by ID in descending order.",
"operationId": "v2ListLogs",
"parameters": [
{
"name": "ledger",
"in": "path",
"description": "Name of the ledger.",
"required": true,
"schema": {
"type": "string",
"example": "ledger001"
}
},
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
{
"name": "pit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LogsCursorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ErrorResponse"
}
}
}
}
}
}
},
"/api/payments/_info": {
"get": {
"summary": "Get server info",
"operationId": "paymentsgetServerInfo",
"tags": [
"Payments"
],
"responses": {
"200": {
"$ref": "#/components/responses/ServerInfo"
}
}
}
},
"/api/payments/payments": {
"post": {
"summary": "Create a payment",
"tags": [
"Payments"
],
"operationId": "createPayment",
"description": "Create a payment",
"requestBody": {
"$ref": "#/components/requestBodies/Payment"
},
"responses": {
"200": {
"$ref": "#/components/responses/Payment"
}
}
},
"get": {
"summary": "List payments",
"operationId": "listPayments",
"tags": [
"Payments"
],
"parameters": [
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
},
{
"$ref": "#/components/parameters/Sort"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Payments"
}
}
}
},
"/api/payments/payments/{paymentId}": {
"get": {
"summary": "Get a payment",
"tags": [
"Payments"
],
"operationId": "getPayment",
"parameters": [
{
"$ref": "#/components/parameters/PaymentId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Payment"
}
}
}
},
"/api/payments/payments/{paymentId}/metadata": {
"patch": {
"summary": "Update metadata",
"tags": [
"Payments"
],
"operationId": "updateMetadata",
"parameters": [
{
"$ref": "#/components/parameters/PaymentId"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/UpdateMetadata"
},
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/transfer-initiations": {
"get": {
"summary": "List Transfer Initiations",
"operationId": "listTransferInitiations",
"tags": [
"Payments"
],
"parameters": [
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
},
{
"$ref": "#/components/parameters/Sort"
},
{
"$ref": "#/components/parameters/Query"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/TransferInitiations"
}
}
},
"post": {
"summary": "Create a TransferInitiation",
"tags": [
"Payments"
],
"operationId": "createTransferInitiation",
"description": "Create a transfer initiation",
"requestBody": {
"$ref": "#/components/requestBodies/TransferInitiation"
},
"responses": {
"200": {
"$ref": "#/components/responses/TransferInitiation"
}
}
}
},
"/api/payments/transfer-initiations/{transferId}": {
"get": {
"summary": "Get a transfer initiation",
"tags": [
"Payments"
],
"operationId": "getTransferInitiation",
"parameters": [
{
"$ref": "#/components/parameters/TransferId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/TransferInitiation"
}
}
},
"delete": {
"summary": "Delete a transfer initiation",
"operationId": "deleteTransferInitiation",
"tags": [
"Payments"
],
"description": "Delete a transfer initiation by its id.",
"parameters": [
{
"$ref": "#/components/parameters/TransferId"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/transfer-initiations/{transferId}/status": {
"post": {
"summary": "Update the status of a transfer initiation",
"tags": [
"Payments"
],
"operationId": "udpateTransferInitiationStatus",
"description": "Update a transfer initiation status",
"parameters": [
{
"$ref": "#/components/parameters/TransferId"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/UpdateTransferInitiationStatus"
},
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/transfer-initiations/{transferId}/retry": {
"post": {
"summary": "Retry a failed transfer initiation",
"tags": [
"Payments"
],
"operationId": "retryTransferInitiation",
"description": "Retry a failed transfer initiation",
"parameters": [
{
"$ref": "#/components/parameters/TransferId"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/pools": {
"get": {
"summary": "List Pools",
"operationId": "listPools",
"tags": [
"Payments"
],
"parameters": [
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
},
{
"$ref": "#/components/parameters/Sort"
},
{
"$ref": "#/components/parameters/Query"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Pools"
}
}
},
"post": {
"summary": "Create a Pool",
"tags": [
"Payments"
],
"operationId": "createPool",
"description": "Create a Pool",
"requestBody": {
"$ref": "#/components/requestBodies/Pool"
},
"responses": {
"200": {
"$ref": "#/components/responses/Pool"
}
}
}
},
"/api/payments/pools/{poolId}": {
"get": {
"summary": "Get a Pool",
"tags": [
"Payments"
],
"operationId": "getPool",
"parameters": [
{
"$ref": "#/components/parameters/PoolId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Pool"
}
}
},
"delete": {
"summary": "Delete a Pool",
"operationId": "deletePool",
"tags": [
"Payments"
],
"description": "Delete a pool by its id.",
"parameters": [
{
"$ref": "#/components/parameters/PoolId"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/pools/{poolId}/accounts": {
"post": {
"summary": "Add an account to a pool",
"tags": [
"Payments"
],
"operationId": "addAccountToPool",
"description": "Add an account to a pool",
"parameters": [
{
"$ref": "#/components/parameters/PoolId"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/AddAccountToPool"
},
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/pools/{poolId}/accounts/{accountId}": {
"delete": {
"summary": "Remove an account from a pool",
"operationId": "removeAccountFromPool",
"tags": [
"Payments"
],
"description": "Remove an account from a pool by its id.",
"parameters": [
{
"$ref": "#/components/parameters/PoolId"
},
{
"$ref": "#/components/parameters/AccountId"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/pools/{poolId}/balances": {
"get": {
"summary": "Get pool balances",
"operationId": "getPoolBalances",
"tags": [
"Payments"
],
"parameters": [
{
"$ref": "#/components/parameters/PoolId"
},
{
"name": "at",
"in": "query",
"description": "Filter balances by date.\n",
"required": true,
"schema": {
"type": "string",
"format": "date-time"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/PoolBalances"
}
}
}
},
"/api/payments/accounts": {
"get": {
"summary": "List accounts",
"operationId": "paymentslistAccounts",
"tags": [
"Payments"
],
"parameters": [
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
},
{
"$ref": "#/components/parameters/Sort"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Accounts"
}
}
}
},
"/api/payments/accounts/{accountId}": {
"get": {
"summary": "Get an account",
"tags": [
"Payments"
],
"operationId": "paymentsgetAccount",
"parameters": [
{
"$ref": "#/components/parameters/AccountId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Account"
}
}
}
},
"/api/payments/accounts/{accountId}/balances": {
"get": {
"summary": "Get account balances",
"operationId": "getAccountBalances",
"tags": [
"Payments"
],
"parameters": [
{
"$ref": "#/components/parameters/AccountId"
},
{
"name": "limit",
"in": "query",
"description": "The maximum number of results to return per page.",
"required": false,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "asset",
"in": "query",
"description": "Filter balances by currency.\nIf not specified, all account's balances will be returned.\n",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "from",
"in": "query",
"description": "Filter balances by date.\nIf not specified, all account's balances will be returned.\n",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "to",
"in": "query",
"description": "Filter balances by date.\nIf not specified, default will be set to now.\n",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
},
{
"$ref": "#/components/parameters/Sort"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/AccountBalances"
}
}
}
},
"/api/payments/bank-accounts": {
"post": {
"summary": "Create a BankAccount in Payments and on the PSP",
"tags": [
"Payments"
],
"operationId": "createBankAccount",
"description": "Create a bank account in Payments and on the PSP.",
"requestBody": {
"$ref": "#/components/requestBodies/BankAccount"
},
"responses": {
"200": {
"$ref": "#/components/responses/BankAccount"
}
}
},
"get": {
"summary": "List bank accounts created by user on Formance",
"operationId": "listBankAccounts",
"tags": [
"Payments"
],
"parameters": [
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
},
{
"$ref": "#/components/parameters/Sort"
}
],
"description": "List all bank accounts created by user on Formance.",
"responses": {
"200": {
"$ref": "#/components/responses/BankAccounts"
}
}
}
},
"/api/payments/bank-accounts/{bankAccountId}": {
"get": {
"summary": "Get a bank account created by user on Formance",
"tags": [
"Payments"
],
"operationId": "getBankAccount",
"parameters": [
{
"$ref": "#/components/parameters/BankAccountId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/BankAccount"
}
}
}
},
"/api/payments/connectors": {
"get": {
"summary": "List all installed connectors",
"operationId": "listAllConnectors",
"tags": [
"Payments"
],
"description": "List all installed connectors.",
"responses": {
"200": {
"$ref": "#/components/responses/Connectors"
}
}
}
},
"/api/payments/connectors/configs": {
"get": {
"summary": "List the configs of each available connector",
"operationId": "listConfigsAvailableConnectors",
"tags": [
"Payments"
],
"description": "List the configs of each available connector.",
"responses": {
"200": {
"$ref": "#/components/responses/ConnectorsConfigs"
}
}
}
},
"/api/payments/connectors/{connector}": {
"post": {
"summary": "Install a connector",
"tags": [
"Payments"
],
"operationId": "installConnector",
"description": "Install a connector by its name and config.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/ConnectorConfig"
},
"responses": {
"201": {
"$ref": "#/components/responses/ConnectorInstalled"
}
}
},
"delete": {
"summary": "Uninstall a connector",
"deprecated": true,
"operationId": "uninstallConnector",
"tags": [
"Payments"
],
"description": "Uninstall a connector by its name.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/connectors/{connector}/{connectorId}": {
"delete": {
"summary": "Uninstall a connector",
"operationId": "uninstallConnectorV1",
"tags": [
"Payments"
],
"description": "Uninstall a connector by its name.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/ConnectorID"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/connectors/{connector}/config": {
"get": {
"summary": "Read the config of a connector",
"deprecated": true,
"operationId": "readConnectorConfig",
"tags": [
"Payments"
],
"description": "Read connector config",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/ConnectorConfig"
}
}
}
},
"/api/payments/connectors/{connector}/{connectorId}/config": {
"post": {
"summary": "Update the config of a connector",
"operationId": "updateConnectorConfigV1",
"tags": [
"Payments"
],
"description": "Update connector config",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/ConnectorID"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/ConnectorConfig"
},
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
},
"get": {
"summary": "Read the config of a connector",
"operationId": "readConnectorConfigV1",
"tags": [
"Payments"
],
"description": "Read connector config",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/ConnectorID"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/ConnectorConfig"
}
}
}
},
"/api/payments/connectors/{connector}/reset": {
"post": {
"summary": "Reset a connector",
"deprecated": true,
"operationId": "resetConnector",
"tags": [
"Payments"
],
"description": "Reset a connector by its name.\nIt will remove the connector and ALL PAYMENTS generated with it.\n",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/connectors/{connector}/{connectorId}/reset": {
"post": {
"summary": "Reset a connector",
"operationId": "resetConnectorV1",
"tags": [
"Payments"
],
"description": "Reset a connector by its name.\nIt will remove the connector and ALL PAYMENTS generated with it.\n",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/ConnectorID"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
}
}
}
},
"/api/payments/connectors/{connector}/tasks": {
"get": {
"summary": "List tasks from a connector",
"deprecated": true,
"tags": [
"Payments"
],
"operationId": "listConnectorTasks",
"description": "List all tasks associated with this connector.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Tasks"
}
}
}
},
"/api/payments/connectors/{connector}/{connectorId}/tasks": {
"get": {
"summary": "List tasks from a connector",
"tags": [
"Payments"
],
"operationId": "listConnectorTasksV1",
"description": "List all tasks associated with this connector.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/ConnectorID"
},
{
"$ref": "#/components/parameters/PageSize"
},
{
"$ref": "#/components/parameters/Cursor"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Tasks"
}
}
}
},
"/api/payments/connectors/{connector}/tasks/{taskId}": {
"get": {
"summary": "Read a specific task of the connector",
"deprecated": true,
"tags": [
"Payments"
],
"operationId": "getConnectorTask",
"description": "Get a specific task associated to the connector.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/TaskId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Task"
}
}
}
},
"/api/payments/connectors/{connector}/{connectorId}/tasks/{taskId}": {
"get": {
"summary": "Read a specific task of the connector",
"tags": [
"Payments"
],
"operationId": "getConnectorTaskV1",
"description": "Get a specific task associated to the connector.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
},
{
"$ref": "#/components/parameters/ConnectorID"
},
{
"$ref": "#/components/parameters/TaskId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Task"
}
}
}
},
"/api/payments/connectors/{connector}/transfers": {
"post": {
"summary": "Transfer funds between Connector accounts",
"tags": [
"Payments"
],
"operationId": "connectorsTransfer",
"description": "Execute a transfer between two accounts.",
"parameters": [
{
"$ref": "#/components/parameters/Connector"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/Transfer"
},
"responses": {
"200": {
"$ref": "#/components/responses/Transfer"
}
}
}
},
"/api/search/_info": {
"get": {
"summary": "Get server info",
"operationId": "searchgetServerInfo",
"tags": [
"Search"
],
"responses": {
"200": {
"description": "Server information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerInfo"
}
}
}
}
}
}
},
"/api/search/": {
"post": {
"summary": "Search",
"tags": [
"Search"
],
"operationId": "search",
"description": "ElasticSearch query engine",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Query"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"default": {
"description": "Error",
"content": {}
}
}
}
},
"/api/webhooks/configs": {
"get": {
"summary": "Get many configs",
"description": "Sorted by updated date descending",
"operationId": "getManyConfigs",
"tags": [
"Webhooks"
],
"parameters": [
{
"name": "id",
"in": "query",
"description": "Optional filter by Config ID",
"required": false,
"schema": {
"type": "string",
"example": "4997257d-dfb6-445b-929c-cbe2ab182818"
}
},
{
"name": "endpoint",
"in": "query",
"description": "Optional filter by endpoint URL",
"required": false,
"schema": {
"type": "string",
"example": "https://example.com"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigsResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
}
}
},
"post": {
"summary": "Insert a new config",
"description": "Insert a new webhooks config.\n\nThe endpoint should be a valid https URL and be unique.\n\nThe secret is the endpoint's verification secret.\nIf not passed or empty, a secret is automatically generated.\nThe format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)\n\nAll eventTypes are converted to lower-case when inserted.\n",
"operationId": "insertConfig",
"tags": [
"Webhooks"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigUser"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Config created successfully.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
}
}
}
},
"/api/webhooks/configs/{id}": {
"delete": {
"summary": "Delete one config",
"description": "Delete a webhooks config by ID.",
"operationId": "deleteConfig",
"tags": [
"Webhooks"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Config ID",
"required": true,
"schema": {
"type": "string",
"example": "4997257d-dfb6-445b-929c-cbe2ab182818"
}
}
],
"responses": {
"200": {
"description": "Config successfully deleted."
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
}
}
}
},
"/api/webhooks/configs/{id}/test": {
"get": {
"summary": "Test one config",
"description": "Test a config by sending a webhook to its endpoint.",
"operationId": "testConfig",
"tags": [
"Webhooks"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Config ID",
"required": true,
"schema": {
"type": "string",
"example": "4997257d-dfb6-445b-929c-cbe2ab182818"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AttemptResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
}
}
}
},
"/api/webhooks/configs/{id}/activate": {
"put": {
"summary": "Activate one config",
"description": "Activate a webhooks config by ID, to start receiving webhooks to its endpoint.",
"operationId": "activateConfig",
"tags": [
"Webhooks"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Config ID",
"required": true,
"schema": {
"type": "string",
"example": "4997257d-dfb6-445b-929c-cbe2ab182818"
}
}
],
"responses": {
"200": {
"description": "Config successfully activated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
}
}
}
},
"/api/webhooks/configs/{id}/deactivate": {
"put": {
"summary": "Deactivate one config",
"description": "Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint.",
"operationId": "deactivateConfig",
"tags": [
"Webhooks"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "Config ID",
"required": true,
"schema": {
"type": "string",
"example": "4997257d-dfb6-445b-929c-cbe2ab182818"
}
}
],
"responses": {
"200": {
"description": "Config successfully deactivated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigResponse"
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
}
}
}
},
"/api/webhooks/configs/{id}/secret/change": {
"put": {
"summary": "Change the signing secret of a config",
"description": "Change the signing secret of the endpoint of a webhooks config.\n\nIf not passed or empty, a secret is automatically generated.\nThe format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)\n",
"operationId": "changeConfigSecret",
"tags": [
"Webhooks"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigChangeSecret"
}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "Config ID",
"required": true,
"schema": {
"type": "string",
"example": "4997257d-dfb6-445b-929c-cbe2ab182818"
}
}
],
"responses": {
"200": {
"description": "Secret successfully changed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfigResponse"
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/webhooksErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/_info": {
"get": {
"summary": "Get server info",
"operationId": "walletsgetServerInfo",
"tags": [
"Wallets"
],
"responses": {
"200": {
"description": "Server information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerInfo"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/transactions": {
"get": {
"operationId": "getTransactions",
"parameters": [
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page",
"example": 100,
"schema": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"default": 15
}
},
{
"name": "walletID",
"in": "query",
"description": "A wallet ID to filter on",
"example": "wallet1",
"schema": {
"type": "string"
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when the cursor is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
}
],
"tags": [
"Wallets"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetTransactionsResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/wallets": {
"get": {
"summary": "List all wallets",
"operationId": "listWallets",
"parameters": [
{
"name": "name",
"in": "query",
"description": "Filter on wallet name",
"example": "wallet1",
"schema": {
"type": "string"
}
},
{
"name": "metadata",
"in": "query",
"description": "Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below.",
"style": "deepObject",
"explode": true,
"schema": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "string"
}
},
"example": {
"admin": "true"
}
},
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page",
"example": 100,
"schema": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"default": 15
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when the pagination token is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
}
],
"tags": [
"Wallets"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListWalletsResponse"
}
}
}
},
"default": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
},
"post": {
"summary": "Create a new wallet",
"operationId": "createWallet",
"tags": [
"Wallets"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateWalletRequest"
}
}
}
},
"responses": {
"201": {
"description": "Wallet created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateWalletResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/wallets/{id}": {
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"get": {
"summary": "Get a wallet",
"operationId": "getWallet",
"tags": [
"Wallets"
],
"responses": {
"200": {
"description": "Wallet",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetWalletResponse"
}
}
}
},
"404": {
"description": "Wallet not found"
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
},
"patch": {
"summary": "Update a wallet",
"operationId": "updateWallet",
"tags": [
"Wallets"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"metadata"
],
"properties": {
"metadata": {
"type": "object",
"description": "Custom metadata to attach to this wallet.",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"responses": {
"204": {
"description": "Wallet successfully updated"
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/wallets/{id}/summary": {
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"get": {
"summary": "Get wallet summary",
"operationId": "getWalletSummary",
"tags": [
"Wallets"
],
"responses": {
"200": {
"description": "Wallet summary",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetWalletSummaryResponse"
}
}
}
},
"404": {
"description": "Wallet not found"
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/wallets/{id}/balances": {
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"get": {
"summary": "List balances of a wallet",
"operationId": "listBalances",
"tags": [
"Wallets"
],
"responses": {
"200": {
"description": "Balances list",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListBalancesResponse"
}
}
}
}
}
},
"post": {
"summary": "Create a balance",
"operationId": "createBalance",
"tags": [
"Wallets"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBalanceRequest"
}
}
}
},
"responses": {
"201": {
"description": "Created balance",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateBalanceResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/wallets/{id}/balances/{balanceName}": {
"get": {
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "balanceName",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"summary": "Get detailed balance",
"operationId": "getBalance",
"tags": [
"Wallets"
],
"responses": {
"200": {
"description": "Balance summary",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetBalanceResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/wallets/{id}/debit": {
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"post": {
"summary": "Debit a wallet",
"operationId": "debitWallet",
"tags": [
"Wallets"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DebitWalletRequest"
}
}
}
},
"responses": {
"201": {
"description": "Wallet successfully debited as a pending hold",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DebitWalletResponse"
}
}
}
},
"204": {
"description": "Wallet successfully debited"
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/wallets/{id}/credit": {
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"post": {
"summary": "Credit a wallet",
"operationId": "creditWallet",
"tags": [
"Wallets"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreditWalletRequest"
}
}
}
},
"responses": {
"204": {
"description": "Wallet successfully credited"
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/holds": {
"get": {
"summary": "Get all holds for a wallet",
"tags": [
"Wallets"
],
"operationId": "getHolds",
"parameters": [
{
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page",
"example": 100,
"schema": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"default": 15
}
},
{
"name": "walletID",
"in": "query",
"description": "The wallet to filter on",
"example": "wallet1",
"schema": {
"type": "string"
}
},
{
"name": "metadata",
"in": "query",
"description": "Filter holds by metadata key value pairs. Nested objects can be used as seen in the example below.",
"style": "deepObject",
"schema": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "string"
}
},
"example": {
"admin": "true"
}
},
{
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when the pagination token is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
}
],
"responses": {
"200": {
"description": "Holds",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetHoldsResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/holds/{holdID}": {
"get": {
"summary": "Get a hold",
"tags": [
"Wallets"
],
"operationId": "getHold",
"parameters": [
{
"name": "holdID",
"in": "path",
"schema": {
"type": "string"
},
"required": true,
"description": "The hold ID"
}
],
"responses": {
"200": {
"description": "Holds",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetHoldResponse"
}
}
}
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/holds/{hold_id}/confirm": {
"post": {
"parameters": [
{
"name": "hold_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConfirmHoldRequest"
}
}
}
},
"summary": "Confirm a hold",
"tags": [
"Wallets"
],
"operationId": "confirmHold",
"responses": {
"204": {
"description": "Hold successfully confirmed, funds moved back to initial destination"
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/wallets/holds/{hold_id}/void": {
"parameters": [
{
"name": "hold_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"post": {
"summary": "Cancel a hold",
"operationId": "voidHold",
"tags": [
"Wallets"
],
"responses": {
"204": {
"description": "Hold successfully cancelled, funds returned to wallet"
},
"default": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/walletsErrorResponse"
}
}
}
}
}
}
},
"/api/orchestration/_info": {
"get": {
"summary": "Get server info",
"operationId": "orchestrationgetServerInfo",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "Server information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerInfo"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/triggers": {
"get": {
"summary": "List triggers",
"operationId": "listTriggers",
"description": "List triggers",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of triggers",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListTriggersResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
},
"post": {
"summary": "Create trigger",
"operationId": "createTrigger",
"description": "Create trigger",
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TriggerData"
}
}
}
},
"responses": {
"201": {
"description": "Created trigger",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTriggerResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/triggers/{triggerID}": {
"parameters": [
{
"name": "triggerID",
"description": "The trigger id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"get": {
"summary": "Read trigger",
"operationId": "readTrigger",
"description": "Read trigger",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "A specific trigger",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReadTriggerResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
},
"delete": {
"summary": "Delete trigger",
"operationId": "deleteTrigger",
"description": "Read trigger",
"tags": [
"Orchestration"
],
"responses": {
"204": {
"description": "Trigger deleted"
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/triggers/{triggerID}/occurrences": {
"parameters": [
{
"name": "triggerID",
"description": "The trigger id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"get": {
"summary": "List triggers occurrences",
"operationId": "listTriggersOccurrences",
"description": "List triggers occurrences",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of triggers occurrences",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListTriggersOccurrencesResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/workflows": {
"get": {
"summary": "List registered workflows",
"operationId": "listWorkflows",
"description": "List registered workflows",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of workflows",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListWorkflowsResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
},
"post": {
"summary": "Create workflow",
"operationId": "createWorkflow",
"description": "Create a workflow",
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateWorkflowRequest"
}
}
}
},
"responses": {
"201": {
"description": "Created workflow",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateWorkflowResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/workflows/{flowId}": {
"parameters": [
{
"in": "path",
"description": "The flow id",
"name": "flowId",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"get": {
"summary": "Get a flow by id",
"tags": [
"Orchestration"
],
"description": "Get a flow by id",
"operationId": "getWorkflow",
"responses": {
"200": {
"description": "The workflow",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetWorkflowResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
},
"delete": {
"summary": "Delete a flow by id",
"tags": [
"Orchestration"
],
"description": "Delete a flow by id",
"operationId": "deleteWorkflow",
"responses": {
"204": {
"description": "No content"
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/workflows/{workflowID}/instances": {
"parameters": [
{
"in": "path",
"description": "The flow id",
"name": "workflowID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"post": {
"description": "Run workflow",
"summary": "Run workflow",
"operationId": "runWorkflow",
"parameters": [
{
"in": "query",
"name": "wait",
"required": false,
"description": "Wait end of the workflow before return",
"schema": {
"type": "boolean"
}
}
],
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunWorkflowRequest"
}
}
}
},
"responses": {
"201": {
"description": "The workflow instance",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunWorkflowResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/instances": {
"get": {
"description": "List instances of a workflow",
"summary": "List instances of a workflow",
"operationId": "listInstances",
"parameters": [
{
"in": "query",
"description": "A workflow id",
"name": "workflowID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": false
},
{
"in": "query",
"description": "Filter running instances",
"name": "running",
"schema": {
"type": "boolean"
},
"example": true,
"required": false
}
],
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of workflow instances",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListRunsResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/instances/{instanceID}": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"get": {
"summary": "Get a workflow instance by id",
"description": "Get a workflow instance by id",
"operationId": "getInstance",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "The workflow instance",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetWorkflowInstanceResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/instances/{instanceID}/events": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"post": {
"summary": "Send an event to a running workflow",
"description": "Send an event to a running workflow",
"operationId": "sendEvent",
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
}
}
},
"responses": {
"204": {
"description": "No content"
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/instances/{instanceID}/abort": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"put": {
"summary": "Cancel a running workflow",
"description": "Cancel a running workflow",
"operationId": "cancelEvent",
"tags": [
"Orchestration"
],
"responses": {
"204": {
"description": "No content"
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/instances/{instanceID}/history": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"get": {
"summary": "Get a workflow instance history by id",
"description": "Get a workflow instance history by id",
"operationId": "getInstanceHistory",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "The workflow instance history",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetWorkflowInstanceHistoryResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/instances/{instanceID}/stages/{number}/history": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
},
{
"in": "path",
"description": "The stage number",
"name": "number",
"schema": {
"type": "integer"
},
"example": 0,
"required": true
}
],
"get": {
"summary": "Get a workflow instance stage history",
"description": "Get a workflow instance stage history",
"operationId": "getInstanceStageHistory",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "The workflow instance stage history",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetWorkflowInstanceHistoryStageResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/ErrorResponse"
}
}
}
},
"/api/orchestration/v2/_info": {
"get": {
"summary": "Get server info",
"operationId": "v2GetServerInfo",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "Server information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ServerInfo"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/triggers": {
"get": {
"summary": "List triggers",
"operationId": "v2ListTriggers",
"description": "List triggers",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of triggers",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ListTriggersResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
},
"post": {
"summary": "Create trigger",
"operationId": "v2CreateTrigger",
"description": "Create trigger",
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2TriggerData"
}
}
}
},
"responses": {
"201": {
"description": "Created trigger",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2CreateTriggerResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/triggers/{triggerID}": {
"parameters": [
{
"name": "triggerID",
"description": "The trigger id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"get": {
"summary": "Read trigger",
"operationId": "v2ReadTrigger",
"description": "Read trigger",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "A specific trigger",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ReadTriggerResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
},
"delete": {
"summary": "Delete trigger",
"operationId": "v2DeleteTrigger",
"description": "Read trigger",
"tags": [
"Orchestration"
],
"responses": {
"204": {
"description": "Trigger deleted"
},
"404": {
"$ref": "#/components/responses/V2ErrorResponse"
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/triggers/{triggerID}/test": {
"parameters": [
{
"name": "triggerID",
"description": "The trigger id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"post": {
"summary": "Test trigger",
"operationId": "testTrigger",
"description": "Test trigger",
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Test a trigger",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2TestTriggerResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/triggers/{triggerID}/occurrences": {
"parameters": [
{
"name": "triggerID",
"description": "The trigger id",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"get": {
"summary": "List triggers occurrences",
"operationId": "v2ListTriggersOccurrences",
"description": "List triggers occurrences",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of triggers occurrences",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ListTriggersOccurrencesResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/workflows": {
"get": {
"summary": "List registered workflows",
"operationId": "v2ListWorkflows",
"description": "List registered workflows",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of workflows",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ListWorkflowsResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
},
"post": {
"summary": "Create workflow",
"operationId": "v2CreateWorkflow",
"description": "Create a workflow",
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2CreateWorkflowRequest"
}
}
}
},
"responses": {
"201": {
"description": "Created workflow",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2CreateWorkflowResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/workflows/{flowId}": {
"parameters": [
{
"in": "path",
"description": "The flow id",
"name": "flowId",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"get": {
"summary": "Get a flow by id",
"tags": [
"Orchestration"
],
"description": "Get a flow by id",
"operationId": "v2GetWorkflow",
"responses": {
"200": {
"description": "The workflow",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2GetWorkflowResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
},
"delete": {
"summary": "Delete a flow by id",
"tags": [
"Orchestration"
],
"description": "Delete a flow by id",
"operationId": "v2DeleteWorkflow",
"responses": {
"204": {
"description": "No content"
},
"400": {
"$ref": "#/components/responses/V2ErrorResponse"
},
"404": {
"$ref": "#/components/responses/V2ErrorResponse"
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/workflows/{workflowID}/instances": {
"parameters": [
{
"in": "path",
"description": "The flow id",
"name": "workflowID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"post": {
"description": "Run workflow",
"summary": "Run workflow",
"operationId": "v2RunWorkflow",
"parameters": [
{
"in": "query",
"name": "wait",
"required": false,
"description": "Wait end of the workflow before return",
"schema": {
"type": "boolean"
}
}
],
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2RunWorkflowRequest"
}
}
}
},
"responses": {
"201": {
"description": "The workflow instance",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2RunWorkflowResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/instances": {
"get": {
"description": "List instances of a workflow",
"summary": "List instances of a workflow",
"operationId": "v2ListInstances",
"parameters": [
{
"in": "query",
"description": "A workflow id",
"name": "workflowID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": false
},
{
"in": "query",
"description": "Filter running instances",
"name": "running",
"schema": {
"type": "boolean"
},
"example": true,
"required": false
}
],
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "List of workflow instances",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2ListRunsResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/instances/{instanceID}": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"get": {
"summary": "Get a workflow instance by id",
"description": "Get a workflow instance by id",
"operationId": "v2GetInstance",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "The workflow instance",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2GetWorkflowInstanceResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/instances/{instanceID}/events": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"post": {
"summary": "Send an event to a running workflow",
"description": "Send an event to a running workflow",
"operationId": "v2SendEvent",
"tags": [
"Orchestration"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
}
}
}
},
"responses": {
"204": {
"description": "No content"
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/instances/{instanceID}/abort": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"put": {
"summary": "Cancel a running workflow",
"description": "Cancel a running workflow",
"operationId": "v2CancelEvent",
"tags": [
"Orchestration"
],
"responses": {
"204": {
"description": "No content"
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/instances/{instanceID}/history": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
}
],
"get": {
"summary": "Get a workflow instance history by id",
"description": "Get a workflow instance history by id",
"operationId": "v2GetInstanceHistory",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "The workflow instance history",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2GetWorkflowInstanceHistoryResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/orchestration/v2/instances/{instanceID}/stages/{number}/history": {
"parameters": [
{
"in": "path",
"description": "The instance id",
"name": "instanceID",
"schema": {
"type": "string"
},
"example": "xxx",
"required": true
},
{
"in": "path",
"description": "The stage number",
"name": "number",
"schema": {
"type": "integer"
},
"example": 0,
"required": true
}
],
"get": {
"summary": "Get a workflow instance stage history",
"description": "Get a workflow instance stage history",
"operationId": "v2GetInstanceStageHistory",
"tags": [
"Orchestration"
],
"responses": {
"200": {
"description": "The workflow instance stage history",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2GetWorkflowInstanceHistoryStageResponse"
}
}
}
},
"default": {
"$ref": "#/components/responses/V2ErrorResponse"
}
}
}
},
"/api/reconciliation/_info": {
"get": {
"summary": "Get server info",
"operationId": "reconciliationgetServerInfo",
"tags": [
"Reconciliation"
],
"responses": {
"200": {
"$ref": "#/components/responses/ServerInfo"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
}
},
"/api/reconciliation/policies": {
"post": {
"summary": "Create a policy",
"tags": [
"Reconciliation"
],
"operationId": "createPolicy",
"description": "Create a policy",
"requestBody": {
"$ref": "#/components/requestBodies/Policy"
},
"responses": {
"201": {
"$ref": "#/components/responses/Policy"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
},
"get": {
"summary": "List policies",
"operationId": "listPolicies",
"tags": [
"Reconciliation"
],
"parameters": [
{
"$ref": "#/components/parameters/reconciliationPageSize"
},
{
"$ref": "#/components/parameters/Cursor"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Policies"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
}
},
"/api/reconciliation/policies/{policyID}": {
"delete": {
"summary": "Delete a policy",
"operationId": "deletePolicy",
"tags": [
"Reconciliation"
],
"description": "Delete a policy by its id.",
"parameters": [
{
"$ref": "#/components/parameters/PolicyID"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/NoContent"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
},
"get": {
"summary": "Get a policy",
"tags": [
"Reconciliation"
],
"operationId": "getPolicy",
"parameters": [
{
"$ref": "#/components/parameters/PolicyID"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Policy"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
}
},
"/api/reconciliation/policies/{policyID}/reconciliation": {
"post": {
"summary": "Reconcile using a policy",
"tags": [
"Reconciliation"
],
"operationId": "reconcile",
"description": "Reconcile using a policy",
"parameters": [
{
"$ref": "#/components/parameters/PolicyID"
}
],
"requestBody": {
"$ref": "#/components/requestBodies/Reconciliation"
},
"responses": {
"200": {
"$ref": "#/components/responses/Reconciliation"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
}
},
"/api/reconciliation/reconciliations": {
"get": {
"summary": "List reconciliations",
"operationId": "listReconciliations",
"tags": [
"Reconciliation"
],
"parameters": [
{
"$ref": "#/components/parameters/reconciliationPageSize"
},
{
"$ref": "#/components/parameters/Cursor"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Reconciliations"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
}
},
"/api/reconciliation/reconciliations/{reconciliationID}": {
"get": {
"summary": "Get a reconciliation",
"tags": [
"Reconciliation"
],
"operationId": "getReconciliation",
"parameters": [
{
"$ref": "#/components/parameters/ReconciliationID"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/Reconciliation"
},
"default": {
"$ref": "#/components/responses/reconciliationErrorResponse"
}
}
}
},
"x-speakeasy-errors": {
"statusCodes": [
"4XX",
"5XX"
]
}
},
"components": {
"schemas": {
"Version": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"health": {
"type": "boolean"
}
},
"required": [
"name",
"version",
"health"
]
},
"GetVersionsResponse": {
"type": "object",
"properties": {
"region": {
"type": "string"
},
"env": {
"type": "string"
},
"versions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Version"
}
}
},
"required": [
"region",
"env",
"versions"
]
},
"Metadata": {
"type": "object",
"additionalProperties": {}
},
"ClientOptions": {
"type": "object",
"properties": {
"public": {
"type": "boolean"
},
"redirectUris": {
"type": "array",
"items": {
"type": "string"
}
},
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"trusted": {
"type": "boolean"
},
"postLogoutRedirectUris": {
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"name"
]
},
"ClientSecret": {
"type": "object",
"properties": {
"lastDigits": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
}
},
"required": [
"id",
"lastDigits",
"name"
]
},
"Client": {
"allOf": [
{
"$ref": "#/components/schemas/ClientOptions"
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"secrets": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ClientSecret"
}
}
},
"required": [
"id"
]
}
]
},
"ScopeOptions": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
}
},
"required": [
"label"
]
},
"Scope": {
"allOf": [
{
"$ref": "#/components/schemas/ScopeOptions"
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"transient": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id"
]
}
]
},
"SecretOptions": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
}
},
"required": [
"name"
]
},
"Secret": {
"allOf": [
{
"$ref": "#/components/schemas/SecretOptions"
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"lastDigits": {
"type": "string"
},
"clear": {
"type": "string"
}
},
"required": [
"id",
"lastDigits",
"clear"
]
}
]
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "3bb03708-312f-48a0-821a-e765837dc2c4"
},
"subject": {
"type": "string",
"example": "Jane Doe"
},
"email": {
"type": "string",
"example": "[email protected]"
}
}
},
"CreateClientRequest": {
"$ref": "#/components/schemas/ClientOptions"
},
"CreateClientResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Client"
}
}
},
"ListClientsResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Client"
}
}
}
},
"UpdateClientRequest": {
"$ref": "#/components/schemas/ClientOptions"
},
"UpdateClientResponse": {
"$ref": "#/components/schemas/CreateClientResponse"
},
"ReadClientResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Client"
}
}
},
"ListScopesResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Scope"
}
}
}
},
"CreateScopeRequest": {
"$ref": "#/components/schemas/ScopeOptions"
},
"CreateScopeResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Scope"
}
}
},
"ReadScopeResponse": {
"$ref": "#/components/schemas/CreateScopeResponse"
},
"UpdateScopeRequest": {
"$ref": "#/components/schemas/ScopeOptions"
},
"UpdateScopeResponse": {
"$ref": "#/components/schemas/CreateScopeResponse"
},
"CreateSecretRequest": {
"$ref": "#/components/schemas/SecretOptions"
},
"CreateSecretResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Secret"
}
}
},
"ReadUserResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/User"
}
}
},
"ListUsersResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
},
"ServerInfo": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"type": "string"
}
}
},
"AccountsCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
},
"BalancesCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccountsBalances"
}
}
}
}
}
},
"TransactionsCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Transaction"
}
}
}
}
}
},
"LogsCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Log"
}
}
}
}
}
},
"AccountResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AccountWithVolumesAndBalances"
}
}
},
"AggregateBalancesResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/AssetsBalances"
}
}
},
"Config": {
"type": "object",
"properties": {
"storage": {
"$ref": "#/components/schemas/LedgerStorage"
}
},
"required": [
"storage"
]
},
"LedgerStorage": {
"type": "object",
"properties": {
"driver": {
"type": "string"
},
"ledgers": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"driver",
"ledgers"
]
},
"Metadata1": {
"type": "object",
"nullable": true,
"additionalProperties": {}
},
"ConfigInfo": {
"type": "object",
"properties": {
"config": {
"$ref": "#/components/schemas/Config"
},
"server": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"config",
"server",
"version"
]
},
"ScriptResponse": {
"type": "object",
"properties": {
"errorCode": {
"$ref": "#/components/schemas/ErrorsEnum"
},
"errorMessage": {
"type": "string",
"example": "account had insufficient funds"
},
"details": {
"type": "string",
"example": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9"
},
"transaction": {
"$ref": "#/components/schemas/Transaction"
}
}
},
"Account": {
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"example": "users:001"
},
"type": {
"type": "string",
"example": "virtual"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"example": {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
}
}
}
},
"AccountWithVolumesAndBalances": {
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string",
"example": "users:001"
},
"type": {
"type": "string",
"example": "virtual"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"example": {
"admin": true,
"a": {
"nested": {
"key": "value"
}
}
}
},
"volumes": {
"$ref": "#/components/schemas/Volumes"
},
"balances": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
},
"example": {
"COIN": 100
}
}
}
},
"AccountsBalances": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/AssetsBalances"
},
"example": {
"account1": {
"USD": 100,
"EUR": 23
},
"account2": {
"CAD": 20,
"JPY": 21
}
}
},
"AssetsBalances": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int64"
},
"example": {
"USD": 100,
"EUR": 12
}
},
"Contract": {
"type": "object",
"properties": {
"account": {
"type": "string",
"example": "users:001"
},
"expr": {
"type": "object"
}
},
"required": [
"accounts",
"expr"
]
},
"Mapping": {
"type": "object",
"nullable": true,
"required": [
"contracts"
],
"properties": {
"contracts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Contract"
}
}
}
},
"Posting": {
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"asset": {
"type": "string",
"example": "COIN"
},
"destination": {
"type": "string",
"example": "users:002"
},
"source": {
"type": "string",
"example": "users:001"
}
},
"required": [
"amount",
"asset",
"destination",
"source"
]
},
"Script": {
"type": "object",
"properties": {
"plain": {
"type": "string",
"example": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n"
},
"vars": {
"type": "object",
"additionalProperties": true,
"example": {
"user": "users:042"
}
},
"reference": {
"type": "string",
"example": "order_1234",
"description": "Reference to attach to the generated transaction"
},
"metadata": {
"$ref": "#/components/schemas/Metadata1"
}
},
"required": [
"plain"
]
},
"Transaction": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Posting"
}
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/Metadata1"
},
"txid": {
"type": "integer",
"format": "bigint",
"minimum": 0
},
"preCommitVolumes": {
"$ref": "#/components/schemas/AggregatedVolumes"
},
"postCommitVolumes": {
"$ref": "#/components/schemas/AggregatedVolumes"
}
},
"required": [
"postings",
"timestamp",
"txid"
]
},
"TransactionData": {
"type": "object",
"required": [
"postings"
],
"properties": {
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Posting"
}
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/Metadata1"
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
},
"Transactions": {
"required": [
"transactions"
],
"type": "object",
"properties": {
"transactions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TransactionData"
}
}
}
},
"PostTransaction": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Posting"
}
},
"script": {
"type": "object",
"properties": {
"plain": {
"type": "string",
"example": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n"
},
"vars": {
"type": "object",
"additionalProperties": true,
"example": {
"user": "users:042"
}
}
},
"required": [
"plain"
]
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/Metadata1"
}
}
},
"Stats": {
"type": "object",
"properties": {
"accounts": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"transactions": {
"type": "integer",
"format": "int64",
"minimum": 0
}
},
"required": [
"accounts",
"transactions"
]
},
"Log": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"minimum": 0,
"example": 1234
},
"type": {
"type": "string",
"enum": [
"NEW_TRANSACTION",
"SET_METADATA"
]
},
"data": {
"type": "object",
"additionalProperties": true
},
"hash": {
"type": "string",
"example": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e"
},
"date": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"type",
"data",
"hash",
"date"
]
},
"TransactionsResponse": {
"type": "object",
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/Transaction"
},
"type": "array"
}
},
"required": [
"data"
]
},
"TransactionResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/Transaction"
}
},
"type": "object",
"required": [
"data"
]
},
"StatsResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/Stats"
}
},
"type": "object",
"required": [
"data"
]
},
"MappingResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/Mapping"
}
},
"type": "object"
},
"ConfigInfoResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/ConfigInfo"
}
},
"type": "object",
"required": [
"data"
]
},
"Volume": {
"type": "object",
"properties": {
"input": {
"type": "integer",
"format": "bigint"
},
"output": {
"type": "integer",
"format": "bigint"
},
"balance": {
"type": "integer",
"format": "bigint"
}
},
"required": [
"input",
"output"
],
"example": {
"input": 100,
"output": 20,
"balance": 80
}
},
"Volumes": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Volume"
},
"example": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
},
"EUR": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"AggregatedVolumes": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Volumes"
},
"example": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
}
},
"ErrorResponse": {
"type": "object",
"required": [
"errorCode",
"errorMessage"
],
"properties": {
"errorCode": {
"$ref": "#/components/schemas/ErrorsEnum"
},
"errorMessage": {
"type": "string",
"example": "[INSUFFICIENT_FUND] account had insufficient funds"
},
"details": {
"type": "string",
"example": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9"
}
}
},
"ErrorsEnum": {
"type": "string",
"enum": [
"INTERNAL",
"INSUFFICIENT_FUND",
"VALIDATION",
"CONFLICT",
"NO_SCRIPT",
"COMPILATION_FAILED",
"METADATA_OVERRIDE"
],
"example": "INSUFFICIENT_FUND"
},
"LedgerInfoResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/LedgerInfo"
}
}
},
"LedgerInfo": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "ledger001"
},
"storage": {
"type": "object",
"properties": {
"migrations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MigrationInfo"
}
}
}
}
}
},
"MigrationInfo": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"format": "int64",
"minimum": 0,
"example": 11
},
"name": {
"type": "string",
"example": "migrations:001"
},
"date": {
"type": "string",
"format": "date-time"
},
"state": {
"type": "string",
"enum": [
"to do",
"done"
]
}
}
},
"V2AccountsCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Account"
}
}
}
}
}
},
"V2BalancesCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2AccountsBalances"
}
}
}
}
}
},
"V2TransactionsCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2ExpandedTransaction"
}
}
}
}
}
},
"V2LogsCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Log"
}
}
}
}
}
},
"V2AccountResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Account"
}
}
},
"V2AggregateBalancesResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2AssetsBalances"
}
}
},
"V2Metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"admin": "true"
}
},
"V2ConfigInfo": {
"type": "object",
"properties": {
"server": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"config",
"server",
"version"
]
},
"V2Account": {
"type": "object",
"required": [
"address",
"metadata"
],
"properties": {
"address": {
"type": "string",
"example": "users:001"
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "string"
},
"example": {
"admin": "true"
}
},
"volumes": {
"$ref": "#/components/schemas/V2Volumes"
},
"effectiveVolumes": {
"$ref": "#/components/schemas/V2Volumes"
}
}
},
"V2AccountsBalances": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/V2AssetsBalances"
},
"example": {
"account1": {
"USD": 100,
"EUR": 23
},
"account2": {
"CAD": 20,
"JPY": 21
}
}
},
"V2AssetsBalances": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
},
"example": {
"USD": 100,
"EUR": 12
}
},
"V2Posting": {
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"asset": {
"type": "string",
"example": "COIN"
},
"destination": {
"type": "string",
"example": "users:002"
},
"source": {
"type": "string",
"example": "users:001"
}
},
"required": [
"amount",
"asset",
"destination",
"source"
]
},
"V2Script": {
"type": "object",
"properties": {
"plain": {
"type": "string",
"example": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n"
},
"vars": {
"type": "object",
"properties": {},
"additionalProperties": true,
"example": {
"user": "users:042"
}
},
"reference": {
"type": "string",
"example": "order_1234",
"description": "Reference to attach to the generated transaction"
},
"metadata": {
"$ref": "#/components/schemas/V2Metadata"
}
},
"required": [
"plain"
]
},
"V2Transaction": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Posting"
}
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/V2Metadata"
},
"id": {
"type": "integer",
"format": "bigint",
"minimum": 0
},
"reverted": {
"type": "boolean"
}
},
"required": [
"postings",
"timestamp",
"id",
"metadata",
"reverted"
]
},
"V2ExpandedTransaction": {
"allOf": [
{
"$ref": "#/components/schemas/V2Transaction"
},
{
"type": "object",
"properties": {
"preCommitVolumes": {
"$ref": "#/components/schemas/V2AggregatedVolumes"
},
"postCommitVolumes": {
"$ref": "#/components/schemas/V2AggregatedVolumes"
}
}
}
]
},
"V2PostTransaction": {
"type": "object",
"required": [
"metadata"
],
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Posting"
}
},
"script": {
"type": "object",
"properties": {
"plain": {
"type": "string",
"example": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n"
},
"vars": {
"type": "object",
"properties": {},
"additionalProperties": true,
"example": {
"user": "users:042"
}
}
},
"required": [
"plain"
]
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/V2Metadata"
}
}
},
"V2Stats": {
"type": "object",
"properties": {
"accounts": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"transactions": {
"type": "integer",
"format": "bigint",
"minimum": 0
}
},
"required": [
"accounts",
"transactions"
]
},
"V2Log": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 1234
},
"type": {
"type": "string",
"enum": [
"NEW_TRANSACTION",
"SET_METADATA",
"REVERTED_TRANSACTION"
]
},
"data": {
"type": "object",
"properties": {},
"additionalProperties": true
},
"hash": {
"type": "string",
"example": "9ee060170400f556b7e1575cb13f9db004f150a08355c7431c62bc639166431e"
},
"date": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"type",
"data",
"hash",
"date"
]
},
"V2CreateTransactionResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/V2Transaction"
}
},
"type": "object",
"required": [
"data"
]
},
"V2RevertTransactionResponse": {
"$ref": "#/components/schemas/V2CreateTransactionResponse"
},
"V2GetTransactionResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/V2ExpandedTransaction"
}
},
"type": "object",
"required": [
"data"
]
},
"V2StatsResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/V2Stats"
}
},
"type": "object",
"required": [
"data"
]
},
"V2ConfigInfoResponse": {
"$ref": "#/components/schemas/V2ConfigInfo"
},
"V2Volume": {
"type": "object",
"properties": {
"input": {
"type": "integer",
"format": "bigint"
},
"output": {
"type": "integer",
"format": "bigint"
},
"balance": {
"type": "integer",
"format": "bigint"
}
},
"required": [
"input",
"output"
],
"example": {
"input": 100,
"output": 20,
"balance": 80
}
},
"V2Volumes": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/V2Volume"
},
"example": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
},
"EUR": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"V2AggregatedVolumes": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/V2Volumes"
},
"example": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
}
},
"V2ErrorResponse": {
"type": "object",
"required": [
"errorCode",
"errorMessage"
],
"properties": {
"errorCode": {
"$ref": "#/components/schemas/V2ErrorsEnum"
},
"errorMessage": {
"type": "string",
"example": "[VALIDATION] invalid 'cursor' query param"
},
"details": {
"type": "string",
"example": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9"
}
}
},
"V2ErrorsEnum": {
"type": "string",
"enum": [
"INTERNAL",
"INSUFFICIENT_FUND",
"VALIDATION",
"CONFLICT",
"COMPILATION_FAILED",
"METADATA_OVERRIDE",
"NOT_FOUND",
"REVERT_OCCURRING",
"ALREADY_REVERT",
"NO_POSTINGS"
],
"example": "VALIDATION"
},
"V2LedgerInfoResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/V2LedgerInfo"
}
}
},
"V2LedgerInfo": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "ledger001"
},
"storage": {
"type": "object",
"properties": {
"migrations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2MigrationInfo"
}
}
}
}
}
},
"V2MigrationInfo": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"format": "int64",
"minimum": 0,
"example": 11
},
"name": {
"type": "string",
"example": "migrations:001"
},
"date": {
"type": "string",
"format": "date-time"
},
"state": {
"type": "string",
"enum": [
"to do",
"done"
]
}
}
},
"V2Bulk": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2BulkElement"
}
},
"V2BaseBulkElement": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"type": "string"
},
"ik": {
"type": "string"
}
}
},
"V2BulkElement": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/V2BulkElementCreateTransaction"
},
{
"$ref": "#/components/schemas/V2BulkElementAddMetadata"
},
{
"$ref": "#/components/schemas/V2BulkElementRevertTransaction"
},
{
"$ref": "#/components/schemas/V2BulkElementDeleteMetadata"
}
],
"discriminator": {
"propertyName": "action",
"mapping": {
"CREATE_TRANSACTION": "#/components/schemas/V2BulkElementCreateTransaction",
"ADD_METADATA": "#/components/schemas/V2BulkElementAddMetadata",
"REVERT_TRANSACTION": "#/components/schemas/V2BulkElementRevertTransaction",
"DELETE_METADATA": "#/components/schemas/V2BulkElementDeleteMetadata"
}
}
},
"V2BulkElementCreateTransaction": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElement"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/V2PostTransaction"
}
}
}
]
},
"V2TargetId": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer",
"format": "bigint"
}
]
},
"V2TargetType": {
"type": "string",
"enum": [
"TRANSACTION",
"ACCOUNT"
]
},
"V2BulkElementAddMetadata": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElement"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"targetId": {
"$ref": "#/components/schemas/V2TargetId"
},
"targetType": {
"$ref": "#/components/schemas/V2TargetType"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"targetId",
"targetType",
"metadata"
]
}
}
}
]
},
"V2BulkElementRevertTransaction": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElement"
},
{
"type": "object",
"properties": {
"data": {
"properties": {
"id": {
"type": "integer",
"format": "bigint"
},
"force": {
"type": "boolean"
}
},
"required": [
"id"
]
}
}
}
]
},
"V2BulkElementDeleteMetadata": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElement"
},
{
"type": "object",
"properties": {
"data": {
"properties": {
"targetId": {
"$ref": "#/components/schemas/V2TargetId"
},
"targetType": {
"$ref": "#/components/schemas/V2TargetType"
},
"key": {
"type": "string"
}
},
"required": [
"targetId",
"targetType",
"key"
]
}
}
}
]
},
"V2BulkResponse": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2BulkElementResult"
}
}
},
"type": "object",
"required": [
"data"
]
},
"V2BulkElementResult": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/V2BulkElementResultCreateTransaction"
},
{
"$ref": "#/components/schemas/V2BulkElementResultAddMetadata"
},
{
"$ref": "#/components/schemas/V2BulkElementResultRevertTransaction"
},
{
"$ref": "#/components/schemas/V2BulkElementResultDeleteMetadata"
},
{
"$ref": "#/components/schemas/V2BulkElementResultError"
}
],
"discriminator": {
"propertyName": "responseType",
"mapping": {
"CREATE_TRANSACTION": "#/components/schemas/V2BulkElementResultCreateTransaction",
"ADD_METADATA": "#/components/schemas/V2BulkElementResultAddMetadata",
"REVERT_TRANSACTION": "#/components/schemas/V2BulkElementResultRevertTransaction",
"DELETE_METADATA": "#/components/schemas/V2BulkElementResultDeleteMetadata",
"ERROR": "#/components/schemas/V2BulkElementResultError"
}
}
},
"V2BaseBulkElementResult": {
"type": "object",
"properties": {
"responseType": {
"type": "string"
}
},
"required": [
"responseType"
]
},
"V2BulkElementResultCreateTransaction": {
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElementResult"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/V2Transaction"
}
},
"required": [
"data"
]
}
]
},
"V2BulkElementResultAddMetadata": {
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElementResult"
}
]
},
"V2BulkElementResultRevertTransaction": {
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElementResult"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/V2Transaction"
}
},
"required": [
"data"
]
}
]
},
"V2BulkElementResultDeleteMetadata": {
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElementResult"
}
]
},
"V2BulkElementResultError": {
"allOf": [
{
"$ref": "#/components/schemas/V2BaseBulkElementResult"
},
{
"type": "object",
"properties": {
"errorCode": {
"type": "string"
},
"errorDescription": {
"type": "string"
},
"errorDetails": {
"type": "string"
}
},
"required": [
"errorCode",
"errorDescription"
]
}
]
},
"V2CreateLedgerRequest": {
"type": "object",
"properties": {
"bucket": {
"type": "string"
}
}
},
"V2Ledger": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"addedAt": {
"type": "string",
"format": "date-time"
},
"bucket": {
"type": "string"
}
},
"required": [
"name",
"addedAt",
"bucket"
]
},
"V2LedgerListResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Ledger"
}
}
}
}
}
},
"CursorBase": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
}
}
},
"PaymentsCursor": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/CursorBase"
},
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Payment"
}
}
}
}
]
}
}
},
"PoolsCursor": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/CursorBase"
},
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Pool"
}
}
}
}
]
}
}
},
"TransferInitiationsCursor": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/CursorBase"
},
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TransferInitiation"
}
}
}
}
]
}
}
},
"BankAccountsCursor": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/CursorBase"
},
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BankAccount"
}
}
}
}
]
}
}
},
"AccountsCursor": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/CursorBase"
},
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/paymentsAccount"
}
}
}
}
]
}
}
},
"BalancesCursor": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/CursorBase"
},
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccountBalance"
}
}
}
}
]
}
}
},
"TasksCursor": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/CursorBase"
},
{
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/TaskStripe"
},
{
"$ref": "#/components/schemas/TaskWise"
},
{
"$ref": "#/components/schemas/TaskCurrencyCloud"
},
{
"$ref": "#/components/schemas/TaskDummyPay"
},
{
"$ref": "#/components/schemas/TaskModulr"
},
{
"$ref": "#/components/schemas/TaskBankingCircle"
},
{
"$ref": "#/components/schemas/TaskMangoPay"
},
{
"$ref": "#/components/schemas/TaskMoneycorp"
}
]
}
}
}
}
]
}
}
},
"ConnectorConfigResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/ConnectorConfig"
}
}
},
"PaymentResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Payment"
}
}
},
"PoolBalancesResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/PoolBalances"
}
}
},
"PoolResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Pool"
}
}
},
"TransferInitiationResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/TransferInitiation"
}
}
},
"paymentsAccountResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/paymentsAccount"
}
}
},
"ConnectorResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"connectorID"
],
"properties": {
"connectorID": {
"type": "string"
}
}
}
}
},
"ConnectorsResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"required": [
"provider",
"name",
"connectorID"
],
"properties": {
"provider": {
"$ref": "#/components/schemas/Connector"
},
"name": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"enabled": {
"type": "boolean"
}
}
}
}
}
},
"BankAccountResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/BankAccount"
}
}
},
"ConnectorsConfigsResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"connector"
],
"properties": {
"connector": {
"type": "object",
"required": [
"key"
],
"properties": {
"key": {
"type": "object",
"required": [
"dataType",
"required"
],
"properties": {
"dataType": {
"type": "string"
},
"required": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"TaskResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"oneOf": [
{
"$ref": "#/components/schemas/TaskStripe"
},
{
"$ref": "#/components/schemas/TaskWise"
},
{
"$ref": "#/components/schemas/TaskCurrencyCloud"
},
{
"$ref": "#/components/schemas/TaskDummyPay"
},
{
"$ref": "#/components/schemas/TaskModulr"
},
{
"$ref": "#/components/schemas/TaskBankingCircle"
},
{
"$ref": "#/components/schemas/TaskMangoPay"
},
{
"$ref": "#/components/schemas/TaskMoneycorp"
}
]
}
}
},
"TransferResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"TransfersResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0
},
"asset": {
"type": "string"
},
"destination": {
"type": "string"
},
"source": {
"type": "string"
},
"currency": {
"type": "string"
},
"status": {
"type": "string"
},
"error": {
"type": "string"
}
}
}
}
}
},
"Connector": {
"type": "string",
"enum": [
"STRIPE",
"DUMMY-PAY",
"WISE",
"MODULR",
"CURRENCY-CLOUD",
"BANKING-CIRCLE",
"MANGOPAY",
"MONEYCORP",
"ATLAR",
"ADYEN"
]
},
"TransferInitiationStatus": {
"type": "string",
"enum": [
"WAITING_FOR_VALIDATION",
"PROCESSING",
"PROCESSED",
"FAILED",
"REJECTED",
"VALIDATED"
]
},
"ConnectorConfig": {
"anyOf": [
{
"$ref": "#/components/schemas/StripeConfig"
},
{
"$ref": "#/components/schemas/DummyPayConfig"
},
{
"$ref": "#/components/schemas/WiseConfig"
},
{
"$ref": "#/components/schemas/ModulrConfig"
},
{
"$ref": "#/components/schemas/CurrencyCloudConfig"
},
{
"$ref": "#/components/schemas/BankingCircleConfig"
},
{
"$ref": "#/components/schemas/MangoPayConfig"
},
{
"$ref": "#/components/schemas/MoneycorpConfig"
},
{
"$ref": "#/components/schemas/AtlarConfig"
},
{
"$ref": "#/components/schemas/AdyenConfig"
}
]
},
"StripeConfig": {
"type": "object",
"required": [
"name",
"apiKey"
],
"properties": {
"name": {
"type": "string",
"example": "My Stripe Account"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new BalanceTransaction objects from Stripe API.\n",
"default": "120s"
},
"apiKey": {
"type": "string",
"example": "XXX"
},
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 0,
"description": "Number of BalanceTransaction to fetch at each polling interval.\n",
"default": 10,
"example": 50
}
}
},
"DummyPayConfig": {
"type": "object",
"required": [
"name",
"directory"
],
"properties": {
"name": {
"type": "string",
"example": "My DummyPay Account"
},
"filePollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new payment objects from the directory",
"default": "10s"
},
"directory": {
"type": "string",
"example": "/tmp/dummypay"
},
"prefixFileToIngest": {
"type": "string"
},
"numberOfAccountsPreGenerated": {
"type": "integer",
"format": "int64"
},
"numberOfPaymentsPreGenerated": {
"type": "integer",
"format": "int64"
}
}
},
"WiseConfig": {
"type": "object",
"required": [
"name",
"apiKey"
],
"properties": {
"name": {
"type": "string",
"example": "My Wise Account"
},
"apiKey": {
"type": "string",
"example": "XXX"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new BalanceTransaction objects from Wise API.\n",
"default": "120s"
}
}
},
"ModulrConfig": {
"type": "object",
"required": [
"name",
"apiKey",
"apiSecret"
],
"properties": {
"name": {
"type": "string",
"example": "My Modulr Account"
},
"apiKey": {
"type": "string",
"example": "XXX"
},
"apiSecret": {
"type": "string",
"example": "XXX"
},
"endpoint": {
"type": "string",
"example": "XXX"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new BalanceTransaction objects from Modulr API.\n",
"default": "120s"
}
}
},
"BankingCircleConfig": {
"type": "object",
"required": [
"name",
"username",
"password",
"endpoint",
"authorizationEndpoint",
"userCertificate",
"userCertificateKey"
],
"properties": {
"name": {
"type": "string",
"example": "My Banking Circle Account"
},
"username": {
"type": "string",
"example": "XXX"
},
"password": {
"type": "string",
"example": "XXX"
},
"endpoint": {
"type": "string",
"example": "XXX"
},
"authorizationEndpoint": {
"type": "string",
"example": "XXX"
},
"userCertificate": {
"type": "string",
"example": "XXX"
},
"userCertificateKey": {
"type": "string",
"example": "XXX"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new BalanceTransaction objects from Banking Circle API.\n",
"default": "120s"
}
}
},
"MangoPayConfig": {
"type": "object",
"required": [
"name",
"clientID",
"apiKey",
"endpoint"
],
"properties": {
"name": {
"type": "string",
"example": "My MangoPay Account"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new BalanceTransaction objects from MangoPay API.\n",
"default": "120s"
},
"clientID": {
"type": "string",
"example": "XXX"
},
"apiKey": {
"type": "string",
"example": "XXX"
},
"endpoint": {
"type": "string",
"example": "XXX"
}
}
},
"MoneycorpConfig": {
"type": "object",
"required": [
"name",
"clientID",
"apiKey",
"endpoint"
],
"properties": {
"name": {
"type": "string",
"example": "My Moneycorp Account"
},
"clientID": {
"type": "string",
"example": "XXX"
},
"apiKey": {
"type": "string",
"example": "XXX"
},
"endpoint": {
"type": "string",
"example": "XXX"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new BalanceTransaction objects from MoneyCorp API.\n",
"default": "120s"
}
}
},
"CurrencyCloudConfig": {
"type": "object",
"required": [
"name",
"apiKey",
"loginID"
],
"properties": {
"name": {
"type": "string",
"example": "My CurrencyCloud Account"
},
"apiKey": {
"type": "string",
"example": "XXX"
},
"loginID": {
"type": "string",
"example": "XXX",
"description": "Username of the API Key holder"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will fetch transactions",
"default": "120s"
},
"endpoint": {
"type": "string",
"example": "XXX",
"description": "The endpoint to use for the API. Defaults to https://devapi.currencycloud.com"
}
}
},
"AdyenConfig": {
"type": "object",
"required": [
"name",
"apiKey",
"hmacKey"
],
"properties": {
"name": {
"type": "string",
"example": "My Adyen Account"
},
"apiKey": {
"type": "string",
"example": "XXX"
},
"hmacKey": {
"type": "string",
"example": "XXX"
},
"liveEndpointPrefix": {
"type": "string",
"example": "XXX"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector will try to fetch new BalanceTransaction objects from Adyen API.\n",
"default": "120s"
}
}
},
"AtlarConfig": {
"type": "object",
"required": [
"name",
"accessKey",
"secret"
],
"properties": {
"name": {
"type": "string",
"example": "My Atlar Account"
},
"baseUrl": {
"type": "string",
"example": "https://api.example.com",
"default": "https://api.atlar.com",
"description": "The base URL the client uses for making requests towards the Atlar API.\n"
},
"pollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector tries to fetch new Transaction objects from the Atlar API.\n",
"default": "120s"
},
"transferInitiationStatusPollingPeriod": {
"type": "string",
"example": "60s",
"description": "The frequency at which the connector tries to fetch the status of payment initiations from the Atlar API.\n",
"default": "120s"
},
"accessKey": {
"type": "string",
"example": "XXX",
"description": "The access key used by the connector for authorizing requests to the Atlar API.\nYou can obtain it along with the associated secret from the Atlar dashboard.\n"
},
"secret": {
"type": "string",
"example": "XXX",
"description": "The secret used by the connector for authorizing requests to the Atlar API.\nYou can obtain it along with the associated access key from the Atlar dashboard.\n"
},
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 0,
"description": "Number of items to fetch when querying paginated APIs.\n",
"default": 25,
"example": 50
}
}
},
"TransferInitiation": {
"type": "object",
"required": [
"id",
"reference",
"createdAt",
"updatedAt",
"scheduledAt",
"description",
"sourceAccountID",
"destinationAccountID",
"connectorID",
"type",
"amount",
"asset",
"status",
"error"
],
"properties": {
"id": {
"type": "string",
"example": "XXX"
},
"reference": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"scheduledAt": {
"type": "string",
"format": "date-time"
},
"description": {
"type": "string"
},
"sourceAccountID": {
"type": "string"
},
"destinationAccountID": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"TRANSFER",
"PAYOUT"
]
},
"amount": {
"type": "integer",
"format": "bigint"
},
"asset": {
"type": "string",
"example": "USD"
},
"status": {
"$ref": "#/components/schemas/TransferInitiationStatus"
},
"error": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
},
"relatedPayments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TransferInitiationPayments"
}
}
}
},
"TransferInitiationPayments": {
"type": "object",
"required": [
"paymentID",
"createdAt",
"status",
"error"
],
"properties": {
"paymentID": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"status": {
"$ref": "#/components/schemas/TransferInitiationStatus"
},
"error": {
"type": "string"
}
}
},
"BankAccount": {
"type": "object",
"required": [
"id",
"createdAt",
"country",
"connectorID"
],
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"country": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"accountID": {
"type": "string"
},
"provider": {
"type": "string"
},
"iban": {
"type": "string"
},
"accountNumber": {
"type": "string"
},
"swiftBicCode": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/BankAccountMetadata"
}
}
},
"BankAccountMetadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
},
"Payment": {
"type": "object",
"required": [
"id",
"reference",
"connectorID",
"sourceAccountID",
"destinationAccountID",
"type",
"status",
"initialAmount",
"amount",
"scheme",
"asset",
"createdAt",
"raw",
"adjustments",
"metadata"
],
"properties": {
"id": {
"type": "string",
"example": "XXX"
},
"reference": {
"type": "string"
},
"sourceAccountID": {
"type": "string"
},
"destinationAccountID": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"provider": {
"$ref": "#/components/schemas/Connector"
},
"type": {
"$ref": "#/components/schemas/PaymentType"
},
"status": {
"$ref": "#/components/schemas/PaymentStatus"
},
"initialAmount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"scheme": {
"$ref": "#/components/schemas/PaymentScheme"
},
"asset": {
"type": "string",
"example": "USD"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"raw": {
"type": "object",
"nullable": true
},
"adjustments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentAdjustment"
}
},
"metadata": {
"$ref": "#/components/schemas/PaymentMetadata"
}
}
},
"PaymentAdjustment": {
"type": "object",
"required": [
"status",
"amount",
"date",
"raw",
"absolute"
],
"properties": {
"status": {
"$ref": "#/components/schemas/PaymentStatus"
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"date": {
"type": "string",
"format": "date-time"
},
"raw": {
"type": "object"
},
"absolute": {
"type": "boolean"
}
}
},
"PaymentMetadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
},
"AccountMetadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
},
"Pool": {
"type": "object",
"required": [
"id",
"name",
"accounts"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"PoolBalances": {
"type": "object",
"required": [
"balances"
],
"properties": {
"balances": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PoolBalance"
}
}
}
},
"PoolBalance": {
"type": "object",
"required": [
"amount",
"asset"
],
"properties": {
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"asset": {
"type": "string",
"example": "USD"
}
}
},
"paymentsAccount": {
"type": "object",
"required": [
"id",
"createdAt",
"reference",
"connectorID",
"defaultCurrency",
"defaultAsset",
"accountName",
"type",
"metadata",
"raw"
],
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"reference": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"defaultCurrency": {
"type": "string",
"deprecated": true
},
"defaultAsset": {
"type": "string"
},
"accountName": {
"type": "string"
},
"type": {
"type": "string"
},
"pools": {
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"$ref": "#/components/schemas/AccountMetadata"
},
"raw": {
"type": "object",
"nullable": true
}
}
},
"AccountBalance": {
"type": "object",
"required": [
"accountId",
"createdAt",
"lastUpdatedAt",
"currency",
"asset",
"balance"
],
"properties": {
"accountId": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"lastUpdatedAt": {
"type": "string",
"format": "date-time"
},
"currency": {
"type": "string",
"deprecated": true
},
"asset": {
"type": "string"
},
"balance": {
"type": "integer",
"format": "bigint"
}
}
},
"TaskBase": {
"type": "object",
"required": [
"id",
"connectorID",
"createdAt",
"updatedAt",
"descriptor",
"status",
"state"
],
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"connectorID": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"status": {
"$ref": "#/components/schemas/PaymentStatus"
},
"state": {
"type": "object"
},
"error": {
"type": "string"
}
}
},
"TaskStripe": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"required": [
"name",
"account"
],
"properties": {
"name": {
"type": "string"
},
"main": {
"type": "boolean"
},
"account": {
"type": "string"
}
}
}
}
}
]
},
"TaskWise": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"profileID": {
"type": "integer",
"format": "int64",
"minimum": 0
}
}
}
}
}
]
},
"TaskModulr": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"accountID": {
"type": "string"
}
}
}
}
}
]
},
"TaskDummyPay": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"fileName": {
"type": "string"
}
}
}
}
}
]
},
"TaskCurrencyCloud": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
]
},
"TaskBankingCircle": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
}
}
}
}
]
},
"TaskMangoPay": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"userID": {
"type": "string"
}
}
}
}
}
]
},
"TaskMoneycorp": {
"allOf": [
{
"$ref": "#/components/schemas/TaskBase"
},
{
"type": "object",
"required": [
"descriptor"
],
"properties": {
"descriptor": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
},
"accountID": {
"type": "string"
}
}
}
}
}
]
},
"TransferRequest": {
"type": "object",
"required": [
"asset",
"amount",
"destination"
],
"properties": {
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"asset": {
"type": "string",
"example": "USD"
},
"destination": {
"type": "string",
"example": "acct_1Gqj58KZcSIg2N2q"
},
"source": {
"type": "string",
"example": "acct_1Gqj58KZcSIg2N2q"
}
}
},
"BankAccountRequest": {
"type": "object",
"required": [
"country",
"connectorID",
"name"
],
"properties": {
"country": {
"type": "string",
"example": "GB"
},
"connectorID": {
"type": "string"
},
"name": {
"type": "string",
"example": "My account"
},
"accountNumber": {
"type": "string"
},
"iban": {
"type": "string"
},
"swiftBicCode": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/BankAccountMetadata"
}
}
},
"AddAccountToPoolRequest": {
"type": "object",
"required": [
"accountID"
],
"properties": {
"accountID": {
"type": "string"
}
}
},
"PoolRequest": {
"type": "object",
"required": [
"name",
"accountIDs"
],
"properties": {
"name": {
"type": "string"
},
"accountIDs": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"PaymentRequest": {
"type": "object",
"required": [
"reference",
"connectorID",
"createdAt",
"amount",
"type",
"status",
"scheme",
"asset"
],
"properties": {
"reference": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"type": {
"$ref": "#/components/schemas/PaymentType"
},
"status": {
"$ref": "#/components/schemas/PaymentStatus"
},
"scheme": {
"$ref": "#/components/schemas/PaymentScheme"
},
"asset": {
"type": "string",
"example": "USD"
},
"sourceAccountID": {
"type": "string"
},
"destinationAccountID": {
"type": "string"
}
}
},
"TransferInitiationRequest": {
"type": "object",
"required": [
"reference",
"scheduledAt",
"description",
"sourceAccountID",
"destinationAccountID",
"type",
"amount",
"asset",
"validated"
],
"properties": {
"reference": {
"type": "string",
"example": "XXX"
},
"scheduledAt": {
"type": "string",
"format": "date-time"
},
"description": {
"type": "string"
},
"sourceAccountID": {
"type": "string"
},
"destinationAccountID": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"provider": {
"$ref": "#/components/schemas/Connector"
},
"type": {
"type": "string",
"enum": [
"TRANSFER",
"PAYOUT"
]
},
"amount": {
"type": "integer",
"format": "bigint"
},
"asset": {
"type": "string",
"example": "USD"
},
"validated": {
"type": "boolean"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
}
}
},
"UpdateTransferInitiationStatusRequest": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"enum": [
"WAITING_FOR_VALIDATION",
"PROCESSING",
"PROCESSED",
"FAILED",
"REJECTED",
"VALIDATED"
]
}
}
},
"PaymentType": {
"type": "string",
"enum": [
"PAY-IN",
"PAYOUT",
"TRANSFER",
"OTHER"
]
},
"PaymentScheme": {
"type": "string",
"enum": [
"unknown",
"other",
"visa",
"mastercard",
"amex",
"diners",
"discover",
"jcb",
"unionpay",
"alipay",
"cup",
"sepa debit",
"sepa credit",
"sepa",
"apple pay",
"google pay",
"doku",
"dragonpay",
"maestro",
"molpay",
"a2a",
"ach debit",
"ach",
"rtp"
]
},
"PaymentStatus": {
"type": "string",
"enum": [
"PENDING",
"SUCCEEDED",
"CANCELLED",
"FAILED",
"EXPIRED",
"REFUNDED",
"OTHER"
]
},
"Query": {
"type": "object",
"properties": {
"ledgers": {
"type": "array",
"items": {
"type": "string",
"example": "quickstart"
}
},
"after": {
"type": "array",
"items": {
"type": "string",
"example": "users:002"
}
},
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"terms": {
"type": "array",
"items": {
"type": "string",
"example": "destination=central_bank1"
}
},
"sort": {
"type": "string",
"example": "id:asc"
},
"policy": {
"type": "string",
"example": "OR"
},
"target": {
"type": "string"
},
"cursor": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"raw": {
"type": "object",
"example": {
"query": {
"match_all": {}
}
}
}
}
},
"Response": {
"type": "object",
"properties": {
"data": {
"type": "object",
"description": "The payload",
"additionalProperties": true
},
"cursor": {
"title": "cursor",
"type": "object",
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"hasMore": {
"type": "boolean"
},
"total": {
"title": "total",
"type": "object",
"properties": {
"value": {
"type": "integer",
"format": "int64",
"minimum": 0,
"example": 1
},
"relation": {
"type": "string",
"example": "eq"
}
}
},
"next": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"data": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"additionalProperties": true
}
]
}
}
}
}
}
},
"ConfigUser": {
"type": "object",
"required": [
"endpoint",
"eventTypes"
],
"properties": {
"endpoint": {
"type": "string",
"example": "https://example.com"
},
"secret": {
"type": "string",
"example": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"
},
"eventTypes": {
"type": "array",
"items": {
"type": "string",
"example": "TYPE1"
},
"example": [
"TYPE1",
"TYPE2"
]
}
}
},
"ConfigsResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/Cursor"
},
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/WebhooksConfig"
},
"type": "array"
}
},
"type": "object",
"required": [
"data"
]
}
]
}
}
},
"Cursor": {
"type": "object",
"required": [
"hasMore",
"data"
],
"properties": {
"hasMore": {
"type": "boolean",
"example": false
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WebhooksConfig"
}
}
}
},
"ConfigResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WebhooksConfig"
}
}
},
"WebhooksConfig": {
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"endpoint": {
"type": "string",
"example": "https://example.com"
},
"secret": {
"type": "string",
"example": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"
},
"eventTypes": {
"type": "array",
"items": {
"type": "string",
"example": "TYPE1"
},
"example": [
"TYPE1",
"TYPE2"
]
},
"active": {
"type": "boolean",
"example": true
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"endpoint",
"secret",
"eventTypes",
"active",
"createdAt",
"updatedAt"
]
},
"ConfigChangeSecret": {
"type": "object",
"properties": {
"secret": {
"type": "string",
"example": "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3"
}
},
"required": [
"secret"
]
},
"AttemptResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Attempt"
}
}
},
"Attempt": {
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"webhookID": {
"type": "string",
"format": "uuid"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"config": {
"$ref": "#/components/schemas/WebhooksConfig"
},
"payload": {
"type": "string",
"example": "{\"data\":\"test\"}"
},
"statusCode": {
"type": "integer",
"example": 200
},
"retryAttempt": {
"type": "integer",
"example": 1
},
"status": {
"type": "string",
"example": "success"
},
"nextRetryAfter": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"webhookID",
"createdAt",
"updatedAt",
"config",
"payload",
"statusCode",
"retryAttempt",
"status"
]
},
"webhooksErrorResponse": {
"type": "object",
"required": [
"errorCode",
"errorMessage"
],
"properties": {
"errorCode": {
"$ref": "#/components/schemas/webhooksErrorsEnum"
},
"errorMessage": {
"type": "string",
"example": "[VALIDATION] invalid 'cursor' query param"
},
"details": {
"type": "string",
"example": "https://play.numscript.org/?payload=eyJlcnJvciI6ImFjY291bnQgaGFkIGluc3VmZmljaWVudCBmdW5kcyJ9"
}
}
},
"webhooksErrorsEnum": {
"type": "string",
"enum": [
"INTERNAL",
"VALIDATION",
"NOT_FOUND"
],
"example": "VALIDATION"
},
"Monetary": {
"type": "object",
"required": [
"asset",
"amount"
],
"properties": {
"asset": {
"type": "string",
"description": "The asset of the monetary value."
},
"amount": {
"type": "integer",
"format": "bigint",
"description": "The amount of the monetary value."
}
}
},
"Wallet": {
"type": "object",
"required": [
"name",
"id",
"metadata",
"createdAt",
"ledger"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The unique ID of the wallet."
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Metadata associated with the wallet."
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"ledger": {
"type": "string"
}
}
},
"WalletWithBalances": {
"type": "object",
"required": [
"name",
"id",
"metadata",
"createdAt",
"balances",
"ledger"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The unique ID of the wallet."
},
"metadata": {
"type": "object",
"description": "Metadata associated with the wallet.",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"balances": {
"type": "object",
"required": [
"main"
],
"properties": {
"main": {
"$ref": "#/components/schemas/AssetHolder"
}
}
},
"ledger": {
"type": "string"
}
}
},
"Hold": {
"type": "object",
"required": [
"id",
"walletID",
"metadata",
"description"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The unique ID of the hold."
},
"walletID": {
"type": "string",
"description": "The ID of the wallet the hold is associated with."
},
"metadata": {
"type": "object",
"description": "Metadata associated with the hold.",
"additionalProperties": {
"type": "string"
}
},
"description": {
"type": "string"
},
"destination": {
"$ref": "#/components/schemas/Subject"
}
}
},
"ExpandedDebitHold": {
"allOf": [
{
"$ref": "#/components/schemas/Hold"
},
{
"type": "object",
"required": [
"remaining",
"originalAmount"
],
"properties": {
"remaining": {
"type": "integer",
"description": "Remaining amount on hold",
"example": 10,
"format": "bigint"
},
"originalAmount": {
"type": "integer",
"description": "Original amount on hold",
"example": 100,
"format": "bigint"
}
}
}
]
},
"ListWalletsResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/walletsCursor"
},
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/Wallet"
},
"type": "array"
}
},
"type": "object",
"required": [
"data"
]
}
]
}
}
},
"CreateWalletResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Wallet"
}
}
},
"GetWalletResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WalletWithBalances"
}
}
},
"DebitWalletResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Hold"
}
}
},
"walletsAggregatedVolumes": {
"type": "object",
"x-go-type": {
"type": "AggregatedVolumes"
},
"additionalProperties": {
"$ref": "#/components/schemas/walletsVolumes"
}
},
"walletsTransaction": {
"type": "object",
"properties": {
"ledger": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Posting"
}
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Metadata associated with the wallet."
},
"id": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"preCommitVolumes": {
"$ref": "#/components/schemas/walletsAggregatedVolumes"
},
"postCommitVolumes": {
"$ref": "#/components/schemas/walletsAggregatedVolumes"
}
},
"required": [
"postings",
"timestamp",
"id",
"metadata"
]
},
"walletsCursor": {
"type": "object",
"required": [
"pageSize"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
}
}
},
"GetTransactionsResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/walletsCursor"
},
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/walletsTransaction"
},
"type": "array"
}
},
"type": "object",
"required": [
"data"
]
}
]
}
}
},
"GetHoldsResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/walletsCursor"
},
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/Hold"
},
"type": "array"
}
},
"type": "object",
"required": [
"data"
]
}
]
}
}
},
"GetHoldResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/ExpandedDebitHold"
}
}
},
"CreateWalletRequest": {
"type": "object",
"required": [
"name",
"metadata"
],
"properties": {
"metadata": {
"type": "object",
"description": "Custom metadata to attach to this wallet.",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string"
}
}
},
"walletsVolume": {
"type": "object",
"properties": {
"input": {
"type": "integer",
"format": "bigint"
},
"output": {
"type": "integer",
"format": "bigint"
},
"balance": {
"type": "integer",
"format": "bigint"
}
},
"required": [
"input",
"output",
"balance"
],
"example": {
"input": 100,
"output": 20,
"balance": 80
}
},
"walletsVolumes": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/walletsVolume"
},
"example": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
},
"EUR": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"ConfirmHoldRequest": {
"type": "object",
"properties": {
"amount": {
"type": "integer",
"format": "bigint",
"example": 100,
"description": "Define the amount to transfer."
},
"final": {
"type": "boolean",
"example": true,
"description": "Define a final confirmation. Remaining funds will be returned to the wallet."
}
}
},
"LedgerAccountSubject": {
"type": "object",
"required": [
"type",
"identifier"
],
"properties": {
"type": {
"type": "string"
},
"identifier": {
"type": "string"
}
}
},
"WalletSubject": {
"type": "object",
"required": [
"type",
"identifier"
],
"properties": {
"type": {
"type": "string"
},
"identifier": {
"type": "string"
},
"balance": {
"type": "string"
}
}
},
"Subject": {
"discriminator": {
"propertyName": "type",
"mapping": {
"ACCOUNT": "#/components/schemas/LedgerAccountSubject",
"WALLET": "#/components/schemas/WalletSubject"
}
},
"oneOf": [
{
"$ref": "#/components/schemas/LedgerAccountSubject"
},
{
"$ref": "#/components/schemas/WalletSubject"
}
]
},
"CreditWalletRequest": {
"type": "object",
"required": [
"amount",
"sources",
"metadata"
],
"properties": {
"amount": {
"$ref": "#/components/schemas/Monetary"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Metadata associated with the wallet."
},
"reference": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Subject"
}
},
"balance": {
"type": "string",
"description": "The balance to credit"
}
},
"example": {
"amount": {
"asset": "USD/2",
"amount": 100
},
"metadata": {
"key": ""
},
"sources": []
}
},
"DebitWalletRequest": {
"type": "object",
"required": [
"amount",
"metadata"
],
"properties": {
"amount": {
"$ref": "#/components/schemas/Monetary"
},
"pending": {
"type": "boolean",
"description": "Set to true to create a pending hold. If false, the wallet will be debited immediately."
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Metadata associated with the wallet."
},
"description": {
"type": "string"
},
"destination": {
"$ref": "#/components/schemas/Subject"
},
"balances": {
"type": "array",
"items": {
"type": "string",
"description": "A targeted balance (use '*' for all)"
}
}
},
"example": {
"amount": {
"asset": "USD/2",
"amount": 100
},
"metadata": {
"key": ""
},
"pending": true
}
},
"AssetHolder": {
"type": "object",
"required": [
"assets"
],
"properties": {
"assets": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
}
}
},
"Balance": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"priority": {
"type": "integer",
"format": "bigint"
}
}
},
"BalanceWithAssets": {
"allOf": [
{
"$ref": "#/components/schemas/Balance"
},
{
"$ref": "#/components/schemas/AssetHolder"
}
]
},
"GetWalletSummaryResponse": {
"type": "object",
"required": [
"balances",
"availableFunds",
"expiredFunds",
"expirableFunds",
"holdFunds"
],
"properties": {
"balances": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BalanceWithAssets"
}
},
"availableFunds": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
},
"expiredFunds": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
},
"expirableFunds": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
},
"holdFunds": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
}
}
},
"ListBalancesResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/walletsCursor"
},
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/Balance"
},
"type": "array"
}
},
"type": "object",
"required": [
"data"
]
}
]
}
}
},
"GetBalanceResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/BalanceWithAssets"
}
}
},
"CreateBalanceRequest": {
"$ref": "#/components/schemas/Balance"
},
"CreateBalanceResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Balance"
}
}
},
"walletsErrorResponse": {
"type": "object",
"required": [
"errorCode",
"errorMessage"
],
"properties": {
"errorCode": {
"type": "string",
"enum": [
"VALIDATION",
"INTERNAL_ERROR",
"INSUFFICIENT_FUND",
"HOLD_CLOSED"
]
},
"errorMessage": {
"type": "string"
}
}
},
"Error": {
"type": "object",
"required": [
"errorCode",
"errorMessage"
],
"properties": {
"errorCode": {
"type": "string",
"enum": [
"VALIDATION",
"NOT_FOUND",
"INTERNAL"
]
},
"errorMessage": {
"type": "string"
}
}
},
"WorkflowConfig": {
"type": "object",
"required": [
"stages"
],
"properties": {
"name": {
"type": "string"
},
"stages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
}
}
},
"Workflow": {
"type": "object",
"required": [
"config",
"createdAt",
"updatedAt",
"id"
],
"properties": {
"config": {
"$ref": "#/components/schemas/WorkflowConfig"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "string"
}
}
},
"StageStatus": {
"type": "object",
"required": [
"stage",
"instanceID",
"startedAt"
],
"properties": {
"stage": {
"type": "number"
},
"instanceID": {
"type": "string"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
},
"error": {
"type": "string"
}
}
},
"WorkflowInstance": {
"type": "object",
"required": [
"workflowID",
"id",
"createdAt",
"updatedAt",
"terminated"
],
"properties": {
"workflowID": {
"type": "string"
},
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "array",
"items": {
"$ref": "#/components/schemas/StageStatus"
}
},
"terminated": {
"type": "boolean"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
},
"error": {
"type": "string"
}
}
},
"WorkflowInstanceHistoryStage": {
"type": "object",
"required": [
"name",
"input",
"startedAt",
"terminated",
"attempt"
],
"properties": {
"name": {
"type": "string"
},
"input": {
"$ref": "#/components/schemas/WorkflowInstanceHistoryStageInput"
},
"output": {
"$ref": "#/components/schemas/WorkflowInstanceHistoryStageOutput"
},
"error": {
"type": "string"
},
"terminated": {
"type": "boolean"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
},
"lastFailure": {
"type": "string"
},
"attempt": {
"type": "integer"
},
"nextExecution": {
"type": "string",
"format": "date-time"
}
}
},
"WorkflowInstanceHistory": {
"type": "object",
"required": [
"name",
"input",
"terminated",
"startedAt"
],
"properties": {
"name": {
"type": "string"
},
"input": {
"$ref": "#/components/schemas/Stage"
},
"error": {
"type": "string"
},
"terminated": {
"type": "boolean"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"WorkflowInstanceHistoryList": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkflowInstanceHistory"
}
},
"WorkflowInstanceHistoryStageList": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkflowInstanceHistoryStage"
}
},
"ListWorkflowsResponse": {
"type": "object",
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/Workflow"
},
"type": "array"
}
},
"required": [
"data"
]
},
"TriggerData": {
"type": "object",
"required": [
"event",
"workflowID"
],
"properties": {
"event": {
"type": "string"
},
"workflowID": {
"type": "string"
},
"filter": {
"type": "string"
},
"vars": {
"type": "object",
"additionalProperties": true
}
}
},
"Trigger": {
"allOf": [
{
"$ref": "#/components/schemas/TriggerData"
},
{
"type": "object",
"required": [
"id",
"createdAt"
],
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
}
}
]
},
"TriggerOccurrence": {
"type": "object",
"required": [
"triggerID",
"workflowInstanceID",
"workflowInstance",
"date",
"event"
],
"properties": {
"date": {
"type": "string",
"format": "date-time"
},
"workflowInstanceID": {
"type": "string"
},
"workflowInstance": {
"$ref": "#/components/schemas/WorkflowInstance"
},
"triggerID": {
"type": "string"
},
"event": {
"type": "object",
"additionalProperties": true
}
}
},
"ListTriggersOccurrencesResponse": {
"type": "object",
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/TriggerOccurrence"
},
"type": "array"
}
},
"required": [
"data"
]
},
"ListTriggersResponse": {
"type": "object",
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/Trigger"
},
"type": "array"
}
},
"required": [
"data"
]
},
"ReadWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workflow"
}
}
},
"CreateWorkflowRequest": {
"$ref": "#/components/schemas/WorkflowConfig"
},
"CreateWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workflow"
}
}
},
"CreateTriggerResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Trigger"
}
}
},
"RunWorkflowRequest": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"RunWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WorkflowInstance"
}
}
},
"ListRunsResponse": {
"required": [
"data"
],
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/WorkflowInstance"
},
"type": "array"
}
}
},
"GetWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Workflow"
}
}
},
"GetWorkflowInstanceResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WorkflowInstance"
}
}
},
"GetWorkflowInstanceHistoryResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WorkflowInstanceHistoryList"
}
}
},
"GetWorkflowInstanceHistoryStageResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/WorkflowInstanceHistoryStageList"
}
}
},
"StageSendSourceWallet": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"balance": {
"type": "string"
}
}
},
"StageSendDestinationWallet": {
"$ref": "#/components/schemas/StageSendSourceWallet"
},
"StageSendSourceAccount": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"ledger": {
"type": "string"
}
}
},
"StageSendDestinationAccount": {
"$ref": "#/components/schemas/StageSendSourceAccount"
},
"StageSendSourcePayment": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"StageSendDestinationPayment": {
"type": "object",
"required": [
"psp"
],
"properties": {
"psp": {
"type": "string"
}
}
},
"StageSendSource": {
"type": "object",
"properties": {
"wallet": {
"$ref": "#/components/schemas/StageSendSourceWallet"
},
"account": {
"$ref": "#/components/schemas/StageSendSourceAccount"
},
"payment": {
"$ref": "#/components/schemas/StageSendSourcePayment"
}
}
},
"StageSendDestination": {
"type": "object",
"properties": {
"wallet": {
"$ref": "#/components/schemas/StageSendDestinationWallet"
},
"account": {
"$ref": "#/components/schemas/StageSendDestinationAccount"
},
"payment": {
"$ref": "#/components/schemas/StageSendDestinationPayment"
}
}
},
"StageSend": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/components/schemas/Monetary"
},
"destination": {
"$ref": "#/components/schemas/StageSendDestination"
},
"source": {
"$ref": "#/components/schemas/StageSendSource"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"StageDelay": {
"type": "object",
"properties": {
"until": {
"type": "string",
"format": "date-time"
},
"duration": {
"type": "string"
}
}
},
"StageWaitEvent": {
"type": "object",
"required": [
"event"
],
"properties": {
"event": {
"type": "string"
}
}
},
"Stage": {
"anyOf": [
{
"$ref": "#/components/schemas/StageSend"
},
{
"$ref": "#/components/schemas/StageDelay"
},
{
"$ref": "#/components/schemas/StageWaitEvent"
}
]
},
"StripeTransferRequest": {
"type": "object",
"properties": {
"connectorID": {
"type": "string"
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"asset": {
"type": "string",
"example": "USD"
},
"destination": {
"type": "string",
"example": "acct_1Gqj58KZcSIg2N2q"
},
"waitingValidation": {
"type": "boolean",
"example": false,
"default": false
},
"metadata": {
"type": "object",
"description": "A set of key/value pairs that you can attach to a transfer object.\nIt can be useful for storing additional information about the transfer in a structured format.\n",
"example": {
"order_id": "6735"
}
}
}
},
"ActivityStripeTransfer": {
"$ref": "#/components/schemas/StripeTransferRequest"
},
"ActivityListWallets": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"ActivityListWalletsOutput": {
"$ref": "#/components/schemas/orchestrationListWalletsResponse"
},
"orchestrationListWalletsResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/orchestrationCursor"
},
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/Wallet"
},
"type": "array"
}
},
"type": "object",
"required": [
"data"
]
}
]
}
}
},
"orchestrationCursor": {
"type": "object",
"required": [
"pageSize"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
}
}
},
"ActivityGetAccount": {
"type": "object",
"required": [
"id",
"ledger"
],
"properties": {
"id": {
"type": "string"
},
"ledger": {
"type": "string"
}
}
},
"ActivityCreateTransaction": {
"type": "object",
"properties": {
"ledger": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/orchestrationPostTransaction"
}
}
},
"ActivityRevertTransaction": {
"type": "object",
"required": [
"id",
"ledger"
],
"properties": {
"ledger": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"ActivityGetPayment": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"ActivityConfirmHold": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"ActivityCreditWallet": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/CreditWalletRequest"
}
}
},
"ActivityDebitWallet": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/DebitWalletRequest"
}
}
},
"ActivityGetWallet": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"ActivityVoidHold": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"ActivityGetAccountOutput": {
"$ref": "#/components/schemas/orchestrationAccountResponse"
},
"ActivityCreateTransactionOutput": {
"$ref": "#/components/schemas/CreateTransactionResponse"
},
"CreateTransactionResponse": {
"properties": {
"data": {
"$ref": "#/components/schemas/orchestrationTransaction"
}
},
"type": "object",
"required": [
"data"
]
},
"orchestrationTransaction": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Posting"
}
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/orchestrationMetadata"
},
"id": {
"type": "integer",
"format": "bigint",
"minimum": 0
},
"reverted": {
"type": "boolean"
}
},
"required": [
"postings",
"timestamp",
"id",
"metadata",
"reverted"
]
},
"ActivityRevertTransactionOutput": {
"$ref": "#/components/schemas/RevertTransactionResponse"
},
"RevertTransactionResponse": {
"$ref": "#/components/schemas/CreateTransactionResponse"
},
"ActivityGetPaymentOutput": {
"$ref": "#/components/schemas/orchestrationPaymentResponse"
},
"orchestrationPaymentResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/orchestrationPayment"
}
}
},
"orchestrationPayment": {
"type": "object",
"required": [
"id",
"reference",
"connectorID",
"sourceAccountID",
"destinationAccountID",
"type",
"status",
"initialAmount",
"scheme",
"asset",
"createdAt",
"raw",
"adjustments",
"metadata"
],
"properties": {
"id": {
"type": "string",
"example": "XXX"
},
"reference": {
"type": "string"
},
"sourceAccountID": {
"type": "string"
},
"destinationAccountID": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"provider": {
"$ref": "#/components/schemas/orchestrationConnector"
},
"type": {
"type": "string",
"enum": [
"PAY-IN",
"PAYOUT",
"TRANSFER",
"OTHER"
]
},
"status": {
"$ref": "#/components/schemas/orchestrationPaymentStatus"
},
"initialAmount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"scheme": {
"type": "string",
"enum": [
"visa",
"mastercard",
"amex",
"diners",
"discover",
"jcb",
"unionpay",
"sepa debit",
"sepa credit",
"sepa",
"apple pay",
"google pay",
"a2a",
"ach debit",
"ach",
"rtp",
"unknown",
"other"
]
},
"asset": {
"type": "string",
"example": "USD"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"raw": {
"type": "object",
"nullable": true
},
"adjustments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/orchestrationPaymentAdjustment"
}
},
"metadata": {
"$ref": "#/components/schemas/orchestrationPaymentMetadata"
}
}
},
"orchestrationConnector": {
"type": "string",
"enum": [
"STRIPE",
"DUMMY-PAY",
"WISE",
"MODULR",
"CURRENCY-CLOUD",
"BANKING-CIRCLE",
"MANGOPAY",
"MONEYCORP"
]
},
"orchestrationPaymentAdjustment": {
"type": "object",
"required": [
"status",
"amount",
"date",
"raw",
"absolute"
],
"properties": {
"status": {
"$ref": "#/components/schemas/orchestrationPaymentStatus"
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"date": {
"type": "string",
"format": "date-time"
},
"raw": {
"type": "object"
},
"absolute": {
"type": "boolean"
}
}
},
"orchestrationPaymentStatus": {
"type": "string",
"enum": [
"PENDING",
"ACTIVE",
"TERMINATED",
"FAILED",
"SUCCEEDED",
"CANCELLED"
]
},
"orchestrationPaymentMetadata": {
"type": "object",
"properties": {
"key": {
"type": "string"
}
},
"nullable": true
},
"ActivityDebitWalletOutput": {
"$ref": "#/components/schemas/DebitWalletResponse"
},
"ActivityGetWalletOutput": {
"$ref": "#/components/schemas/GetWalletResponse"
},
"WorkflowInstanceHistoryStageInput": {
"type": "object",
"properties": {
"GetAccount": {
"$ref": "#/components/schemas/ActivityGetAccount"
},
"CreateTransaction": {
"$ref": "#/components/schemas/ActivityCreateTransaction"
},
"RevertTransaction": {
"$ref": "#/components/schemas/ActivityRevertTransaction"
},
"StripeTransfer": {
"$ref": "#/components/schemas/ActivityStripeTransfer"
},
"GetPayment": {
"$ref": "#/components/schemas/ActivityGetPayment"
},
"ConfirmHold": {
"$ref": "#/components/schemas/ActivityConfirmHold"
},
"CreditWallet": {
"$ref": "#/components/schemas/ActivityCreditWallet"
},
"DebitWallet": {
"$ref": "#/components/schemas/ActivityDebitWallet"
},
"GetWallet": {
"$ref": "#/components/schemas/ActivityGetWallet"
},
"VoidHold": {
"$ref": "#/components/schemas/ActivityVoidHold"
},
"ListWallets": {
"$ref": "#/components/schemas/ActivityListWallets"
}
}
},
"WorkflowInstanceHistoryStageOutput": {
"type": "object",
"properties": {
"GetAccount": {
"$ref": "#/components/schemas/ActivityGetAccountOutput"
},
"CreateTransaction": {
"$ref": "#/components/schemas/ActivityCreateTransactionOutput"
},
"RevertTransaction": {
"$ref": "#/components/schemas/ActivityRevertTransactionOutput"
},
"GetPayment": {
"$ref": "#/components/schemas/ActivityGetPaymentOutput"
},
"DebitWallet": {
"$ref": "#/components/schemas/ActivityDebitWalletOutput"
},
"GetWallet": {
"$ref": "#/components/schemas/ActivityGetWalletOutput"
},
"ListWallets": {
"$ref": "#/components/schemas/orchestrationListWalletsResponse"
}
}
},
"orchestrationPostTransaction": {
"type": "object",
"required": [
"metadata"
],
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Posting"
}
},
"script": {
"type": "object",
"properties": {
"plain": {
"type": "string",
"example": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n"
},
"vars": {
"type": "object",
"properties": {},
"additionalProperties": true,
"example": {
"user": "users:042"
}
}
},
"required": [
"plain"
]
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/orchestrationMetadata"
}
}
},
"orchestrationMetadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"admin": "true"
}
},
"orchestrationAccountResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/orchestrationAccount"
}
}
},
"ReadTriggerResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Trigger"
}
}
},
"orchestrationAccount": {
"type": "object",
"required": [
"address",
"metadata"
],
"properties": {
"address": {
"type": "string",
"example": "users:001"
},
"metadata": {
"type": "object",
"properties": {},
"additionalProperties": {
"type": "string"
},
"example": {
"admin": "true"
}
},
"volumes": {
"$ref": "#/components/schemas/Volumes"
},
"effectiveVolumes": {
"$ref": "#/components/schemas/Volumes"
}
}
},
"V2ServerInfo": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"type": "string"
}
}
},
"V2Error": {
"type": "object",
"required": [
"errorCode",
"errorMessage"
],
"properties": {
"errorCode": {
"type": "string",
"enum": [
"VALIDATION",
"NOT_FOUND",
"INTERNAL"
]
},
"errorMessage": {
"type": "string"
}
}
},
"V2WorkflowConfig": {
"type": "object",
"required": [
"stages"
],
"properties": {
"name": {
"type": "string"
},
"stages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
}
}
},
"V2Workflow": {
"type": "object",
"required": [
"config",
"createdAt",
"updatedAt",
"id"
],
"properties": {
"config": {
"$ref": "#/components/schemas/V2WorkflowConfig"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "string"
}
}
},
"V2StageStatus": {
"type": "object",
"required": [
"stage",
"instanceID",
"startedAt"
],
"properties": {
"stage": {
"type": "number"
},
"instanceID": {
"type": "string"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
},
"error": {
"type": "string"
}
}
},
"V2WorkflowInstance": {
"type": "object",
"required": [
"workflowID",
"id",
"createdAt",
"updatedAt",
"terminated"
],
"properties": {
"workflowID": {
"type": "string"
},
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2StageStatus"
}
},
"terminated": {
"type": "boolean"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
},
"error": {
"type": "string"
}
}
},
"V2WorkflowInstanceHistoryStage": {
"type": "object",
"required": [
"name",
"input",
"startedAt",
"terminated",
"attempt"
],
"properties": {
"name": {
"type": "string"
},
"input": {
"$ref": "#/components/schemas/V2WorkflowInstanceHistoryStageInput"
},
"output": {
"$ref": "#/components/schemas/V2WorkflowInstanceHistoryStageOutput"
},
"error": {
"type": "string"
},
"terminated": {
"type": "boolean"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
},
"lastFailure": {
"type": "string"
},
"attempt": {
"type": "integer"
},
"nextExecution": {
"type": "string",
"format": "date-time"
}
}
},
"V2WorkflowInstanceHistory": {
"type": "object",
"required": [
"name",
"input",
"terminated",
"startedAt"
],
"properties": {
"name": {
"type": "string"
},
"input": {
"$ref": "#/components/schemas/V2Stage"
},
"error": {
"type": "string"
},
"terminated": {
"type": "boolean"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"terminatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"V2WorkflowInstanceHistoryList": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2WorkflowInstanceHistory"
}
},
"V2WorkflowInstanceHistoryStageList": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2WorkflowInstanceHistoryStage"
}
},
"V2ListWorkflowsResponse": {
"type": "object",
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Workflow"
}
}
}
}
},
"required": [
"cursor"
]
},
"V2TriggerData": {
"type": "object",
"required": [
"event",
"workflowID"
],
"properties": {
"event": {
"type": "string"
},
"workflowID": {
"type": "string"
},
"filter": {
"type": "string"
},
"vars": {
"type": "object",
"additionalProperties": true
}
}
},
"V2Trigger": {
"allOf": [
{
"$ref": "#/components/schemas/V2TriggerData"
},
{
"type": "object",
"required": [
"id",
"createdAt"
],
"properties": {
"id": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
}
}
]
},
"V2TriggerOccurrence": {
"type": "object",
"required": [
"triggerID",
"workflowInstanceID",
"workflowInstance",
"date",
"event"
],
"properties": {
"date": {
"type": "string",
"format": "date-time"
},
"workflowInstanceID": {
"type": "string"
},
"workflowInstance": {
"$ref": "#/components/schemas/V2WorkflowInstance"
},
"triggerID": {
"type": "string"
},
"event": {
"type": "object",
"additionalProperties": true
}
}
},
"V2ListTriggersOccurrencesResponse": {
"type": "object",
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2TriggerOccurrence"
}
}
}
}
},
"required": [
"cursor"
]
},
"V2ListTriggersResponse": {
"type": "object",
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Trigger"
}
}
}
}
},
"required": [
"cursor"
]
},
"V2ReadWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Workflow"
}
}
},
"V2CreateWorkflowRequest": {
"$ref": "#/components/schemas/V2WorkflowConfig"
},
"V2CreateWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Workflow"
}
}
},
"V2CreateTriggerResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Trigger"
}
}
},
"V2RunWorkflowRequest": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"V2RunWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2WorkflowInstance"
}
}
},
"V2ListRunsResponse": {
"type": "object",
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2WorkflowInstance"
}
}
}
}
},
"required": [
"cursor"
]
},
"V2GetWorkflowResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Workflow"
}
}
},
"V2GetWorkflowInstanceResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2WorkflowInstance"
}
}
},
"V2GetWorkflowInstanceHistoryResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2WorkflowInstanceHistoryList"
}
}
},
"V2GetWorkflowInstanceHistoryStageResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2WorkflowInstanceHistoryStageList"
}
}
},
"V2StageSendSourceWallet": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"balance": {
"type": "string"
}
}
},
"V2StageSendDestinationWallet": {
"$ref": "#/components/schemas/V2StageSendSourceWallet"
},
"V2StageSendSourceAccount": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"ledger": {
"type": "string"
}
}
},
"V2StageSendDestinationAccount": {
"$ref": "#/components/schemas/V2StageSendSourceAccount"
},
"V2StageSendSourcePayment": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"V2StageSendDestinationPayment": {
"type": "object",
"required": [
"psp"
],
"properties": {
"psp": {
"type": "string"
}
}
},
"V2StageSendSource": {
"type": "object",
"properties": {
"wallet": {
"$ref": "#/components/schemas/V2StageSendSourceWallet"
},
"account": {
"$ref": "#/components/schemas/V2StageSendSourceAccount"
},
"payment": {
"$ref": "#/components/schemas/V2StageSendSourcePayment"
}
}
},
"V2StageSendDestination": {
"type": "object",
"properties": {
"wallet": {
"$ref": "#/components/schemas/V2StageSendDestinationWallet"
},
"account": {
"$ref": "#/components/schemas/V2StageSendDestinationAccount"
},
"payment": {
"$ref": "#/components/schemas/V2StageSendDestinationPayment"
}
}
},
"V2StageSend": {
"type": "object",
"properties": {
"amount": {
"$ref": "#/components/schemas/V2Monetary"
},
"destination": {
"$ref": "#/components/schemas/V2StageSendDestination"
},
"source": {
"$ref": "#/components/schemas/V2StageSendSource"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"V2StageDelay": {
"type": "object",
"properties": {
"until": {
"type": "string",
"format": "date-time"
},
"duration": {
"type": "string"
}
}
},
"V2StageWaitEvent": {
"type": "object",
"required": [
"event"
],
"properties": {
"event": {
"type": "string"
}
}
},
"V2Stage": {
"anyOf": [
{
"$ref": "#/components/schemas/V2StageSend"
},
{
"$ref": "#/components/schemas/V2StageDelay"
},
{
"$ref": "#/components/schemas/V2StageWaitEvent"
}
]
},
"V2StripeTransferRequest": {
"type": "object",
"properties": {
"connectorID": {
"type": "string"
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"asset": {
"type": "string",
"example": "USD"
},
"destination": {
"type": "string",
"example": "acct_1Gqj58KZcSIg2N2q"
},
"waitingValidation": {
"type": "boolean",
"example": false,
"default": false
},
"metadata": {
"type": "object",
"description": "A set of key/value pairs that you can attach to a transfer object.\nIt can be useful for storing additional information about the transfer in a structured format.\n",
"example": {
"order_id": "6735"
}
}
}
},
"V2ActivityStripeTransfer": {
"$ref": "#/components/schemas/V2StripeTransferRequest"
},
"V2ActivityListWallets": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"V2ActivityListWalletsOutput": {
"$ref": "#/components/schemas/V2ListWalletsResponse"
},
"V2ListWalletsResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"allOf": [
{
"$ref": "#/components/schemas/V2Cursor"
},
{
"properties": {
"data": {
"items": {
"$ref": "#/components/schemas/V2Wallet"
},
"type": "array"
}
},
"type": "object",
"required": [
"data"
]
}
]
}
}
},
"V2Wallet": {
"type": "object",
"required": [
"name",
"id",
"metadata",
"createdAt",
"ledger"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The unique ID of the wallet."
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Metadata associated with the wallet."
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"ledger": {
"type": "string"
}
}
},
"V2Cursor": {
"type": "object",
"required": [
"pageSize"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
}
}
},
"V2ActivityGetAccount": {
"type": "object",
"required": [
"id",
"ledger"
],
"properties": {
"id": {
"type": "string"
},
"ledger": {
"type": "string"
}
}
},
"V2ActivityCreateTransaction": {
"type": "object",
"properties": {
"ledger": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/V2PostTransaction"
}
}
},
"V2ActivityGetPayment": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"V2ActivityConfirmHold": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"V2ActivityCreditWallet": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/V2CreditWalletRequest"
}
}
},
"V2CreditWalletRequest": {
"type": "object",
"required": [
"amount",
"sources",
"metadata"
],
"properties": {
"amount": {
"$ref": "#/components/schemas/V2Monetary"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Metadata associated with the wallet."
},
"reference": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Subject"
}
},
"balance": {
"type": "string",
"description": "The balance to credit"
}
},
"example": {
"amount": {
"asset": "USD/2",
"amount": 100
},
"metadata": {
"key": ""
},
"sources": []
}
},
"V2LedgerAccountSubject": {
"type": "object",
"required": [
"type",
"identifier"
],
"properties": {
"type": {
"type": "string"
},
"identifier": {
"type": "string"
}
}
},
"V2WalletSubject": {
"type": "object",
"required": [
"type",
"identifier"
],
"properties": {
"type": {
"type": "string"
},
"identifier": {
"type": "string"
},
"balance": {
"type": "string"
}
}
},
"V2Subject": {
"discriminator": {
"propertyName": "type",
"mapping": {
"ACCOUNT": "#/components/schemas/V2LedgerAccountSubject",
"WALLET": "#/components/schemas/V2WalletSubject"
}
},
"oneOf": [
{
"$ref": "#/components/schemas/V2LedgerAccountSubject"
},
{
"$ref": "#/components/schemas/V2WalletSubject"
}
]
},
"V2ActivityDebitWallet": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"data": {
"$ref": "#/components/schemas/V2DebitWalletRequest"
}
}
},
"V2DebitWalletRequest": {
"type": "object",
"required": [
"amount",
"metadata"
],
"properties": {
"amount": {
"$ref": "#/components/schemas/V2Monetary"
},
"pending": {
"type": "boolean",
"description": "Set to true to create a pending hold. If false, the wallet will be debited immediately."
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Metadata associated with the wallet."
},
"description": {
"type": "string"
},
"destination": {
"$ref": "#/components/schemas/V2Subject"
},
"balances": {
"type": "array",
"items": {
"type": "string",
"description": "A targeted balance (use '*' for all)"
}
}
},
"example": {
"amount": {
"asset": "USD/2",
"amount": 100
},
"metadata": {
"key": ""
},
"pending": true
}
},
"V2ActivityGetWallet": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"V2ActivityVoidHold": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"V2ActivityGetAccountOutput": {
"$ref": "#/components/schemas/V2AccountResponse"
},
"V2ActivityCreateTransactionOutput": {
"$ref": "#/components/schemas/orchestrationV2CreateTransactionResponse"
},
"orchestrationV2CreateTransactionResponse": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/orchestrationV2Transaction"
}
}
},
"type": "object",
"required": [
"data"
]
},
"orchestrationV2Transaction": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"postings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2Posting"
}
},
"reference": {
"type": "string",
"example": "ref:001"
},
"metadata": {
"$ref": "#/components/schemas/V2Metadata"
},
"txid": {
"type": "integer",
"format": "bigint",
"minimum": 0
}
},
"required": [
"postings",
"timestamp",
"txid",
"metadata"
]
},
"V2ActivityGetPaymentOutput": {
"$ref": "#/components/schemas/V2PaymentResponse"
},
"V2PaymentResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Payment"
}
}
},
"V2Payment": {
"type": "object",
"required": [
"id",
"reference",
"connectorID",
"sourceAccountID",
"destinationAccountID",
"type",
"status",
"initialAmount",
"scheme",
"asset",
"createdAt",
"raw",
"adjustments",
"metadata"
],
"properties": {
"id": {
"type": "string",
"example": "XXX"
},
"reference": {
"type": "string"
},
"sourceAccountID": {
"type": "string"
},
"destinationAccountID": {
"type": "string"
},
"connectorID": {
"type": "string"
},
"provider": {
"$ref": "#/components/schemas/V2Connector"
},
"type": {
"type": "string",
"enum": [
"PAY-IN",
"PAYOUT",
"TRANSFER",
"OTHER"
]
},
"status": {
"$ref": "#/components/schemas/V2PaymentStatus"
},
"initialAmount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"scheme": {
"type": "string",
"enum": [
"visa",
"mastercard",
"amex",
"diners",
"discover",
"jcb",
"unionpay",
"sepa debit",
"sepa credit",
"sepa",
"apple pay",
"google pay",
"a2a",
"ach debit",
"ach",
"rtp",
"unknown",
"other"
]
},
"asset": {
"type": "string",
"example": "USD"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"raw": {
"type": "object",
"nullable": true
},
"adjustments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/V2PaymentAdjustment"
}
},
"metadata": {
"$ref": "#/components/schemas/V2PaymentMetadata"
}
}
},
"V2Connector": {
"type": "string",
"enum": [
"STRIPE",
"DUMMY-PAY",
"WISE",
"MODULR",
"CURRENCY-CLOUD",
"BANKING-CIRCLE",
"MANGOPAY",
"MONEYCORP"
]
},
"V2PaymentAdjustment": {
"type": "object",
"required": [
"status",
"amount",
"date",
"raw",
"absolute"
],
"properties": {
"status": {
"$ref": "#/components/schemas/V2PaymentStatus"
},
"amount": {
"type": "integer",
"format": "bigint",
"minimum": 0,
"example": 100
},
"date": {
"type": "string",
"format": "date-time"
},
"raw": {
"type": "object"
},
"absolute": {
"type": "boolean"
}
}
},
"V2PaymentStatus": {
"type": "string",
"enum": [
"PENDING",
"ACTIVE",
"TERMINATED",
"FAILED",
"SUCCEEDED",
"CANCELLED"
]
},
"V2PaymentMetadata": {
"type": "object",
"properties": {
"key": {
"type": "string"
}
},
"nullable": true
},
"V2ActivityDebitWalletOutput": {
"$ref": "#/components/schemas/V2DebitWalletResponse"
},
"V2DebitWalletResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Hold"
}
}
},
"V2Hold": {
"type": "object",
"required": [
"id",
"walletID",
"metadata",
"description"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The unique ID of the hold."
},
"walletID": {
"type": "string",
"description": "The ID of the wallet the hold is associated with."
},
"metadata": {
"type": "object",
"description": "Metadata associated with the hold.",
"additionalProperties": {
"type": "string"
}
},
"description": {
"type": "string"
},
"destination": {
"$ref": "#/components/schemas/V2Subject"
}
}
},
"V2ActivityGetWalletOutput": {
"$ref": "#/components/schemas/V2GetWalletResponse"
},
"V2GetWalletResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2WalletWithBalances"
}
}
},
"V2WalletWithBalances": {
"type": "object",
"required": [
"name",
"id",
"metadata",
"createdAt",
"balances",
"ledger"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The unique ID of the wallet."
},
"metadata": {
"type": "object",
"description": "Metadata associated with the wallet.",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"balances": {
"type": "object",
"required": [
"main"
],
"properties": {
"main": {
"$ref": "#/components/schemas/V2AssetHolder"
}
}
},
"ledger": {
"type": "string"
}
}
},
"V2AssetHolder": {
"type": "object",
"required": [
"assets"
],
"properties": {
"assets": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
}
}
},
"V2WorkflowInstanceHistoryStageInput": {
"type": "object",
"properties": {
"GetAccount": {
"$ref": "#/components/schemas/V2ActivityGetAccount"
},
"CreateTransaction": {
"$ref": "#/components/schemas/V2ActivityCreateTransaction"
},
"StripeTransfer": {
"$ref": "#/components/schemas/V2ActivityStripeTransfer"
},
"GetPayment": {
"$ref": "#/components/schemas/V2ActivityGetPayment"
},
"ConfirmHold": {
"$ref": "#/components/schemas/V2ActivityConfirmHold"
},
"CreditWallet": {
"$ref": "#/components/schemas/V2ActivityCreditWallet"
},
"DebitWallet": {
"$ref": "#/components/schemas/V2ActivityDebitWallet"
},
"GetWallet": {
"$ref": "#/components/schemas/V2ActivityGetWallet"
},
"VoidHold": {
"$ref": "#/components/schemas/V2ActivityVoidHold"
},
"ListWallets": {
"$ref": "#/components/schemas/V2ActivityListWallets"
}
}
},
"V2WorkflowInstanceHistoryStageOutput": {
"type": "object",
"properties": {
"GetAccount": {
"$ref": "#/components/schemas/V2ActivityGetAccountOutput"
},
"CreateTransaction": {
"$ref": "#/components/schemas/V2ActivityCreateTransactionOutput"
},
"GetPayment": {
"$ref": "#/components/schemas/V2ActivityGetPaymentOutput"
},
"DebitWallet": {
"$ref": "#/components/schemas/V2ActivityDebitWalletOutput"
},
"GetWallet": {
"$ref": "#/components/schemas/V2ActivityGetWalletOutput"
},
"ListWallets": {
"$ref": "#/components/schemas/V2ListWalletsResponse"
}
}
},
"V2Monetary": {
"type": "object",
"required": [
"asset",
"amount"
],
"properties": {
"asset": {
"type": "string",
"description": "The asset of the monetary value."
},
"amount": {
"type": "integer",
"format": "bigint",
"description": "The amount of the monetary value."
}
}
},
"V2ReadTriggerResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2Trigger"
}
}
},
"V2TestTriggerResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/V2TriggerTest"
}
}
},
"V2TriggerTest": {
"type": "object",
"properties": {
"filter": {
"type": "object",
"properties": {
"match": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"variables": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"error": {
"type": "string"
}
}
}
}
}
},
"PoliciesCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Policy"
}
}
}
}
}
},
"ReconciliationsCursorResponse": {
"type": "object",
"required": [
"cursor"
],
"properties": {
"cursor": {
"type": "object",
"required": [
"pageSize",
"hasMore",
"data"
],
"properties": {
"pageSize": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"example": 15
},
"hasMore": {
"type": "boolean",
"example": false
},
"previous": {
"type": "string",
"example": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol="
},
"next": {
"type": "string",
"example": ""
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Reconciliation"
}
}
}
}
}
},
"PolicyRequest": {
"type": "object",
"required": [
"name",
"ledgerName",
"ledgerQuery",
"paymentsPoolID"
],
"properties": {
"name": {
"type": "string",
"example": "XXX"
},
"ledgerName": {
"type": "string",
"example": "default"
},
"ledgerQuery": {
"type": "object",
"additionalProperties": true
},
"paymentsPoolID": {
"type": "string",
"example": "XXX"
}
}
},
"PolicyResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Policy"
}
}
},
"ReconciliationRequest": {
"type": "object",
"required": [
"reconciledAtLedger",
"reconciledAtPayments"
],
"properties": {
"reconciledAtLedger": {
"type": "string",
"format": "date-time",
"example": "2021-01-01T00:00:00.000Z"
},
"reconciledAtPayments": {
"type": "string",
"format": "date-time",
"example": "2021-01-01T00:00:00.000Z"
}
}
},
"ReconciliationResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Reconciliation"
}
}
},
"Policy": {
"type": "object",
"required": [
"id",
"name",
"createdAt",
"ledgerName",
"ledgerQuery",
"paymentsPoolID"
],
"properties": {
"id": {
"type": "string",
"example": "XXX"
},
"name": {
"type": "string",
"example": "XXX"
},
"createdAt": {
"type": "string",
"format": "date-time",
"example": "2021-01-01T00:00:00.000Z"
},
"ledgerName": {
"type": "string",
"example": "default"
},
"ledgerQuery": {
"type": "object",
"additionalProperties": true
},
"paymentsPoolID": {
"type": "string",
"example": "XXX"
}
}
},
"Reconciliation": {
"type": "object",
"required": [
"id",
"policyID",
"createdAt",
"reconciledAtLedger",
"reconciledAtPayments",
"status",
"paymentsBalances",
"ledgerBalances",
"driftBalances"
],
"properties": {
"id": {
"type": "string",
"example": "XXX"
},
"policyID": {
"type": "string",
"example": "XXX"
},
"createdAt": {
"type": "string",
"format": "date-time",
"example": "2021-01-01T00:00:00.000Z"
},
"reconciledAtLedger": {
"type": "string",
"format": "date-time",
"example": "2021-01-01T00:00:00.000Z"
},
"reconciledAtPayments": {
"type": "string",
"format": "date-time",
"example": "2021-01-01T00:00:00.000Z"
},
"status": {
"type": "string",
"example": "COMPLETED"
},
"paymentsBalances": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
},
"ledgerBalances": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
},
"driftBalances": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "bigint"
}
},
"error": {
"type": "string"
}
}
},
"reconciliationErrorResponse": {
"type": "object",
"required": [
"errorCode",
"errorMessage"
],
"properties": {
"errorCode": {
"type": "string",
"example": "VALIDATION"
},
"errorMessage": {
"type": "string"
},
"details": {
"type": "string"
}
}
}
},
"securitySchemes": {
"Authorization": {
"type": "oauth2",
"flows": {
"clientCredentials": {
"tokenUrl": "https://localhost/api/auth/oauth/token",
"refreshUrl": "https://localhost/api/auth/oauth/token",
"scopes": {}
}
}
}
},
"responses": {
"NoContent": {
"description": "No content"
},
"ServerInfo": {
"description": "Server information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerInfo"
}
}
}
},
"Payments": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentsCursor"
}
}
}
},
"Payment": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentResponse"
}
}
}
},
"Pools": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PoolsCursor"
}
}
}
},
"Pool": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PoolResponse"
}
}
}
},
"PoolBalances": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PoolBalancesResponse"
}
}
}
},
"TransferInitiations": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferInitiationsCursor"
}
}
}
},
"TransferInitiation": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferInitiationResponse"
}
}
}
},
"Accounts": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountsCursor"
}
}
}
},
"Account": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/paymentsAccountResponse"
}
}
}
},
"AccountBalances": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BalancesCursor"
}
}
}
},
"ConnectorInstalled": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectorResponse"
}
}
}
},
"Connectors": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectorsResponse"
}
}
}
},
"BankAccounts": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BankAccountsCursor"
}
}
}
},
"BankAccount": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BankAccountResponse"
}
}
}
},
"ConnectorsConfigs": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectorsConfigsResponse"
}
}
}
},
"ConnectorConfig": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectorConfigResponse"
}
}
}
},
"Tasks": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TasksCursor"
}
}
}
},
"Task": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskResponse"
}
}
}
},
"Transfer": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferResponse"
}
}
}
},
"Transfers": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransfersResponse"
}
}
}
},
"ErrorResponse": {
"description": "General error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"V2ErrorResponse": {
"description": "General error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2Error"
}
}
}
},
"Policies": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PoliciesCursorResponse"
}
}
}
},
"Policy": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PolicyResponse"
}
}
}
},
"Reconciliations": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReconciliationsCursorResponse"
}
}
}
},
"Reconciliation": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReconciliationResponse"
}
}
}
},
"reconciliationErrorResponse": {
"description": "Error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/reconciliationErrorResponse"
}
}
}
}
},
"parameters": {
"Query": {
"name": "query",
"in": "query",
"required": false,
"description": "Filters used to filter resources.\n",
"schema": {
"type": "string"
}
},
"PageSize": {
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000,
"default": 15
}
},
"Cursor": {
"name": "cursor",
"in": "query",
"description": "Parameter used in pagination requests. Maximum page size is set to 15.\nSet to the value of next for the next page of results.\nSet to the value of previous for the previous page of results.\nNo other parameters can be set when this parameter is set.\n",
"schema": {
"type": "string",
"example": "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
}
},
"Sort": {
"name": "sort",
"in": "query",
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Fields used to sort payments (default is date:desc).",
"example": [
"date:asc",
"status:desc"
]
},
"PaymentId": {
"name": "paymentId",
"in": "path",
"schema": {
"type": "string"
},
"description": "The payment ID.",
"example": "XXX",
"required": true
},
"AccountId": {
"name": "accountId",
"in": "path",
"schema": {
"type": "string"
},
"description": "The account ID.",
"example": "XXX",
"required": true
},
"ConnectorID": {
"name": "connectorId",
"in": "path",
"schema": {
"type": "string"
},
"description": "The connector ID.",
"example": "XXX",
"required": true
},
"PoolId": {
"name": "poolId",
"in": "path",
"schema": {
"type": "string"
},
"description": "The pool ID.",
"example": "XXX",
"required": true
},
"TransferId": {
"name": "transferId",
"in": "path",
"schema": {
"type": "string"
},
"description": "The transfer ID.",
"example": "XXX",
"required": true
},
"BankAccountId": {
"name": "bankAccountId",
"in": "path",
"schema": {
"type": "string"
},
"description": "The bank account ID.",
"example": "XXX",
"required": true
},
"Connector": {
"name": "connector",
"description": "The name of the connector.",
"in": "path",
"schema": {
"$ref": "#/components/schemas/Connector"
},
"required": true
},
"TaskId": {
"name": "taskId",
"description": "The task ID.",
"example": "task1",
"in": "path",
"schema": {
"type": "string"
},
"required": true
},
"reconciliationPageSize": {
"name": "pageSize",
"in": "query",
"description": "The maximum number of results to return per page.\n",
"example": 100,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 1000
}
},
"PolicyID": {
"name": "policyID",
"in": "path",
"schema": {
"type": "string"
},
"description": "The policy ID.",
"example": "XXX",
"required": true
},
"ReconciliationID": {
"name": "reconciliationID",
"in": "path",
"schema": {
"type": "string"
},
"description": "The reconciliation ID.",
"example": "XXX",
"required": true
}
},
"requestBodies": {
"ConnectorConfig": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectorConfig"
}
}
}
},
"UpdateMetadata": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentMetadata"
}
}
}
},
"Payment": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentRequest"
}
}
}
},
"Pool": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PoolRequest"
}
}
}
},
"AddAccountToPool": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AddAccountToPoolRequest"
}
}
}
},
"TransferInitiation": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferInitiationRequest"
}
}
}
},
"BankAccount": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BankAccountRequest"
}
}
}
},
"UpdateTransferInitiationStatus": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateTransferInitiationStatusRequest"
}
}
}
},
"Transfer": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransferRequest"
}
}
}
},
"Policy": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PolicyRequest"
}
}
}
},
"Reconciliation": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReconciliationRequest"
}
}
}
}
}
},
"x-tagGroups": [
{
"name": "Auth",
"tags": [
"Clients",
"Scopes",
"Users",
"Auth"
]
},
{
"name": "Ledger",
"tags": [
"Ledger",
"Server",
"Accounts",
"Mapping",
"Script",
"Stats",
"Transactions",
"Balances",
"server",
"accounts",
"mapping",
"script",
"stats",
"transactions",
"balances"
]
},
{
"name": "Payments",
"tags": [
"Payments"
]
},
{
"name": "Search",
"tags": [
"Search"
]
},
{
"name": "Wallets",
"tags": [
"Wallets"
]
},
{
"name": "Webhooks",
"tags": [
"Webhooks"
]
},
{
"name": "Flows",
"tags": [
"Orchestration"
]
},
{
"name": "Reconciliation",
"tags": [
"Reconciliation"
]
}
]
}