NAV Navigation
Python JavaScript Node.JS Ruby

Bewaarder Custody API v1.2.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

This document serves as reference for the Bewaarder Custody API. It specifies the operations available to authenticated service consumers.


Authentication relies on the JSON Web Token (JWT) standard and offers access to the set of restricted operations per user role.


An additional authorization is required for critical administrative operations.

Base URLs:

Terms of service Email: API Support Web: API Support

Authentication

Authorization: Bearer

authenticationToken

authenticationToken

External documentation

Fetches a JWT authentication token

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://core.bewaarder.de/v1/authentication-token', headers = headers)

print(r.json())

const inputBody = '{
  "email": "[email protected]",
  "password": "azerty"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://core.bewaarder.de/v1/authentication-token',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "email": "[email protected]",
  "password": "azerty"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://core.bewaarder.de/v1/authentication-token',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://core.bewaarder.de/v1/authentication-token',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /authentication-token

This service authenticate the user and provides a JWT required to interact with Bewaarder. The JWT has a configurable lifetime (5 hours by default).
Access allowed to:

Body parameter

{
  "email": "[email protected]",
  "password": "azerty"
}

Parameters

Name In Type Required Description
body body authenticationTokenRequest true none

Example responses

200 Response

{
  "token": "eyJraWQiOiI1ZjU5MzMzMy0yNjJiLTQxOTEtYjExOC1jMjVmYzM3NjgzODBfc2lnX3JzMjU2IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhdF9oYXNoIjoiNHRrOUNSQm05RmxMTER2dUtYOFl5QSIsImF1ZCI6IjAyMDNmOGZjLTZkNDgtNGI4Ny04NTgwLWYwZDA5ZjBlYjU1OSIsInN1YiI6IlFtMURvcG5nZmFNckQxbXdrTUNicUZfQi1Uc0R0a0s4MC1CanBfYW5hMUUiLCJhdXRoX3RpbWUiOjE1OTA0MTA5NjYsImlzcyI6Imh0dHBzOi8vYXV0aC5iZXdhYXJkZXIuZGUiLCJleHAiOjE1OTA0NDg2NTksImlhdCI6MTU5MDQ0NTA1OSwib3hPcGVuSURDb25uZWN0VmVyc2lvbiI6Im9wZW5pZGNvbm5lY3QtMS4wIn0.jGhBpfnqdyd9qfuEiI7rS2UUkzQqcDhqBetvxAibbssImoWM-TQqSOLWdSGOW1UEV5E5Yk_v80q18Y5qjD4H6NkrVSwx4QjhDyCGTFvnvFaiSeKedZeY475Sxxy6zLMbAX5ptEIAW_O1h6JiY01wM38ExVLgadIZvyKh13T_DXirPozzBSJcxdxlJgOooWPN9UqpHu801SIBGOoI5Ov1DQXavz-qje7gHetUHEziKhuSZ5bOQ9FugukZ5JAgcetQNk83jCHl7NwSZUEyeYA5vZ8IgjaRxj-tN9rp6v3IuyCeznObhar31NPJq6qWBKdmqujZtuurUwb65evck8f-Jg"
}

400 Response

{
  "message": "Invalid payload"
}

Responses

Status Meaning Description Schema
200 OK JWT Token authenticationTokenResponse
400 Bad Request Bad request. errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

events

events

External documentation

Fetch notification events

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/events', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/events',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/events',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/events',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /events

This service returns all notification events related to their respective role.

Query parameters for the collection:


Access allowed to: - Admin - PolicyOperator (if they are assigned readAll permissions to the policy) - Super Auditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
offset query integer(int64) false Offset in the stream to start from. The sequence is 1 based (as opposed to zero based)
maxEntries query integer(int32) false Limit the entries to retrieve
filterDirection query string false Filtering operator to apply

Enumerated Values

Parameter Value
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 1,
  "events": [
    {
      "eventType": "string",
      "requestID": "string",
      "savedAtTimestamp": 1564790400,
      "sequenceOffset": 0,
      "triggeredAtTimestamp": 681177600,
      "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b"
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Events eventCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

createEvent

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.post('https://core.bewaarder.de/v1/events', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json'
};

fetch('https://core.bewaarder.de/v1/events',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'
};

fetch('https://core.bewaarder.de/v1/events',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.post 'https://core.bewaarder.de/v1/events',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /events

This service creates an notification event.

Access allowed to:

Example responses

200 Response

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b"
}

Responses

Status Meaning Description Schema
200 OK OK event

ledgers

ledgers

External documentation

Get all supported ledgers

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/ledgers', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/ledgers',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /ledgers

This service returns all supported ledgers.


Access allowed to: - Admin - PolicyOperator - Super Auditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token

Example responses

200 Response

{
  "count": 1,
  "events": [
    {
      "ledgerID": "e33bfbf6-0eab-4509-8cf6-cf99e20c365c",
      "itin": "TP3B-248N-Q",
      "symbol": "ETH",
      "name": "Ethereum",
      "description": "Ethereum is a global, decentralized platform for money and new kinds of applications."
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ledgerCollection
401 Unauthorized Unauthorized None

Fetch ledger fees

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/ledgers/{ledgerID}/fees', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/fees',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/fees',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/ledgers/{ledgerID}/fees',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /ledgers/{ledgerID}/fees

This service returns estimated fees for each priority:

The value returned is ledger dependant:


Access allowed to: - PolicyOperator - SuperAuditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
ledgerID path string true Ledger id

Example responses

200 Response

{
  "highFeeRate": "10",
  "lowFeeRate": "2",
  "mediumFeeRate": "5"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

501 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
200 OK fee informations feeDetails
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Ledger not found None
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable, in maintenance or the fee estimation is not possible None

Fetches smart contracts for a given ledger

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /ledgers/{ledgerID}/smart-contracts

This service retrieves enabled smart contracts for a given ledger.
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
ledgerID path string true Ledger id
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
filterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply

Enumerated Values

Parameter Value
filterCriterion creationUnixTimestamp
filterCriterion lastActionUnixTimestamp
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 2,
  "items": [
    {
      "activationTimestamp": 1564790400,
      "consumerID": "C_47778",
      "id": "5d8ed26a-d524-489e-b288-f9d7c812d45b",
      "ledgerID": "eth",
      "ledgerUniqueID": 1.0549022996915278e+48,
      "name": "Metatoken"
    },
    {
      "activationTimestamp": 1564790400,
      "behaviours": [
        "erc20-light"
      ],
      "consumerID": "C_44455",
      "id": "1b04fb7e-fd33-481c-938c-746547ff66c6",
      "ledgerID": "eth",
      "ledgerUniqueID": 1.0549022996915278e+48,
      "name": "Tokenaco"
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK enabled smart contracts smartContractCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Ledger not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Enable smart contract for a given ledger

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string',
  'UCASignature': 'string',
  'AntiReplayToken': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts', headers = headers)

print(r.json())

const inputBody = '{
  "behaviours": [
    {
      "behaviourID": "erc20-light",
      "metadata": {}
    }
  ],
  "consumerID": "C_445487",
  "ledgerUniqueID": 7.723775656548026e+46,
  "name": "The new Smart Contract !"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string',
  'UCASignature':'string',
  'AntiReplayToken':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "behaviours": [
    {
      "behaviourID": "erc20-light",
      "metadata": {}
    }
  ],
  "consumerID": "C_445487",
  "ledgerUniqueID": 7.723775656548026e+46,
  "name": "The new Smart Contract !"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string',
  'UCASignature':'string',
  'AntiReplayToken':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string',
  'UCASignature' => 'string',
  'AntiReplayToken' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /ledgers/{ledgerID}/smart-contracts

This service enable the smartcontract for a given ledger.

For an Ethereum smart contract : In the payload :


Access allowed to: - Admin

Body parameter

{
  "behaviours": [
    {
      "behaviourID": "erc20-light",
      "metadata": {}
    }
  ],
  "consumerID": "C_445487",
  "ledgerUniqueID": 7.723775656548026e+46,
  "name": "The new Smart Contract !"
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
ledgerID path string true Ledger id
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
UCASignature header string true User's UCA signature
AntiReplayToken header string true Anti-replay token
body body enableSmartContractRequest true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to enable a smart contract None
204 No Content No content, contract already enabled None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Ledger not found None
409 Conflict Request id previously used errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Fetches smart contract for a given ledger

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /ledgers/{ledgerID}/smart-contracts/{smartContractID}

This service retrieves enabled smart contract for a given ledger.
Access allowed to:

Parameters

Name In Type Required Description
ledgerID path string true Ledger id
smartContractID path string true Smart contract id
Authorization header string true Json Web Token
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

200 Response

{
  "activationTimestamp": 1564790400,
  "behaviours": [
    "erc20-light"
  ],
  "consumerID": "",
  "id": "1b04fb7e-fd33-481c-938c-746547ff66c6",
  "ledgerID": "eth",
  "ledgerUniqueID": 1.0549022996915278e+48,
  "name": "Tokenaco"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

404 Response

{
  "message": "Ledger not found"
}

Responses

Status Meaning Description Schema
200 OK smart contact smartContractInformation
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Ledger or smart contract not found errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Execute a generic query operation on a given smartContract

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query', headers = headers)

print(r.json())

const inputBody = '{
  "expectedResults": [
    {
      "key": "balance",
      "type": "unit256"
    }
  ],
  "method": "balanceOf",
  "parameters": [
    {
      "key": "_value",
      "type": "uint256",
      "value": "123"
    }
  ],
  "senderWalletID": "85bafb66-862e-42e0-8596-fb1762d4f0a7"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "expectedResults": [
    {
      "key": "balance",
      "type": "unit256"
    }
  ],
  "method": "balanceOf",
  "parameters": [
    {
      "key": "_value",
      "type": "uint256",
      "value": "123"
    }
  ],
  "senderWalletID": "85bafb66-862e-42e0-8596-fb1762d4f0a7"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /ledgers/{ledgerID}/smart-contracts/{smartContractID}/query

This service calls a method in the smartContract that do not modify it's state.
Access allowed to:

Body parameter

{
  "expectedResults": [
    {
      "key": "balance",
      "type": "unit256"
    }
  ],
  "method": "balanceOf",
  "parameters": [
    {
      "key": "_value",
      "type": "uint256",
      "value": "123"
    }
  ],
  "senderWalletID": "85bafb66-862e-42e0-8596-fb1762d4f0a7"
}

Parameters

Name In Type Required Description
ledgerID path string true Ledger id
smartContractID path string true Smart contract id
Authorization header string true Json Web Token
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
body body queryGenericSmartContractRequestBody true none

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

200 Response

[
  {
    "key": "balance",
    "type": "uint256",
    "value": "19"
  }
]

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

404 Response

{
  "message": "Ledger not found"
}

Responses

Status Meaning Description Schema
200 OK operation result Inline
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Ledger or smart contract not found errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [queryGenericSmartContractOperationResultEntry] false none [Query execution with a low level definition of method and parameters]

Execute a query operation on a given smartContract

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query/{behaviourID}', headers = headers)

print(r.json())

const inputBody = '{
  "method": "balanceOf",
  "parameters": {
    "address": 1.8832960756721966e+47
  },
  "senderWalletID": "260a5f42-6ea1-47e0-9f68-85b85c19c7a9"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query/{behaviourID}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "method": "balanceOf",
  "parameters": {
    "address": 1.8832960756721966e+47
  },
  "senderWalletID": "260a5f42-6ea1-47e0-9f68-85b85c19c7a9"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query/{behaviourID}',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/ledgers/{ledgerID}/smart-contracts/{smartContractID}/query/{behaviourID}',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /ledgers/{ledgerID}/smart-contracts/{smartContractID}/query/{behaviourID}

This service calls a method in the smartContract that do not modify it's state. The queryBehaviourSmartContractRequestBody parameters depends on the behaviour and the method requested to execute.
SmartContract behaviour's supported query methods and theirs parameters model:

Please find the model's definition at the botton of swagger-ui
Access allowed to:

Body parameter

{
  "method": "balanceOf",
  "parameters": {
    "address": 1.8832960756721966e+47
  },
  "senderWalletID": "260a5f42-6ea1-47e0-9f68-85b85c19c7a9"
}

Parameters

Name In Type Required Description
ledgerID path string true Ledger id
smartContractID path string true Smart contract id
behaviourID path string true Smart contract supported behaviour id
Authorization header string true Json Web Token
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
body body queryBehaviourSmartContractRequestBody true none

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

200 Response

{}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

404 Response

{
  "message": "Ledger not found"
}

Responses

Status Meaning Description Schema
200 OK operation result Inline
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Ledger or smart contract not found errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Response Schema

openOrders

openOrders

External documentation

Fetch users' open orders

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/open-orders', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/open-orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/open-orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/open-orders',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /open-orders

This service returns all users's orders in open state. Defined as not being in any of the following states: 'canceled' / 'confirmed' / 'broadcast' / 'failed'

In the case of being called by an SuperAuditor, it will provide the open orders system-wide


Access allowed to: - PolicyOperator (results will be filtered to policies that the user has readAll access on) - SuperAuditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
orderFilterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply
showArchived query boolean false Filter by wallet archive status

Enumerated Values

Parameter Value
orderFilterCriterion creationUnixTimestamp
orderFilterCriterion lastActionUnixTimestamp
orderFilterCriterion earliestProcessUnixTimestamp
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 1,
  "items": [
    {
      "broadcastUnixTimestamp": 1564790400,
      "cancellationUnixTimestamp": 1564790400,
      "confirmationUnixTimestamp": 681177600,
      "consumerID": "C_90858904",
      "creationUnixTimestamp": 1564790400,
      "currentSignatures": 3,
      "description": "To Cold Wallet",
      "failureCode": "001",
      "fee": "569988",
      "feeRate": "3",
      "feeTypeID": "high",
      "id": "d1941bf3-38e8-4db1-8e6b-844d5b53b468",
      "inputs": [
        {
          "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
          "inputType": "ledger",
          "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
          "ledgerIndex": 0,
          "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
        },
        {
          "address": "18RDoKK7Ed5zid2FkKVy8q3rULr4tgfjr4",
          "inputType": "ledger",
          "ledgerData": "54f171734fa9bc78432abd52d278321345d35df9",
          "ledgerIndex": 1,
          "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
        }
      ],
      "isBroadcast": false,
      "isCanceled": false,
      "isConfirmed": false,
      "isFailed": false,
      "isProcessed": false,
      "lastActionUnixTimestamp": 1564790400,
      "ledgerID": "btc",
      "ledgerTransactionID": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124",
      "outputs": [
        {
          "address": "1LM8A5zX1V5ezkmuxkRVPEyLkfDxyT6JEn",
          "isLocked": false,
          "ledgerData": "b4525925c6a831f5c488cc404190141456a9e699",
          "ledgerIndex": 0,
          "outputType": "ledger"
        },
        {
          "address": "15cVYhenMqoVAhYqdQoBNfKmb8yQWpcagX",
          "amount": "1200000000",
          "isLocked": false,
          "ledgerData": "f3863247f3ff0644edb9d29c54b271e5604136bde",
          "ledgerIndex": 1,
          "outputType": "ledger",
          "recipientWallet": {
            "consumerID": "C_2384795208",
            "description": "lorem ipsum",
            "id": "d7a15290-b023-45f7-b8f7-fe3a25bc174a",
            "publicID": "0001-000012f4"
          },
          "sentAmount": "1200000000"
        }
      ],
      "policyApprovers": [
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "user": {
            "consumerID": "C_95830349",
            "email": "[email protected]",
            "fullname": "Est",
            "id": "45b54ece-b67a-4d0d-870d-e81d41c18c99"
          }
        },
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "user": {
            "consumerID": "",
            "email": "[email protected]",
            "fullname": "Quis",
            "id": "62e0f6dd-687e-41ab-86c1-4f0f26376aa5"
          }
        },
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "user": {
            "consumerID": "",
            "email": "[email protected]",
            "fullname": "Magna",
            "id": "35abbb56-0a63-4a9e-9417-3ef6bad59114"
          }
        },
        {
          "approvalUnixTimestamp": 0,
          "hasSigned": false,
          "user": {
            "consumerID": "",
            "email": "[email protected]",
            "fullname": "Cillu",
            "id": "994703ed-04cc-4f55-a695-0ffda453591c"
          }
        }
      ],
      "processedAtUnixTimestamp": 1564790400,
      "requiredSignatures": 3,
      "senderWallet": {
        "consumerID": "C_398408809384",
        "creationUnixTimestamp": 1564790400,
        "description": "Main wallet sender",
        "id": "9d23fde5-d15f-41aa-800e-775fe46559ac",
        "lastActionUnixTimestamp": 1564790400,
        "policyID": "324a726a-8bc3-4a59-8824-a482e9366e38",
        "policyLedgerID": "btc",
        "policyQuota": "6000000",
        "publicID": "0041-0072029"
      },
      "smartContractOperation": {
        "isFailed": true,
        "method": "burn",
        "parameters": [
          {
            "key": "_value",
            "type": "uint256",
            "value": "123"
          }
        ],
        "smartContract": {
          "activationTimestamp": 1564790400,
          "behaviours": [
            "erc20-light"
          ],
          "consumerID": "C_2555",
          "id": "3f171b60-6680-4577-8dc2-38fdd6fa987e",
          "ledgerID": "eth",
          "ledgerUniqueID": 1.0549022996915278e+48,
          "name": "The new Smart Contract !"
        }
      }
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK open orders orderCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

operations

operations

External documentation

Create request ids

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/operations', headers = headers)

print(r.json())

const inputBody = '{
  "count": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/operations',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "count": 1
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/operations',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/operations',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /operations

This services returns requestIDs. There is a configurable maximum number of request ids that can be requested at one time (50 by default).
Access allowed to:

Body parameter

{
  "count": 1
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
body body createRequestIDsRequest true none

Example responses

200 Response

{
  "requestIDs": [
    "553e3807-68f1-43f8-a121-009eb4d2f7fa",
    "2d3b3290-bdbb-4b02-a28e-c94d64727bca"
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Request IDs requestIDsCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Fetches operation status for a given requestID

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/operations/{requestID}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/operations/{requestID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/operations/{requestID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/operations/{requestID}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /operations/{requestID}

This service retrieves the status of a specific operation in the Bewaarder system
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
requestID path string true Request id

Example responses

200 Response

{
  "completedUnixTimestamp": "1564790400",
  "createdUnixTimestamp": "1564790400",
  "status": "succeeded"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK operation status operationStatus
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Request id not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

policies

policies

External documentation

Fetches all policies information

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/policies', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/policies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/policies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/policies',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /policies

This service returns policies that the user has read permissions on. The Admin and SuperAuditor will be provided with all the Policies.
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
filterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply
isLocked query boolean false Filter by lock status
isArchived query boolean false Filter by archive status

Enumerated Values

Parameter Value
filterCriterion creationUnixTimestamp
filterCriterion lastActionUnixTimestamp
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 2,
  "items": [
    {
      "consumerID": "C_39877",
      "creationUnixTimestamp": 1564790400,
      "description": "Bitcoin policy",
      "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
      "isArchived": false,
      "isAutoLockingEnabled": true,
      "isLedgerEnforced": true,
      "isLocked": true,
      "lastActionUnixTimestamp": 1564790400,
      "ledgerID": "btc",
      "publicID": 448,
      "quota": "1544",
      "quotaPeriod": 24,
      "quotaPeriodSeconds": 86400,
      "securitySchemeID": "one-by-one",
      "timeLock": 0,
      "timeLockSeconds": 0,
      "userPermissions": [
        {
          "approveOrder": true,
          "consumerID": "",
          "createOrder": false,
          "description": "Auditor account",
          "email": "[email protected]",
          "fullname": "Stanislaw Kaner",
          "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
          "readAll": true
        }
      ]
    },
    {
      "consumerID": "C_347",
      "creationUnixTimestamp": 1564790400,
      "description": "Ethereum policy",
      "id": "315ea0ba-2a98-4225-a1e3-42c478ac3415",
      "isArchived": false,
      "isAutoLockingEnabled": true,
      "isLedgerEnforced": false,
      "isLocked": false,
      "lastActionUnixTimestamp": 1564790400,
      "ledgerID": "eth",
      "publicID": "0004",
      "quota": "15",
      "quotaPeriodSeconds": 86400,
      "securitySchemeID": "one-by-one",
      "timeLockSeconds": 0,
      "userPermissions": [
        {
          "approveOrder": true,
          "consumerID": "",
          "createOrder": false,
          "description": "Auditor account",
          "email": "[email protected]",
          "fullname": "Stanislaw Kaner",
          "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
          "readAll": true
        }
      ]
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Policies policyCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Submit a request to create a new policy

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'UCASignature': 'string',
  'UCAVersion': 'string',
  'AntiReplayToken': 'string',
  'RequestID': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/policies', headers = headers)

print(r.json())

const inputBody = '{
  "consumerID": "4309-8d21",
  "description": "It's my policy",
  "ledgerEnforced": false,
  "ledgerID": "btc",
  "quota": "15445238",
  "quotaPeriodSeconds": 3600,
  "securitySchemeID": "one-by-one",
  "timeLockSeconds": 0,
  "userIDType": "policyOperator",
  "userPermissions": [
    {
      "approveOrder": true,
      "createOrder": false,
      "readAll": true,
      "userID": "0225ff76-7399-48db-8b8e-2aacff4099ad"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "consumerID": "4309-8d21",
  "description": "It's my policy",
  "ledgerEnforced": false,
  "ledgerID": "btc",
  "quota": "15445238",
  "quotaPeriodSeconds": 3600,
  "securitySchemeID": "one-by-one",
  "timeLockSeconds": 0,
  "userIDType": "policyOperator",
  "userPermissions": [
    {
      "approveOrder": true,
      "createOrder": false,
      "readAll": true,
      "userID": "0225ff76-7399-48db-8b8e-2aacff4099ad"
    }
  ]
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'UCASignature' => 'string',
  'UCAVersion' => 'string',
  'AntiReplayToken' => 'string',
  'RequestID' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/policies',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /policies

This service submits a request to create a new policy The created policy will be assigned a publicID by Bewaarder (four hexadecimal digits) There is a configurable policies limit that will set an upper limit to the number of policies in Bewaarder (2000 by default). There is a configurable quota period maximum (1 hour by default).
LedgerID defines the crypto currency:

SecuritySchemeID corresponds to a security scheme :

UserIDType identifies the PolicyOperators provided as Bewaarder generated IDs, or consumer IDs

The maximum quota value depends on ledger:

Quota period must be between 1 second and the quota period maximum configured value.

Timelock has to be a positive value, being 0 a policy that do not time-lock transactions.

The mandatory flag ledgerEnforced specify if the policy to create should have the approver's signatures backed by the ledger or Bewaarder. Support depends on ledger:

The optional flag autoLockingEnabled specify if the wallet based on the policy will have it's funds locked (false by default). Support depends on ledger:

The optional flag mutable specify if the policy to create should allow update some of it's fields after creation, using an update policy request (false by default).


Access allowed to: - Admin

Body parameter

{
  "consumerID": "4309-8d21",
  "description": "It's my policy",
  "ledgerEnforced": false,
  "ledgerID": "btc",
  "quota": "15445238",
  "quotaPeriodSeconds": 3600,
  "securitySchemeID": "one-by-one",
  "timeLockSeconds": 0,
  "userIDType": "policyOperator",
  "userPermissions": [
    {
      "approveOrder": true,
      "createOrder": false,
      "readAll": true,
      "userID": "0225ff76-7399-48db-8b8e-2aacff4099ad"
    }
  ]
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
UCASignature header string true User's UCA signature
UCAVersion header string true UCA active software version
AntiReplayToken header string true Anti-replay token
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body createPolicyRequest true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to create a policy None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
409 Conflict Consumer ID already existing or request id previously used errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Fetches specific policy information

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/policies/{policyID}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/policies/{policyID}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /policies/{policyID}

Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
policyID path string true Policy id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

200 Response

{
  "consumerID": "C_347",
  "creationUnixTimestamp": 1564790400,
  "description": "Ethereum policy",
  "id": "315ea0ba-2a98-4225-a1e3-42c478ac3415",
  "isArchived": false,
  "isAutoLockingEnabled": false,
  "isLedgerEnforced": false,
  "isLocked": false,
  "lastActionUnixTimestamp": 1564790400,
  "ledgerID": "eth",
  "publicID": "0004",
  "quota": "15",
  "quotaPeriod": 24,
  "quotaPeriodSeconds": 86400,
  "securitySchemeID": "one-by-one",
  "timeLock": 0,
  "timeLockSeconds": 0,
  "userPermissions": [
    {
      "approveOrder": true,
      "consumerID": "",
      "createOrder": false,
      "description": "Auditor account",
      "email": "[email protected]",
      "fullname": "Stanislaw Kaner",
      "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
      "readAll": true
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Policy policyInformation
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Policy not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Update specific policy

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'UCASignature': 'string',
  'UCAVersion': 'string',
  'AntiReplayToken': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/policies/{policyID}', headers = headers)

print(r.json())

const inputBody = '{
  "quota": "15445238",
  "quotaPeriodSeconds": 86400,
  "timeLockSeconds": 3600
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "quota": "15445238",
  "quotaPeriodSeconds": 86400,
  "timeLockSeconds": 3600
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'UCASignature' => 'string',
  'UCAVersion' => 'string',
  'AntiReplayToken' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/policies/{policyID}',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /policies/{policyID}

This service submits a request to update an existing policy's fields. Bewaarder supports the following fields to be modified:

The policy must not have wallets with open orders for the 'update policy' request to be accepted, otherwise Bewaarder will respond with a 409 HTTP code. If the policy to update is not present in Bewaarder (identified with the PolicyID), no new entity will be created.


Access allowed to: - Admin (with HighSide's *UpdatePolicy* flag)

Body parameter

{
  "quota": "15445238",
  "quotaPeriodSeconds": 86400,
  "timeLockSeconds": 3600
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
UCASignature header string true User's UCA signature
UCAVersion header string true UCA active software version
AntiReplayToken header string true Anti-replay token
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
policyID path string true Policy id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
body body updatePolicyRequest true none

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to update a policy None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Policy to update not found None
409 Conflict Policy has one or several open orders errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Updates a policy's archive status

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/policies/{policyID}/archive', headers = headers)

print(r.json())

const inputBody = '{
  "archive": false
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}/archive',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "archive": false
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}/archive',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/policies/{policyID}/archive',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /policies/{policyID}/archive

This service archives or unarchives a policy.

An archived policy can still receive funds and tokens but can be filtered out of most API queries. Wallets using this policy will be considered as archived.


Access allowed to: - Admin

Body parameter

{
  "archive": false
}

Parameters

Name In Type Required Description
policyID path string true Policy id
Authorization header string true Json Web Token
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body updateArchiveStateRequest true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
204 No Content policy updated None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Policy not found None
409 Conflict Request id previously used errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

This service submits a request to update a policy's lock status

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'UCASignature': 'string',
  'UCAVersion': 'string',
  'AntiReplayToken': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/policies/{policyID}/lock', headers = headers)

print(r.json())

const inputBody = '{
  "locked": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}/lock',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "locked": true
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}/lock',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'UCASignature' => 'string',
  'UCAVersion' => 'string',
  'AntiReplayToken' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/policies/{policyID}/lock',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /policies/{policyID}/lock

This service submits a request to update a policy's lock status.

When an unlock state is requested(locked = false), the following fields are mandatory:


Access allowed to: - Admin

Body parameter

{
  "locked": true
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
UCASignature header string false User's UCA signature, only mandatory for operations requiring a UCA signature
UCAVersion header string false UCA active software version, only mandatory for operations requiring a UCA signature
AntiReplayToken header string false Anti-replay token, only mandatory for operations requiring a UCA signature
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
policyID path string true Policy id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
body body updateLockStatusRequest true none

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to update policy lock status None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Policy not found None
409 Conflict Request id previously used errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Fetches all wallets information for a policy

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/policies/{policyID}/wallets', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}/wallets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/policies/{policyID}/wallets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/policies/{policyID}/wallets',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /policies/{policyID}/wallets

This service returns all wallets for a given policy. Depending the role, the data returned by the service change:


Access allowed to: - Admin - SuperAuditor - PolicyOperator

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
policyID path string true Policy id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
filterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply
hasOpenOrders query boolean false Filter with wallet with open orders
isArchived query boolean false Filter by archive status

Enumerated Values

Parameter Value
idType internal
idType consumer
filterCriterion creationUnixTimestamp
filterCriterion lastActionUnixTimestamp
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 2,
  "items": [
    {
      "consumerID": "C_3984424",
      "creationUnixTimestamp": 1564790400,
      "description": "Main bitcoin",
      "hasOpenOrders": true,
      "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
      "isArchived": false,
      "lastActionUnixTimestamp": 1564790400,
      "policy": {
        "consumerID": "C_39847234",
        "creationUnixTimestamp": 681177600,
        "description": "Main btc policy",
        "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
        "isArchived": false,
        "isAutoLockingEnabled": false,
        "isLedgerEnforced": true,
        "isLocked": false,
        "lastActionUnixTimestamp": 1564790400,
        "ledgerID": "btc",
        "publicID": "0001",
        "quota": "15445238",
        "quotaPeriod": 1,
        "quotaPeriodSeconds": 3600,
        "securitySchemeID": "one-by-one",
        "timeLock": 0,
        "timeLockSeconds": 0,
        "userPermissions": [
          {
            "approveOrder": true,
            "consumerID": "",
            "createOrder": false,
            "description": "Auditor account",
            "email": "[email protected]",
            "fullname": "Stanislaw Kaner",
            "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
            "readAll": true
          }
        ]
      },
      "publicID": "0001-0000029",
      "smartContractBalances": [],
      "spendableBalance": "1213243564",
      "totalBalance": "1213242500"
    },
    {
      "consumerID": "C_3981894",
      "creationUnixTimestamp": 1564790400,
      "hasOpenOrders": true,
      "id": "140c79f9-353e-4b4d-8040-e580a028cd8f",
      "isArchived": false,
      "lastActionUnixTimestamp": 1564790400,
      "policy": {
        "consumerID": "C_39147234",
        "creationUnixTimestamp": 681177600,
        "description": "Main btc policy",
        "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
        "isArchived": false,
        "isAutoLockingEnabled": false,
        "isLedgerEnforced": false,
        "isLocked": false,
        "lastActionUnixTimestamp": 1564790400,
        "ledgerID": "btc",
        "publicID": "00041",
        "quota": "15445238",
        "quotaPeriod": 1,
        "quotaPeriodSeconds": 3600,
        "securitySchemeID": "one-by-one",
        "timeLock": 0,
        "timeLockSeconds": 0,
        "userPermissions": [
          {
            "approveOrder": true,
            "consumerID": "",
            "createOrder": false,
            "description": "Auditor account",
            "email": "[email protected]",
            "fullname": "Stanislaw Kaner",
            "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
            "readAll": true
          }
        ]
      },
      "publicID": "0001-0040010",
      "smartContractBalances": [
        {
          "behaviour": [
            {
              "behaviourID": "erc20-light"
            }
          ],
          "decimals": "8",
          "ledgerID": "eth",
          "name": "Hop Hop byte",
          "smartContractID": "48deb072-ab3a-4b5a-93d9-163dc4d01e4a",
          "spendableBalance": "454870",
          "symbol": "OOB",
          "totalBalance": "457784870"
        },
        {
          "behaviour": [
            {
              "behaviourID": "erc20-light"
            }
          ],
          "decimals": "8",
          "ledgerID": "eth",
          "name": "Super Style",
          "smartContractID": "526dd31f-4a34-4101-9027-bcdbbe475d7e",
          "spendableBalance": "2112",
          "symbol": "SSE",
          "totalBalance": "7787741"
        }
      ],
      "spendableBalance": "12564",
      "totalBalance": "12500"
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK wallets walletCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Policy not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

users

users

External documentation

Fetches Users. Currently only Policy Operators

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/users', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/users',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /users

This service returns all users with 'Policy Operator' role.
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
filterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply
isLocked query boolean false Filter by lock status

Enumerated Values

Parameter Value
filterCriterion creationUnixTimestamp
filterCriterion lastActionUnixTimestamp
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 2,
  "items": [
    {
      "consumerID": "C_482309848",
      "createdBy": "78e4ed65-1a1a-4744-ae3f-87a6f517b931",
      "description": "Developer",
      "email": "[email protected]",
      "fullname": "Bewaarder Developer",
      "hasPublicKey": true,
      "id": "553e3807-68f1-43f8-a121-009eb4d2f7fa",
      "isLocked": true,
      "publicKey": "xpub661MyMwAqRbcGkodqhK1zwNLEHowJywHPsiu37hvd8PTGQrL2Qf4H1euM8jGLzTFs8PgQhgxUkh3KkjUCiA2zjvagTedCDCHdMDntRx2USV",
      "userRoleID": "policyOperator"
    },
    {
      "consumerID": "",
      "createdBy": "78e4ed65-1a1a-4744-ae3f-87a6f517b931",
      "description": "Bewaarder's user",
      "email": "[email protected]",
      "fullname": "Janie Doe",
      "hasPublicKey": true,
      "id": "d1c04224-209b-40b5-bc91-bdb4c5ab0e1d",
      "isLocked": false,
      "userRoleID": "policyOperator"
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Policy Operators userCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

This service submits a request to create an user

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'UCASignature': 'string',
  'UCAVersion': 'string',
  'AntiReplayToken': 'string',
  'RequestID': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/users', headers = headers)

print(r.json())

const inputBody = '{
  "consumerID": "4309-8d21",
  "description": "Developper",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "password": "VV54CVCSD985SDFD32",
  "publicKey": "9374A26A71490437AA024B4FADD5B497EE1A8EA6FF12F6FB65AF2720B59CCF"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/users',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "consumerID": "4309-8d21",
  "description": "Developper",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "password": "VV54CVCSD985SDFD32",
  "publicKey": "9374A26A71490437AA024B4FADD5B497EE1A8EA6FF12F6FB65AF2720B59CCF"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/users',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'UCASignature' => 'string',
  'UCAVersion' => 'string',
  'AntiReplayToken' => 'string',
  'RequestID' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/users',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /users

This service submits a request to create an user. Currently only users with the PolicyOperator role can be submitted. This may change in future versions If the user will be required to approve orders, a public key must be assigned now. Currently a public key can't be assigned at a later date. The user email address must be lowercase and unique.
If a public key is provided, the headers AntiReplayToken, UCASignature and UCAVersion are required, otherwise they are not used since no signature is required for users without public keys.
Access allowed to:

Body parameter

{
  "consumerID": "4309-8d21",
  "description": "Developper",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "password": "VV54CVCSD985SDFD32",
  "publicKey": "9374A26A71490437AA024B4FADD5B497EE1A8EA6FF12F6FB65AF2720B59CCF"
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
UCASignature header string false User's UCA signature, only mandatory for operations requiring a UCA signature
UCAVersion header string false UCA active software version, only mandatory for operations requiring a UCA signature
AntiReplayToken header string false Anti-replay token, only mandatory for operations requiring a UCA signature
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body createUserRequest true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to create a user None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
409 Conflict Consumer ID already existing or request id previously used errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Verify if an email is already in use

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/users/email-availability', params={
  'email': 'string'
}, headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users/email-availability?email=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users/email-availability?email=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/users/email-availability',
  params: {
  'email' => 'string'
}, headers: headers

p JSON.parse(result)

GET /users/email-availability

this service allows to check if an email is available, in order to process further with user creation.
Access allowed to:

Parameters

Name In Type Required Description
email query string true User email
Authorization header string true Json Web Token

Example responses

200 Response

{
  "isAvailable": false
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK result with the information of email's availability emailAvailability
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Fetches specific user information

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/users/{userID}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/users/{userID}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /users/{userID}

This service fetches a user with PolicyOperator role
Access allowed to:

Parameters

Name In Type Required Description
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
userID path string true User id
Authorization header string true Json Web Token

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

200 Response

{
  "consumerID": "C_491402394",
  "createdBy": "78e4ed65-1a1a-4744-ae3f-87a6f517b931",
  "creationUnixTimestamp": "1564790400",
  "description": "Developer",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "hasPublicKey": true,
  "id": "553e3808-68f1-43f8-a121-009eb4d2f7fa",
  "isLocked": true,
  "lastActionUnixTimestamp": "681177600",
  "publicKey": "xpub661MyMwAqRbcGkodqhK1zwNLEHowJywHPsiu37hvd8PTGQrL2Qf4H1euM8jGLzTFs8PgQhgxUkh3KkjUCiA2zjvagTedCDCHdMDntRx2USV",
  "userRoleID": "owner"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Users userInformation
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found User not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Updates an user's information

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/users/{userID}', headers = headers)

print(r.json())

const inputBody = '{
  "password": "098f6bcd4621d373cade4e832627b4f6"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "password": "098f6bcd4621d373cade4e832627b4f6"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/users/{userID}',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /users/{userID}

This service is used to update user's information, currently only update password is supported.
Access allowed to:

Body parameter

{
  "password": "098f6bcd4621d373cade4e832627b4f6"
}

Parameters

Name In Type Required Description
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
userID path string true User id
Authorization header string true Json Web Token
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body updateUserInformationRequest true none

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to update an user's password None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found User not found None
409 Conflict Request id previously used errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Updates a user's lock status

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'UCASignature': 'string',
  'UCAVersion': 'string',
  'AntiReplayToken': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/users/{userID}/lock', headers = headers)

print(r.json())

const inputBody = '{
  "locked": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}/lock',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "locked": true
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCASignature':'string',
  'UCAVersion':'string',
  'AntiReplayToken':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}/lock',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'UCASignature' => 'string',
  'UCAVersion' => 'string',
  'AntiReplayToken' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/users/{userID}/lock',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /users/{userID}/lock

This service submits a request to update a user's lock status.

When an unlock state is requested(locked = false), the following fields are mandatory:


Access allowed to: - Admin

Body parameter

{
  "locked": true
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
UCASignature header string false User's UCA signature, only mandatory for operations requiring a UCA signature
UCAVersion header string false UCA active software version, only mandatory for operations requiring a UCA signature
AntiReplayToken header string false Anti-replay token, only mandatory for operations requiring a UCA signature
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
userID path string true User id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id
body body updateLockStatusRequest true none

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to update user lock status None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found User not found None
409 Conflict Request id previously used errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Retrieves a user's wallets

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/users/{userID}/wallets', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}/wallets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/users/{userID}/wallets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/users/{userID}/wallets',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /users/{userID}/wallets

This service fetches user's wallets Depending the role, the data returned by the service change:


Access allowed to: - Admin - SuperAuditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
filterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply
isLocked query boolean false Filter by lock status
isArchived query boolean false Filter by archive status
hasOpenOrders query boolean false Filter with wallet with open orders
userID path string true User id

Enumerated Values

Parameter Value
filterCriterion creationUnixTimestamp
filterCriterion lastActionUnixTimestamp
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 2,
  "items": [
    {
      "consumerID": "C_3984424",
      "creationUnixTimestamp": 1564790400,
      "description": "Main bitcoin",
      "hasOpenOrders": true,
      "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
      "isArchived": false,
      "lastActionUnixTimestamp": 1564790400,
      "policy": {
        "consumerID": "C_39847234",
        "creationUnixTimestamp": 681177600,
        "description": "Main btc policy",
        "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
        "isArchived": false,
        "isLedgerEnforced": true,
        "isLocked": false,
        "lastActionUnixTimestamp": 1564790400,
        "ledgerID": "btc",
        "publicID": "0001",
        "quota": "15445238",
        "quotaPeriod": 1,
        "quotaPeriodSeconds": 3600,
        "securitySchemeID": "one-by-one",
        "timeLock": 0,
        "timeLockSeconds": 0,
        "userPermissions": [
          {
            "approveOrder": true,
            "consumerID": "",
            "createOrder": false,
            "description": "Auditor account",
            "email": "[email protected]",
            "fullname": "Stanislaw Kaner",
            "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
            "readAll": true
          }
        ]
      },
      "publicID": "0001-0000029",
      "smartContractBalances": [],
      "spendableBalance": "1213243564",
      "totalBalance": "1213242500"
    },
    {
      "consumerID": "C_3981894",
      "creationUnixTimestamp": 1564790400,
      "description": "Main ethereum",
      "hasOpenOrders": true,
      "id": "140c79f9-353e-4b4d-8040-e580a028cd8f",
      "isArchived": false,
      "lastActionUnixTimestamp": 1564790400,
      "policy": {
        "consumerID": "C_39147234",
        "creationUnixTimestamp": 681177600,
        "description": "Main eth policy",
        "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
        "isArchived": false,
        "isLedgerEnforced": false,
        "isLocked": false,
        "lastActionUnixTimestamp": 1564790400,
        "ledgerID": "eth",
        "publicID": "00041",
        "quota": "15445238",
        "quotaPeriod": 1,
        "quotePeriodSeconds": 3600,
        "securitySchemeID": "one-by-one",
        "timeLock": 0,
        "timeLockSeconds": 0,
        "userPermissions": [
          {
            "approveOrder": true,
            "consumerID": "",
            "createOrder": false,
            "description": "Auditor account",
            "email": "[email protected]",
            "fullname": "Stanislaw Kaner",
            "id": "70479b7d-a711-45eb-b72d-7e5180d0f97d",
            "readAll": true
          }
        ]
      },
      "publicID": "0041-0040010",
      "smartContractBalances": [
        {
          "behaviour": [
            {
              "behaviourID": "erc20-light"
            }
          ],
          "decimals": "8",
          "ledgerID": "eth",
          "name": "Hop Hop byte",
          "smartContractID": "7d6af19e-db87-4a12-a03a-65e01185c022",
          "spendableBalance": "454870",
          "symbol": "OOB",
          "totalBalance": "457784870"
        },
        {
          "behaviour": [
            {
              "behaviourID": "erc20-light"
            }
          ],
          "decimals": "8",
          "ledgerID": "eth",
          "name": "Super Style",
          "smartContractID": "9e6bfd02-6248-4a0b-87e6-3013427875ed",
          "spendableBalance": "2112",
          "symbol": "SSE",
          "totalBalance": "7787741"
        }
      ],
      "spendableBalance": "12564",
      "totalBalance": "12500"
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK User's wallets walletCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found User not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

antiReplayToken

Fetches an anti-replay token

Code samples

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://core.bewaarder.de/v1/anti-replay-token', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json'
};

fetch('https://core.bewaarder.de/v1/anti-replay-token',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'
};

fetch('https://core.bewaarder.de/v1/anti-replay-token',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://core.bewaarder.de/v1/anti-replay-token',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /anti-replay-token

This service returns an anti-replay token to authorize the following critical administrative operations:

Anti-replay tokens have a configurable locktime (20 minutes by default), during this time they belong to the admin that requested them, after this time they could be requested by another admin. Admins can lock up to a certain amount of tokens at the same time, this amount is configurable (25 by default).
Access allowed to:

Example responses

200 Response

{
  "token": "eyJraWQiOiI1ZjU5MzMzMy0yNjJiLTQxOTEtYjExOC1jMjVmYzM3NjgzODBfc2lnX3JzMjU2IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhdF9oYXNoIjoiNHRrOUNSQm05RmxMTER2dUtYOFl5QSIsImF1ZCI6IjAyMDNmOGZjLTZkNDgtNGI4Ny04NTgwLWYwZDA5ZjBlYjU1OSIsInN1YiI6IlFtMURvcG5nZmFNckQxbXdrTUNicUZfQi1Uc0R0a0s4MC1CanBfYW5hMUUiLCJhdXRoX3RpbWUiOjE1OTA0MTA5NjYsImlzcyI6Imh0dHBzOi8vYXV0aC5iZXdhYXJkZXIuZGUiLCJleHAiOjE1OTA0NDg2NTksImlhdCI6MTU5MDQ0NTA1OSwib3hPcGVuSURDb25uZWN0VmVyc2lvbiI6Im9wZW5pZGNvbm5lY3QtMS4wIn0.jGhBpfnqdyd9qfuEiI7rS2UUkzQqcDhqBetvxAibbssImoWM-TQqSOLWdSGOW1UEV5E5Yk_v80q18Y5qjD4H6NkrVSwx4QjhDyCGTFvnvFaiSeKedZeY475Sxxy6zLMbAX5ptEIAW_O1h6JiY01wM38ExVLgadIZvyKh13T_DXirPozzBSJcxdxlJgOooWPN9UqpHu801SIBGOoI5Ov1DQXavz-qje7gHetUHEziKhuSZ5bOQ9FugukZ5JAgcetQNk83jCHl7NwSZUEyeYA5vZ8IgjaRxj-tN9rp6v3IuyCeznObhar31NPJq6qWBKdmqujZtuurUwb65evck8f-Jg"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Anti-replay token antiReplayTokenResponse
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
429 Too Many Requests Too many request - no more token available None
500 Internal Server Error Server error None
503 Service Unavailable Service Unavailable or in maintenance None

wallets

Fetches all wallets information

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/wallets', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/wallets',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /wallets

This service returns the user wallets, filtered by permissions. The Admin and SuperAuditor will be provided with all the Wallets. Depending the role, the data returned by the service change:


Access allowed to: - Admin - PolicyOperator - SuperAuditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
filterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply
isLocked query boolean false Filter by lock status
isArchived query boolean false Filter by archive status
hasOpenOrders query boolean false Filter with wallet with open orders

Enumerated Values

Parameter Value
filterCriterion creationUnixTimestamp
filterCriterion lastActionUnixTimestamp
filterDirection gte
filterDirection lte

Example responses

200 Response

{
  "count": 2,
  "items": [
    {
      "consumerID": "C_3984424",
      "creationUnixTimestamp": 1564790400,
      "description": "Main bitcoin",
      "hasOpenOrders": true,
      "id": "6eedaf95-a6c7-4b6d-88ed-69ca805f8e69",
      "isArchived": false,
      "lastActionUnixTimestamp": 1564790400,
      "policy": {
        "consumerID": "C_39847234",
        "creationUnixTimestamp": 681177600,
        "description": "Main btc policy",
        "id": "6eedaf95-a6c7-4b6d-88ed-69ca805f8e69",
        "isArchived": false,
        "isAutoLockingEnabled": false,
        "isLedgerEnforced": true,
        "isLocked": false,
        "lastActionUnixTimestamp": 1564790400,
        "ledgerID": "btc",
        "publicID": "0001",
        "quota": "15445238",
        "quotaPeriod": 1,
        "quotaPeriodSeconds": 3600,
        "securitySchemeID": "one-by-one",
        "timeLock": 0,
        "timeLockSeconds": 0,
        "userPermissions": [
          {
            "approveOrder": true,
            "consumerID": "",
            "createOrder": false,
            "description": "Auditor account",
            "email": "[email protected]",
            "fullname": "Stanislaw Kaner",
            "id": "2d1b9ba3-213c-48c7-b9c7-94cc4c17e392",
            "readAll": true
          }
        ]
      },
      "publicID": "0001-0000029",
      "smartContractBalances": [],
      "spendableBalance": "1213243564",
      "totalBalance": "1213242500"
    },
    {
      "consumerID": "C_3981894",
      "creationUnixTimestamp": 1564790400,
      "hasOpenOrders": true,
      "id": "140c79f9-353e-4b4d-8040-e580a028cd8f",
      "isArchived": false,
      "lastActionUnixTimestamp": 1564790400,
      "policy": {
        "consumerID": "C_39147234",
        "creationUnixTimestamp": 681177600,
        "description": "Main eth policy",
        "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
        "isArchived": false,
        "isAutoLockingEnabled": false,
        "isLedgerEnforced": false,
        "isLocked": false,
        "lastActionUnixTimestamp": 1564790400,
        "ledgerID": "eth",
        "publicID": "00041",
        "quota": "15445238",
        "quotaPeriod": 1,
        "quotaPeriodSeconds": 3600,
        "securitySchemeID": "one-by-one",
        "timeLock": 0,
        "timeLockSeconds": 0,
        "userPermissions": [
          {
            "approveOrder": true,
            "consumerID": "",
            "createOrder": false,
            "description": "Auditor account",
            "email": "[email protected]",
            "fullname": "Stanislaw Kaner",
            "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
            "readAll": true
          }
        ]
      },
      "publicID": "0041-0040010",
      "smartContractBalances": [
        {
          "behaviour": [
            {
              "behaviourID": "erc20-light"
            }
          ],
          "decimals": "8",
          "ledgerID": "eth",
          "name": "Hop Hop byte",
          "smartContractID": "48deb072-ab3a-4b5a-93d9-163dc4d01e4a",
          "spendableBalance": "454870",
          "symbol": "OOB",
          "totalBalance": "457784870"
        },
        {
          "behaviour": [
            {
              "behaviourID": "erc20-light"
            }
          ],
          "decimals": "8",
          "ledgerID": "eth",
          "name": "Super Style",
          "smartContractID": "526dd31f-4a34-4101-9027-bcdbbe475d7e",
          "spendableBalance": "2112",
          "symbol": "SSE",
          "totalBalance": "7787741"
        }
      ],
      "spendableBalance": "12564",
      "totalBalance": "12500"
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK wallets walletCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Submit a request to create a new wallet

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/wallets', headers = headers)

print(r.json())

const inputBody = '{
  "consumerID": "4309-8d21",
  "consumerLabel": "My Ethereum Wallet",
  "description": "It's my wallet",
  "policyID": "33266d19-76a0-4934-8877-30b5d97c5732"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "consumerID": "4309-8d21",
  "consumerLabel": "My Ethereum Wallet",
  "description": "It's my wallet",
  "policyID": "33266d19-76a0-4934-8877-30b5d97c5732"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/wallets',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /wallets

This service submits a request to create a new wallet The created wallet will be assigned a publicID by Bewaarder, the format will be the policy's publicID and seven hexadecimal chars separated by hyphen. i.e 0E2B-0000001
Access allowed to:

Body parameter

{
  "consumerID": "4309-8d21",
  "consumerLabel": "My Ethereum Wallet",
  "description": "It's my wallet",
  "policyID": "33266d19-76a0-4934-8877-30b5d97c5732"
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body createWalletRequest true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to create a wallet None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Policy not found None
409 Conflict Consumer ID already existing or request id previously used errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Fetches specific wallet information

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/wallets/{walletID}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/wallets/{walletID}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /wallets/{walletID}

This service retrieves specific wallet information for a specific user.

Depending on the role, the data returned by the service changes:


Access allowed to: - Admin - PolicyOperator if they have readAll permissions on the policy that the wallet belongs to - SuperAuditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

200 Response

{
  "consumerID": "C_3981894",
  "creationUnixTimestamp": 1564790400,
  "hasOpenOrders": true,
  "id": "140c79f9-353e-4b4d-8040-e580a028cd8f",
  "isArchived": false,
  "lastActionUnixTimestamp": 1564790400,
  "policy": {
    "consumerID": "C_39147234",
    "creationUnixTimestamp": 681177600,
    "description": "Main eth policy",
    "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
    "isArchived": false,
    "isAutoLockingEnabled": false,
    "isLedgerEnforced": false,
    "isLocked": false,
    "lastActionUnixTimestamp": 1564790400,
    "ledgerID": "eth",
    "publicID": "00041",
    "quota": "15445238",
    "quotaPeriod": 1,
    "quotaPeriodSeconds": 3600,
    "securitySchemeID": "one-by-one",
    "timeLock": 0,
    "timeLockSeconds": 0,
    "userPermissions": [
      {
        "approveOrder": true,
        "consumerID": "",
        "createOrder": false,
        "description": "Auditor account",
        "email": "[email protected]",
        "fullname": "Stanislaw Kaner",
        "id": "afc0de99-2fe8-4e2c-9f63-31acdae1ecc3",
        "readAll": true
      }
    ]
  },
  "publicID": "0041-0040010",
  "smartContractBalances": [
    {
      "behaviour": [
        {
          "behaviourID": "erc20-light"
        }
      ],
      "decimals": "8",
      "ledgerID": "eth",
      "name": "Hop Hop byte",
      "smartContractID": "48deb072-ab3a-4b5a-93d9-163dc4d01e4a",
      "spendableBalance": "454870",
      "symbol": "OOB",
      "totalBalance": "457784870"
    },
    {
      "behaviour": [
        {
          "behaviourID": "erc20-light"
        }
      ],
      "decimals": "8",
      "ledgerID": "eth",
      "name": "Super Style",
      "smartContractID": "526dd31f-4a34-4101-9027-bcdbbe475d7e",
      "spendableBalance": "2112",
      "symbol": "SSE",
      "totalBalance": "7787741"
    }
  ],
  "spendableBalance": "12564",
  "totalBalance": "12500"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK wallet walletInformation
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Wallet not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

Fetches wallet unused address

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/wallets/{walletID}/addresses/unused', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/addresses/unused',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/addresses/unused',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/wallets/{walletID}/addresses/unused',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /wallets/{walletID}/addresses/unused

This service retrieves an unused address for a specific wallet and some ledger specific information, see the route /wallets/{walletID}/addresses/{index} for details

This service is not available for:


Access allowed to: - PolicyOperator if they have createOrder permissions on the policy that the wallet belongs to

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id

Example responses

200 Response

{
  "address": "3GbPcsmeXos38KmGbvHWCMy7Hgj7gFKrCY",
  "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

501 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
200 OK wallet address addressInformation
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Wallet not found None
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Fetches wallet address

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/wallets/{walletID}/addresses/{index}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/addresses/{index}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/addresses/{index}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/wallets/{walletID}/addresses/{index}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /wallets/{walletID}/addresses/{index}

This service retrieves an address for a specific wallet and ledger specific information depending on the wallet's policy ledger:

The requested index will determine which address to be retrieved, for a given index the returned specific information and address is idempotent. For Ethereum and Ripple the index requested must be zero.
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
index path integer(int32) true Index of the address

Example responses

200 Response

{
  "address": "3GbPcsmeXos38KmGbvHWCMy7Hgj7gFKrCY",
  "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d"
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

404 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
200 OK wallet address addressInformation
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Wallet not found or index not found errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Updates a wallet's archive status

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/wallets/{walletID}/archive', headers = headers)

print(r.json())

const inputBody = '{
  "archive": false
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/archive',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "archive": false
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/archive',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/wallets/{walletID}/archive',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /wallets/{walletID}/archive

This service archives or unarchives a wallet.

An archived wallet can still receive funds and tokens but can be filtered out of most API queries.
Access allowed to:

Body parameter

{
  "archive": false
}

Parameters

Name In Type Required Description
walletID path string true Wallet id
Authorization header string true Json Web Token
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body updateArchiveStateRequest true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
204 No Content wallet updated None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Wallet not found None
409 Conflict Request id previously used errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

This service submits a request to force the update of a wallet's balances

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/wallets/{walletID}/balances', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/balances',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/balances',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/wallets/{walletID}/balances',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /wallets/{walletID}/balances

This service submits a request to force the update of a wallet's balance. Balances are updated automatically most of the time although in some particular cases (like usage of a generic smart contract API for value exchange) the balance update might not be triggered. The balance update will be processed in the background. This route should only be used for those specific cases, standard balance changes are handled automatically by Bewaarder.
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
walletID path string true Wallet id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

403 Response

{
  "message": "The policy is locked"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to update a balance None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Update balance is forbidden because the user isn't allowed to do it, or the policy is locked errorResponse
404 Not Found Wallet not found None
409 Conflict Request ID previously used errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Fetches orders and transactions from a specific wallet

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/wallets/{walletID}/orders', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/wallets/{walletID}/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /wallets/{walletID}/orders

This service returns all orders and transactions for a given wallet.
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
maxEntries query integer(int32) false Limit the entries to retrieve
filterUnixTimestamp query integer(int64) false Define the reference unix timestamp to filter by
orderFilterCriterion query string false Specify the field to filter by
filterDirection query string false Filtering operator to apply
orderStatus query string false Filter with orders status (opened, confirmed, canceled, failed)

Enumerated Values

Parameter Value
orderFilterCriterion creationUnixTimestamp
orderFilterCriterion lastActionUnixTimestamp
orderFilterCriterion earliestProcessUnixTimestamp
filterDirection gte
filterDirection lte
orderStatus opened
orderStatus confirmed
orderStatus canceled
orderStatus failed

Example responses

200 Response

{
  "count": 1,
  "items": [
    {
      "amountWithoutFee": "1250000000",
      "broadcastUnixTimestamp": 1518656970,
      "cancellationUnixTimestamp": 1518656970,
      "confirmationUnixTimestamp": 681177600,
      "consumerID": "C_90858904",
      "creationUnixTimestamp": 1518656970,
      "currentSignatures": 3,
      "description": "To Cold Wallet",
      "failureCode": "001",
      "fee": "569988",
      "feeRate": "3",
      "feeTypeID": "high",
      "id": "d1941bf3-38e8-4db1-8e6b-844d5b53b468",
      "inputs": [
        {
          "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
          "inputType": "ledger",
          "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
          "ledgerIndex": 0,
          "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
        },
        {
          "address": "18RDoKK7Ed5zid2FkKVy8q3rULr4tgfjr4",
          "inputType": "ledger",
          "ledgerData": "54f171734fa9bc78432abd52d278321345d35df9",
          "ledgerIndex": 1,
          "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
        }
      ],
      "isBroadcast": false,
      "isCanceled": false,
      "isConfirmed": false,
      "isFailed": false,
      "isProcessed": false,
      "lastActionUnixTimestamp": 1718656970,
      "ledgerID": "btc",
      "ledgerTransactionID": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124",
      "outputs": [
        {
          "address": "1LM8A5zX1V5ezkmuxkRVPEyLkfDxyT6JEn",
          "isLocked": false,
          "ledgerData": "b4525925c6a831f5c488cc404190141456a9e699",
          "ledgerIndex": 0,
          "outputType": "ledger"
        },
        {
          "address": "15cVYhenMqoVAhYqdQoBNfKmb8yQWpcagX",
          "amount": "1200000000",
          "isLocked": true,
          "ledgerData": "f3863247f3ff0644edb9d29c54b271e5604136bde",
          "ledgerIndex": 1,
          "outputType": "ledger",
          "recipientWallet": {
            "consumerID": "C_2384795208",
            "description": "lorem ipsum",
            "id": "d7a15290-b023-45f7-b8f7-fe3a25bc174a",
            "publicID": "0001-000012f4"
          },
          "sentAmount": "1200000000"
        }
      ],
      "policyApprovers": [
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "user": {
            "consumerID": "C_95830349",
            "email": "[email protected]",
            "fullname": "Est",
            "id": "45b54ece-b67a-4d0d-870d-e81d41c18c99"
          }
        },
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "user": {
            "consumerID": "",
            "email": "[email protected]",
            "fullname": "Quis",
            "id": "62e0f6dd-687e-41ab-86c1-4f0f26376aa5"
          }
        },
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "user": {
            "consumerID": "",
            "email": "[email protected]",
            "fullname": "Magna",
            "id": "35abbb56-0a63-4a9e-9417-3ef6bad59114"
          }
        },
        {
          "approvalUnixTimestamp": 0,
          "hasSigned": false,
          "user": {
            "consumerID": "",
            "email": "[email protected]",
            "fullname": "Cillu",
            "id": "994703ed-04cc-4f55-a695-0ffda453591c"
          }
        }
      ],
      "processedAtUnixTimestamp": 1518655970,
      "requiredSignatures": 3,
      "senderWallet": {
        "consumerID": "C_398408809384",
        "creationUnixTimestamp": 1518699498,
        "description": "Main wallet sender",
        "id": "9d23fde5-d15f-41aa-800e-775fe46559ac",
        "lastActionUnixTimestamp": 1518541970,
        "policyID": "324a726a-8bc3-4a59-8824-a482e9366e38",
        "policyLedgerID": "btc",
        "policyQuota": "6000000",
        "publicID": "0041-0072029"
      },
      "smartContractOperation": {
        "method": "burn",
        "parameters": [
          {
            "key": "_value",
            "type": "uint256",
            "value": "123"
          }
        ],
        "smartContract": {
          "activationTimestamp": 681177600,
          "behaviours": [
            "erc20-light"
          ],
          "consumerID": "C_2555",
          "id": "3f171b60-6680-4577-8dc2-38fdd6fa987e",
          "ledgerID": "eth",
          "ledgerUniqueID": 1.0549022996915278e+48,
          "name": "The new Smart Contract !"
        }
      }
    }
  ]
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

Responses

Status Meaning Description Schema
200 OK Orders orderCollection
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Wallet not found None
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

This service submits a request to create an new order.

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string'
}

r = requests.post('https://core.bewaarder.de/v1/wallets/{walletID}/orders', headers = headers)

print(r.json())

const inputBody = '{
  "amount": "1252850000",
  "consumerID": "48c7-b9c7",
  "description": "refill cold wallet",
  "feeRate": "12",
  "feeTypeID": "high",
  "fromWalletID": "093d2af4-f1d0-450d-b02f-991c82609f5b",
  "recipientID": "0151-0004889",
  "recipientIDType": "public",
  "recipients": [
    {
      "amount": "1252850000",
      "recipientID": "0151-0004889",
      "recipientIDType": "public",
      "subtractFee": true
    }
  ],
  "smartContractOperation": {
    "method": "burn",
    "parameters": [
      {
        "key": "_value",
        "type": "uint256",
        "value": "123"
      }
    ],
    "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
  },
  "subtractFee": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "amount": "1252850000",
  "consumerID": "48c7-b9c7",
  "description": "refill cold wallet",
  "feeRate": "12",
  "feeTypeID": "high",
  "fromWalletID": "093d2af4-f1d0-450d-b02f-991c82609f5b",
  "recipientID": "0151-0004889",
  "recipientIDType": "public",
  "recipients": [
    {
      "amount": "1252850000",
      "recipientID": "0151-0004889",
      "recipientIDType": "public",
      "subtractFee": true
    }
  ],
  "smartContractOperation": {
    "method": "burn",
    "parameters": [
      {
        "key": "_value",
        "type": "uint256",
        "value": "123"
      }
    ],
    "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
  },
  "subtractFee": true
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders',
{
  method: 'POST',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string'
}

result = RestClient.post 'https://core.bewaarder.de/v1/wallets/{walletID}/orders',
  params: {
  }, headers: headers

p JSON.parse(result)

POST /wallets/{walletID}/orders

This service submits a request to create an new order.

SmartContract Orders

SmartContract behaviour's supported methods and theirs paremeters model:

Please find the model's definition at the botton of swagger-ui
Access allowed to:

Body parameter

{
  "amount": "1252850000",
  "consumerID": "48c7-b9c7",
  "description": "refill cold wallet",
  "feeRate": "12",
  "feeTypeID": "high",
  "fromWalletID": "093d2af4-f1d0-450d-b02f-991c82609f5b",
  "recipientID": "0151-0004889",
  "recipientIDType": "public",
  "recipients": [
    {
      "amount": "1252850000",
      "recipientID": "0151-0004889",
      "recipientIDType": "public",
      "subtractFee": true
    }
  ],
  "smartContractOperation": {
    "method": "burn",
    "parameters": [
      {
        "key": "_value",
        "type": "uint256",
        "value": "123"
      }
    ],
    "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
  },
  "subtractFee": true
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body createOrderRequest true none
ยป recipients body [orderRecipient] false none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

403 Response

{
  "message": "The policy is locked"
}

409 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to create an order None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Create order is forbidden because the user isn't allowed to do it, or the policy is locked errorResponse
404 Not Found Wallet not found None
409 Conflict Consumer ID already existing or request id previously used errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Fetches an order or a transaction from a specific wallet

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /wallets/{walletID}/orders/{orderID}

This service fetches an order or a transaction from a specific wallet. The idType query parameter is relative to orderID.
Access allowed to:

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
orderID path string true Order id
idType query string false IDentifies if the entity id provided is a Bewaarder generated id, or consumer id

Enumerated Values

Parameter Value
idType internal
idType consumer

Example responses

200 Response

{
  "amountWithoutFee": "1250000000",
  "broadcastUnixTimestamp": 1518656970,
  "cancellationUnixTimestamp": 1518656970,
  "confirmationUnixTimestamp": 681177600,
  "consumerID": "C_90858904",
  "creationUnixTimestamp": 1518656970,
  "currentSignatures": 3,
  "description": "To Cold Wallet",
  "failureCode": "001",
  "fee": "569988",
  "feeRate": "3",
  "feeTypeID": "high",
  "id": "d1941bf3-38e8-4db1-8e6b-844d5b53b468",
  "inputs": [
    {
      "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
      "inputType": "ledger",
      "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
      "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
    },
    {
      "address": "18RDoKK7Ed5zid2FkKVy8q3rULr4tgfjr4",
      "inputType": "ledger",
      "ledgerData": "54f171734fa9bc78432abd52d278321345d35df9",
      "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
    }
  ],
  "isBroadcast": false,
  "isCanceled": false,
  "isConfirmed": false,
  "isFailed": false,
  "isProcessed": false,
  "lastActionUnixTimestamp": 1718656970,
  "ledgerID": "btc",
  "ledgerTransactionID": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124",
  "outputs": [
    {
      "address": "1LM8A5zX1V5ezkmuxkRVPEyLkfDxyT6JEn",
      "isLocked": false,
      "ledgerData": "b4525925c6a831f5c488cc404190141456a9e699",
      "outputType": "ledger"
    },
    {
      "address": "15cVYhenMqoVAhYqdQoBNfKmb8yQWpcagX",
      "amount": "1200000000",
      "isLocked": false,
      "ledgerData": "f3863247f3ff0644edb9d29c54b271e5604136bde",
      "outputType": "ledger",
      "recipientWallet": {
        "consumerID": "C_2384795208",
        "description": "lorem ipsum",
        "id": "d7a15290-b023-45f7-b8f7-fe3a25bc174a",
        "publicID": "0001-000012f4"
      },
      "sentAmount": "1200000000"
    }
  ],
  "policyApprovers": [
    {
      "approvalUnixTimestamp": 681177600,
      "consumerID": "C_95830349",
      "email": "[email protected]",
      "fullname": "Est",
      "hasSigned": true,
      "id": "45b54ece-b67a-4d0d-870d-e81d41c18c99"
    },
    {
      "approvalUnixTimestamp": 681177600,
      "consumerID": "",
      "email": "[email protected]",
      "fullname": "Quis",
      "hasSigned": true,
      "id": "62e0f6dd-687e-41ab-86c1-4f0f26376aa5"
    },
    {
      "approvalUnixTimestamp": 681177600,
      "consumerID": "",
      "email": "[email protected]",
      "fullname": "Magna",
      "hasSigned": true,
      "id": "35abbb56-0a63-4a9e-9417-3ef6bad59114"
    },
    {
      "approvalUnixTimestamp": 0,
      "consumerID": "",
      "email": "[email protected]",
      "fullname": "Cillu",
      "hasSigned": false,
      "id": "994703ed-04cc-4f55-a695-0ffda453591c"
    }
  ],
  "processedAtUnixTimestamp": 1518655970,
  "requiredSignatures": 3,
  "senderWallet": {
    "consumerID": "C_398408809384",
    "creationUnixTimestamp": 1518699498,
    "description": "Main wallet sender",
    "id": "9d23fde5-d15f-41aa-800e-775fe46559ac",
    "lastActionUnixTimestamp": 1518541970,
    "policyID": "324a726a-8bc3-4a59-8824-a482e9366e38",
    "policyLedgerID": "btc",
    "policyQuota": "6000000",
    "publicID": "0041-0072029"
  },
  "smartContractOperation": {
    "isFailed": false,
    "method": "burn",
    "parameters": [
      {
        "key": "_value",
        "type": "uint256",
        "value": "123"
      }
    ],
    "smartContract": {
      "activationTimestamp": 681177600,
      "behaviours": [
        "erc20-light"
      ],
      "consumerID": "C_2555",
      "id": "3f171b60-6680-4577-8dc2-38fdd6fa987e",
      "ledgerID": "eth",
      "ledgerUniqueID": 1.0549022996915278e+48,
      "name": "The new Smart Contract !"
    }
  }
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

404 Response

{
  "message": "Order not found"
}

Responses

Status Meaning Description Schema
200 OK Orders orderInformation
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Forbidden None
404 Not Found Wallet or Order not found errorResponse
500 Internal Server Error Server error None
503 Service Unavailable Server unavailable or in maintenance None

This service submits a request to approve an order

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'UCAVersion': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/approvals', headers = headers)

print(r.json())

const inputBody = '{
  "signatures": [
    {
      "key": "6e8b280d3b1ab06081bca768876431f9d0f25d2d",
      "value": "5221032180d7978111e7876d0b6d1f8fbd9bed9f8ab7fcfb53f07c360b80494e8c97dc21032663d325850776fd6149ffd13c4f710f612bde3f70fc1dd886b9cf24282733482103d7c0ca738a509a3508bf726619dff3d61a5f8a14d1702f32c5df2bfaef398e8f53ae"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCAVersion':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/approvals',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "signatures": [
    {
      "key": "6e8b280d3b1ab06081bca768876431f9d0f25d2d",
      "value": "5221032180d7978111e7876d0b6d1f8fbd9bed9f8ab7fcfb53f07c360b80494e8c97dc21032663d325850776fd6149ffd13c4f710f612bde3f70fc1dd886b9cf24282733482103d7c0ca738a509a3508bf726619dff3d61a5f8a14d1702f32c5df2bfaef398e8f53ae"
    }
  ]
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'UCAVersion':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/approvals',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'UCAVersion' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/approvals',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /wallets/{walletID}/orders/{orderID}/approvals

This service enables an approver to submit their signature(s) to an order on one of their wallets, implicitly starting an asynchronous process to approve the order.
Access allowed to:

Body parameter

{
  "signatures": [
    {
      "key": "6e8b280d3b1ab06081bca768876431f9d0f25d2d",
      "value": "5221032180d7978111e7876d0b6d1f8fbd9bed9f8ab7fcfb53f07c360b80494e8c97dc21032663d325850776fd6149ffd13c4f710f612bde3f70fc1dd886b9cf24282733482103d7c0ca738a509a3508bf726619dff3d61a5f8a14d1702f32c5df2bfaef398e8f53ae"
    }
  ]
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
orderID path string true Order id
UCAVersion header string true UCA active software version
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body transactionSignatures true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

403 Response

{
  "message": "The policy is locked"
}

404 Response

{
  "message": "Wallet not found"
}

409 Response

{
  "message": "This user already signed this order"
}

501 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to approve an order None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Approve order is forbidden because the owner isn't allowed to do it, or the policy is locked errorResponse
404 Not Found Wallet or Order not found errorResponse
409 Conflict Order already broadcast or approved by the user, or request id has already been used errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Fetches raw transaction data from an order and from a specific wallet to be able to approve a order

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'string'
}

r = requests.get('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/raw-transaction', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/raw-transaction',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/raw-transaction',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'string'
}

result = RestClient.get 'https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/raw-transaction',
  params: {
  }, headers: headers

p JSON.parse(result)

GET /wallets/{walletID}/orders/{orderID}/raw-transaction

This service fetches raw transaction data from an order and from a specific wallet to be able to approve a order.

The field ledgerSpecificData contains a json string to add extra information to be sign by the UCA.

For an Ethereum order, the ledgerSpecificData will be represented under this format : { #DEPRECATED: 'gas' field for versions 1.1+ on 14th May 2020. Use the fee field on the main object instead "gas": "21000", #DEPRECATED: 'gasPrice' field for versions 1.1+ on 14th May 2020. Use the fee field on the main object instead "gasPrice": "20", "txStateCounter": "14", "functionPrototype": "transfer(address,uint256)", #DEPRECATED: 'functionDataParameters' field for versions 1.1+ on 14th May 2020. Use functionData instead "functionDataParameters": ["0000000000000000000000008d26283922d2e08c96c336a482f7f9f8cdbcb44e", "0000000000000000000000000000000000000000000000000000000000000001"], amountWithUnits: "12.34 Gwei", feeWithUnits: "1.32 Kwei", functionData: "0000000000000000000000008d26283922d2e08c96c336a482f7f9f8cdbcb44e0000000000000000000000000000000000000000000000000000000000000001" } The functionData field is used for a token transaction.

For a Ripple order, the ledgerSpecificData will be represented under this format : { sourceTag: The Ripple uint32 source tag for a transaction. Optional destinationTag: The Ripple uin32 destination tag for a transaction. Optional. If not supplied when sending to an Exchange, the tx will not be received correctly memos: { Optional. See https://xrpl.org/transaction-common-fields.html#memos-field for more information type: String. Optional. format: String. Optional data: String. Optional. } }


Access allowed to: - PolicyOperator that has approveOrder access on the policy - SuperAuditor

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
orderID path string true Order id

Example responses

200 Response

{
  "fee": "20000",
  "fundingWalletDescription": "Wallet's Policy\n0041-0072029",
  "hashesData": {
    "hash": "320942309jfj02f93f0j09f349ursoijseg",
    "signingExtPubKeyDerivationScheme": "1/1/1"
  },
  "ledgerID": "BTC",
  "ledgerSpecificData": "",
  "recipients": [
    {
      "amount": "10",
      "description": "Policy description\nWallet PublicID",
      "type": "wallet"
    },
    {
      "amount": "20",
      "description": "1Hpc5LfCRdgvfgGSSG7ARKZvibdVm8YtAH",
      "type": "address"
    }
  ],
  "signature": "string",
  "signatureVersion": 1
}

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

403 Response

{
  "message": "The policy is locked"
}

404 Response

{
  "message": "Wallet not found"
}

409 Response

{
  "message": "This user already signed this order"
}

501 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
200 OK raw transaction rawTransaction
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Get raw transaction is forbidden because the user isn't allowed to do it, or the policy is locked errorResponse
404 Not Found Wallet or Order not found errorResponse
409 Conflict Order already broadcast or approved by the user errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Response Headers

Status Header Type Format Description
200 coreVersion integer none

This service submits a request to apply an action on an order

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'string',
  'RequestID': 'string'
}

r = requests.put('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/status', headers = headers)

print(r.json())

const inputBody = '{
  "action": "cancel"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/status',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

const fetch = require('node-fetch');
const inputBody = {
  "action": "cancel"
};
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'string',
  'RequestID':'string'
};

fetch('https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/status',
{
  method: 'PUT',
  body: JSON.stringify(inputBody),
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'string',
  'RequestID' => 'string'
}

result = RestClient.put 'https://core.bewaarder.de/v1/wallets/{walletID}/orders/{orderID}/status',
  params: {
  }, headers: headers

p JSON.parse(result)

PUT /wallets/{walletID}/orders/{orderID}/status

This service allows to apply an action on an order.

Cancel action allowed to:

Unlock action allowed to:

Body parameter

{
  "action": "cancel"
}

Parameters

Name In Type Required Description
Authorization header string true Json Web Token
walletID path string true Wallet id
orderID path string true Order id
RequestID header string false Operation request id. Operation's status can be queried using the route /operations/{requestID}
body body updateOrderStatusRequest true none

Example responses

400 Response

{
  "message": "Invalid payload"
}

401 Response

{
  "message": "The JWT has expired"
}

403 Response

{
  "message": "The policy is locked"
}

404 Response

{
  "message": "Order not found"
}

409 Response

{
  "message": "This order has already been broadcast"
}

501 Response

{
  "message": "This is an error message"
}

Responses

Status Meaning Description Schema
202 Accepted Submits a request to update order status None
400 Bad Request Bad request. errorResponse
401 Unauthorized Token expired or invalid errorResponse
403 Forbidden Cancel the order is forbidden because the user isn't allowed to do it errorResponse
404 Not Found Wallet or Order not found errorResponse
409 Conflict Cancelling this order is not possible anymore, or request id has already been used errorResponse
500 Internal Server Error Server error None
501 Not Implemented Feature unavailable errorResponse
503 Service Unavailable Server unavailable or in maintenance None

Schemas

addressInformation

{
  "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
  "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d"
}

Properties

Name Type Required Restrictions Description
address string true none none
ledgerData string false none none

antiReplayTokenResponse

{
  "antiReplayToken": "B90C53D4B222B059B902EF767BF814C1"
}

Properties

Name Type Required Restrictions Description
antiReplayToken string true none none

approvalKeyValuePayload

{
  "key": "6e8b280d3b1ab06081bca768876431f9d0f25d2d",
  "value": "5221032180d7978111e7876d0b6d1f8fbd9bed9f8ab7fcfb53f07c360b80494e8c97dc21032663d325850776fd6149ffd13c4f710f612bde3f70fc1dd886b9cf24282733482103d7c0ca738a509a3508bf726619dff3d61a5f8a14d1702f32c5df2bfaef398e8f53ae"
}

Properties

Name Type Required Restrictions Description
key string true none Original hash to be signed
value string true none Approver's signature of the hash

authenticationTokenRequest

{
  "email": "[email protected]",
  "password": "azerty"
}

Properties

Name Type Required Restrictions Description
email string true none none
password string true none none

authenticationTokenResponse

{
  "token": "eyJraWQiOiI1ZjU5MzMzMy0yNjJiLTQxOTEtYjExOC1jMjVmYzM3NjgzODBfc2lnX3JzMjU2IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJhdF9oYXNoIjoiNHRrOUNSQm05RmxMTER2dUtYOFl5QSIsImF1ZCI6IjAyMDNmOGZjLTZkNDgtNGI4Ny04NTgwLWYwZDA5ZjBlYjU1OSIsInN1YiI6IlFtMURvcG5nZmFNckQxbXdrTUNicUZfQi1Uc0R0a0s4MC1CanBfYW5hMUUiLCJhdXRoX3RpbWUiOjE1OTA0MTA5NjYsImlzcyI6Imh0dHBzOi8vYXV0aC5iZXdhYXJkZXIuZGUiLCJleHAiOjE1OTA0NDg2NTksImlhdCI6MTU5MDQ0NTA1OSwib3hPcGVuSURDb25uZWN0VmVyc2lvbiI6Im9wZW5pZGNvbm5lY3QtMS4wIn0.jGhBpfnqdyd9qfuEiI7rS2UUkzQqcDhqBetvxAibbssImoWM-TQqSOLWdSGOW1UEV5E5Yk_v80q18Y5qjD4H6NkrVSwx4QjhDyCGTFvnvFaiSeKedZeY475Sxxy6zLMbAX5ptEIAW_O1h6JiY01wM38ExVLgadIZvyKh13T_DXirPozzBSJcxdxlJgOooWPN9UqpHu801SIBGOoI5Ov1DQXavz-qje7gHetUHEziKhuSZ5bOQ9FugukZ5JAgcetQNk83jCHl7NwSZUEyeYA5vZ8IgjaRxj-tN9rp6v3IuyCeznObhar31NPJq6qWBKdmqujZtuurUwb65evck8f-Jg"
}

The Response includes the JWT token (encoded data: user id, user role, user email, user full name and the token expiration time)

Properties

Name Type Required Restrictions Description
token string false none none

behaviourSmartContractOperationEvent

{
  "key": "Transfer",
  "parameters": {}
}

Properties

Name Type Required Restrictions Description
key string true none none
parameters object false none none

behaviourSmartContractOperationInformation

{
  "behaviour": "erc20-light",
  "events": [
    {
      "key": "Transfer",
      "parameters": {}
    }
  ],
  "isFailed": false,
  "method": "transfer",
  "parameters": {},
  "smartContract": {
    "activationTimestamp": 681177600,
    "behaviours": [
      {
        "behaviourID": "erc20-light",
        "metadata": {}
      }
    ],
    "consumerID": "C_349822",
    "id": "0e5cf704-6d59-437c-aefb-569459502322",
    "ledgerID": "eth",
    "ledgerUniqueID": 1.0549022996915278e+48,
    "name": "The new Smart Contract !"
  }
}

Properties

Name Type Required Restrictions Description
behaviour string true none none
events [behaviourSmartContractOperationEvent] true none none

createBehaviourSmartContractOperationRequest

{
  "behaviour": "erc20-light",
  "method": "transfer",
  "parameters": {},
  "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
}

Method execution with the smartContract's behaviour abstraction

Properties

Name Type Required Restrictions Description
behaviour string true none none
method string false none none
parameters object false none Structure depends on method and behaviour
smartContractID string true none none

createGenericSmartContractOperationRequest

{
  "method": "burn",
  "parameters": [
    {
      "key": "_value",
      "type": "uint256",
      "value": "123"
    }
  ],
  "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
}

Method execution with a low level definition of method and parameters

Properties

Name Type Required Restrictions Description
method string false none none
parameters [smartContractOperationParametersMapEntry] false none none

createOrderRequest

{
  "amount": "1252850000",
  "consumerID": "48c7-b9c7",
  "description": "refill cold wallet",
  "feeRate": "12",
  "feeTypeID": "high",
  "fromWalletID": "093d2af4-f1d0-450d-b02f-991c82609f5b",
  "recipientID": "0151-0004889",
  "recipientIDType": "public",
  "recipients": [
    {
      "amount": "1252850000",
      "recipientID": "0151-0004889",
      "recipientIDType": "public",
      "subtractFee": true
    }
  ],
  "smartContractOperation": {
    "method": "burn",
    "parameters": [
      {
        "key": "_value",
        "type": "uint256",
        "value": "123"
      }
    ],
    "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
  },
  "subtractFee": true
}

Properties

Name Type Required Restrictions Description
consumerID string false none Optional entity id to be used instead of an internal generated id
description string true none none
feeRate string true none none
feeTypeID string true none none
fromWalletID string true none none
ledgerSpecificFields object false none none
recipients [orderRecipient] false none none

createOrderXrpSpecificParameters

{
  "destinationTag": 0,
  "memos": [
    {
      "data": "string",
      "format": "string",
      "type": "string"
    }
  ],
  "sourceTag": 0
}

Ripple specific parameters

Properties

Name Type Required Restrictions Description
destinationTag integer false none none
memos [xrpMemo] false none none

createOwnerRequest

{
  "consumerID": "4309-8d21",
  "description": "Developper",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "ownerPublicKey": "9374A26A71490437AA024B4FADD5B497EE1A8EA6FF12F6FB65AF2720B59CCF",
  "password": "VV54CVCSD985SDFD32"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Optional entity id to be used instead of an internal generated ID
description string true none none
email string true none owner's email must be lowercase
fullname string true none none
ownerPublicKey string true none none
password string true none none

createPolicyRequest

{
  "consumerID": "4309-8d21",
  "description": "It's my policy",
  "ledgerEnforced": false,
  "ledgerID": "btc",
  "quota": "15445238",
  "quotaPeriodSeconds": 3600,
  "securitySchemeID": "one-by-one",
  "timeLockSeconds": 0,
  "userIDType": "policyOperator",
  "userPermissions": [
    {
      "approveOrder": true,
      "createOrder": false,
      "readAll": true,
      "userID": "0225ff76-7399-48db-8b8e-2aacff4099ad"
    }
  ]
}

Properties

Name Type Required Restrictions Description
auditors array false none none
autoLockingEnabled boolean false none Enables funds auto-locking
consumerID string false none Optional entity id to be used instead of an internal generated ID
description string true none none
ledgerEnforced boolean true none Owner's signatures are backed by the ledger, otherwise the signatures are backed by Bewaarder
ledgerID string true none none
mutable boolean false none This policy can be updated with an update policy request.
quotaPeriodSeconds integer(int32) false none Period in seconds where the executed transactions will be accounted against the defined quota
securitySchemeID string true none none
timeLockSeconds integer(int32) false none Time in seconds during which the transactions will be held before HS signature and broadcast
userIDType string false none IDentifies the owners/auditors/users provided IDs as Bewaarder generated IDs, or consumer IDs
userPermissions [policyUserPermissions] true none none

Enumerated Values

Property Value
userIDType internal
userIDType consumer

createRequestIDsRequest

{
  "count": 1
}

Properties

Name Type Required Restrictions Description
count integer(int32) true none none

createSmartContractOperationRequest

{
  "amount": "string",
  "behaviourOperation": {
    "behaviour": "erc20-light",
    "method": "transfer",
    "parameters": {},
    "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
  },
  "genericOperation": {
    "method": "burn",
    "parameters": [
      {
        "key": "_value",
        "type": "uint256",
        "value": "123"
      }
    ],
    "smartContractID": "fe74729c-d643-4c08-be41-be899604b445"
  }
}

Properties

Name Type Required Restrictions Description
amount string false none none

createUserRequest

{
  "consumerID": "4309-8d21",
  "description": "Developper",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "password": "VV54CVCSD985SDFD32",
  "publicKey": "9374A26A71490437AA024B4FADD5B497EE1A8EA6FF12F6FB65AF2720B59CCF"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Optional entity id to be used instead of an internal generated ID
description string true none none
email string true none user's email must be lowercase
fullname string true none none
password string true none none
publicKey string false none The public key MUST be specified if the user is to be given ApproveOrder permissions on any policy

createWalletRequest

{
  "consumerID": "4309-8d21",
  "consumerLabel": "My Ethereum Wallet",
  "description": "It's my wallet",
  "policyID": "33266d19-76a0-4934-8877-30b5d97c5732"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Optional entity id to be used instead a Bewaarder generated id
consumerLabel string true none This is the name of the wallet was created with a consumerID
description string true none none
policyID string true none Policy id to associate this wallet with
policyIDType string false none IDentifies if the policyID provided is a Bewaarder generated id, or consumer id. Default bewaarder

Enumerated Values

Property Value
policyIDType internal
policyIDType consumer

ledgerCollection

{
  "count": 1,
  "events": [
    {
      "ledgerID": "e33bfbf6-0eab-4509-8cf6-cf99e20c365c",
      "itin": "TP3B-248N-Q",
      "symbol": "ETH",
      "name": "Ethereum",
      "description": "Ethereum is a global, decentralized platform for money and new kinds of applications."
    }
  ]
}

Collection of supported ledgers

Properties

Name Type Required Restrictions Description
count integer(int32) true none none
events [ledger] true none [Model of a supported ledger]

emailAvailability

{
  "isAvailable": true
}

Properties

Name Type Required Restrictions Description
isAvailable boolean true none none

enableSmartContractRequest

{
  "behaviours": [
    {
      "behaviourID": "erc20-light",
      "metadata": {}
    }
  ],
  "consumerID": "C_445487",
  "ledgerUniqueID": 7.723775656548026e+46,
  "name": "The new Smart Contract !"
}

Properties

Name Type Required Restrictions Description
behaviours [enableSmartContractRequestBehaviour] true none List of Bewaarder's behaviours the smartcontract will suppport

enableSmartContractRequestBehaviour

{
  "behaviourID": "erc20-light",
  "metadata": {}
}

Properties

Name Type Required Restrictions Description
behaviourID string true none none
metadata object false none none

erc20LightBalanceOfBehaviourParameters

{
  "address": 1.3164684653299594e+48
}

Properties

Name Type Required Restrictions Description
address string true none The ledger address we want get the token balances

erc20LightTransferBehaviourParameters

{
  "amount": "33",
  "recipientID": 1.3164684653299594e+48,
  "recipientIDType": "ledger"
}

Properties

Name Type Required Restrictions Description
amount string true none none
recipientID string true none none
recipientIDType string true none IDentifies if the entity id provided is a ledger address, internal public id, internal generated id, or consumer id

Enumerated Values

Property Value
recipientIDType ledger
recipientIDType public
recipientIDType internal
recipientIDType consumer

errorResponse

{
  "message": "This is an error message"
}

Properties

Name Type Required Restrictions Description
message string true none none

event

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b"
}

Properties

Name Type Required Restrictions Description
eventType string true none none
requestID string false none Request id that caused the creation. If the caller supplied the request id, this will match, otherwise it will be internally generated. If this was an internally generated event, there will be no request id supplied
savedAtTimestamp integer(int64) true none The time at which the event was saved in the event stream and made availabe for callers
sequenceOffset integer(int64) true none The unique identifier for this event in the sequence
triggeredAtTimestamp integer(int64) true none The time at which the event was occurred
triggeredByUserID string false none none

eventCollection

{
  "count": 1,
  "events": [
    {
      "eventType": "string",
      "requestID": "string",
      "savedAtTimestamp": 1564790400,
      "sequenceOffset": 0,
      "triggeredAtTimestamp": 681177600,
      "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b"
    }
  ]
}

Properties

Name Type Required Restrictions Description
count integer(int32) true none none
events [event] true none none

feeDetails

{
  "highFeeRate": "36",
  "lowFeeRate": "12",
  "mediumFeeRate": "24"
}

Properties

Name Type Required Restrictions Description
highFeeRate string false none none
lowFeeRate string false none none
mediumFeeRate string false none none

genericSmartContractOperationInformation

{
  "isFailed": false,
  "method": "burn",
  "parameters": [
    {
      "key": "_value",
      "type": "uint256",
      "value": "123"
    }
  ],
  "smartContract": {
    "activationTimestamp": 681177600,
    "behaviours": [
      {
        "behaviourID": "erc20-light",
        "metadata": {}
      }
    ],
    "consumerID": "C_349822",
    "id": "0e5cf704-6d59-437c-aefb-569459502322",
    "ledgerID": "eth",
    "ledgerUniqueID": 1.0549022996915278e+48,
    "name": "The new Smart Contract !"
  }
}

Properties

Name Type Required Restrictions Description
isFailed boolean false none none
method string false none none
parameters [smartContractOperationParametersMapEntry] false none none

incomingOrderConfirmedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "id": "string",
  "ledgerID": "string",
  "toWalletID": "string"
}

Incoming order confirmed

Properties

allOf - discriminator: event.eventType

and

incomingOrderDetectedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "description": "string",
  "fromWalletID": "string",
  "id": "string",
  "isLocked": true,
  "ledgerID": "string",
  "ledgerTransactionID": "string",
  "toWalletID": "string"
}

Incoming order detected event

Properties

allOf - discriminator: event.eventType

and

incomingOrderFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "failureReason": "EXPIRED",
  "id": "string",
  "ledgerID": "string",
  "toWalletID": "string"
}

Incoming order failed

Properties

allOf - discriminator: event.eventType

and

incomingOrderUnlockedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "id": "string",
  "ledgerID": "string",
  "toWalletID": "string"
}

Order's funds unlocked

Properties

allOf - discriminator: event.eventType

and

incomingOrderUnlockingFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "failureReason": "LS_ORDER_ALREADY_UNLOCKED",
  "id": "string",
  "ledgerID": "string",
  "toWalletID": "string"
}

Order's funds unlocking failed

Properties

allOf - discriminator: event.eventType

and

inputInformation

{
  "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
  "amount": "1345",
  "inputType": "ledger",
  "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
  "ledgerIndex": 0,
  "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
}

Properties

Name Type Required Restrictions Description
address string false none none
amount string false none none
inputType string true none none
ledgerData string false none none
ledgerIndex integer false none Index of the input in the transaction based on ledger information (might be null for some ledgers and pre-3.0 orders)
source string true none none

Enumerated Values

Property Value
inputType ledger
inputType smartcontract

operationStatus

{
  "completedUnixTimestamp": 1564790420,
  "createdUnixTimestamp": 1564790400,
  "status": "processing"
}

Properties

Name Type Required Restrictions Description
completedUnixTimestamp integer(int64) false none Unix timestamp for when the request processing was completed.
createdUnixTimestamp integer(int64) true none Unix timestamp for when the request was created.
status string true none Status of the request

Enumerated Values

Property Value
status processing
status succeeded
status failed

orderApproverInformation

{
  "approvalUnixTimestamp": 681177600,
  "hasSigned": true,
  "user": {
    "consumerID": "4309-8d21",
    "email": "[email protected]",
    "fullname": "Bewaarder Developer",
    "id": "0593c593-a68b-4e74-a16b-933b87a823e3"
  }
}

Properties

Name Type Required Restrictions Description
approvalUnixTimestamp integer(int64) false none none
hasSigned boolean true none The order has been signed by the approver

orderCollection

{
  "count": 1,
  "items": [
    {
      "broadcastUnixTimestamp": 681177600,
      "cancellationUnixTimestamp": 681177600,
      "confirmationUnixTimestamp": 681177600,
      "consumerID": "48c7-b9c7",
      "creationUnixTimestamp": 681177600,
      "creatorID": "c53df56e-ac4b-456b-bc3a-bb6185953d82",
      "currentSignatures": 3,
      "description": "To Cold wallet",
      "earliestProcessUnixTimestamp": 681177600,
      "failureCode": "001",
      "fee": "454981",
      "feeRate": "4",
      "feeTypeID": "high",
      "id": "648004cc-af60-4bad-bb8b-a779d19770e4",
      "inputs": [
        {
          "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
          "amount": "1345",
          "inputType": "ledger",
          "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
          "ledgerIndex": 0,
          "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
        }
      ],
      "isBroadcast": false,
      "isCanceled": false,
      "isConfirmed": false,
      "isFailed": true,
      "isProcessed": false,
      "isScheduled": true,
      "lastActionUnixTimestamp": 681177600,
      "ledgerID": "btc",
      "ledgerTransactionID": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124",
      "outputs": [
        {
          "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
          "amount": "1345",
          "isChange": false,
          "isLocked": false,
          "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
          "ledgerIndex": 0,
          "outputType": "ledger",
          "recipientWallet": {
            "consumerID": "4997-90a2",
            "consumerLabel": "My Own Ethereum Wallet",
            "description": "Main",
            "id": "63cbae8c-350b-4997-90a2-a43ce6e40cfe",
            "publicID": "0071-0004840"
          },
          "sentAmount": "1345",
          "subtractFee": false
        }
      ],
      "policyApprovers": [
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "user": {
            "consumerID": "4309-8d21",
            "email": "[email protected]",
            "fullname": "Bewaarder Developer",
            "id": "0593c593-a68b-4e74-a16b-933b87a823e3"
          }
        }
      ],
      "policyOwners": [
        {
          "approvalUnixTimestamp": 681177600,
          "hasSigned": true,
          "owner": {
            "consumerID": "4309-8d21",
            "email": "[email protected]",
            "fullname": "Bewaarder Developer",
            "id": "648004cc-af60-4bad-bb8b-a779d19770e4"
          }
        }
      ],
      "processedAtUnixTimestamp": 681177600,
      "requiredSignatures": 6,
      "senderWallet": {
        "consumerID": "4997-90a2",
        "consumerLabel": "My Own Ethereum Wallet",
        "creationUnixTimestamp": 681177600,
        "description": "Main",
        "id": "63cbae8c-350b-4997-90a2-a43ce6e40cfe",
        "isArchived": true,
        "lastActionUnixTimestamp": 681177600,
        "policyID": "ff8f2986-325f-44ce-8e38-23e3e0397f9d",
        "policyLedgerID": "btc",
        "policyOwnersEmails": [
          "[email protected]"
        ],
        "policyQuota": "1500045238",
        "publicID": "0071-0004840"
      },
      "smartContractOperation": {
        "behaviourOperation": {
          "behaviour": "erc20-light",
          "events": [
            {
              "key": "Transfer",
              "parameters": {}
            }
          ],
          "isFailed": false,
          "method": "transfer",
          "parameters": {},
          "smartContract": {
            "activationTimestamp": 681177600,
            "behaviours": [
              {
                "behaviourID": "erc20-light",
                "metadata": {}
              }
            ],
            "consumerID": "C_349822",
            "id": "0e5cf704-6d59-437c-aefb-569459502322",
            "ledgerID": "eth",
            "ledgerUniqueID": 1.0549022996915278e+48,
            "name": "The new Smart Contract !"
          }
        },
        "genericOperation": {
          "isFailed": false,
          "method": "burn",
          "parameters": [
            {
              "key": "_value",
              "type": "uint256",
              "value": "123"
            }
          ],
          "smartContract": {
            "activationTimestamp": 681177600,
            "behaviours": [
              {
                "behaviourID": "erc20-light",
                "metadata": {}
              }
            ],
            "consumerID": "C_349822",
            "id": "0e5cf704-6d59-437c-aefb-569459502322",
            "ledgerID": "eth",
            "ledgerUniqueID": 1.0549022996915278e+48,
            "name": "The new Smart Contract !"
          }
        }
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
count integer(int32) false none none
items [orderInformation] false none none

orderInformation

{
  "broadcastUnixTimestamp": 681177600,
  "cancellationUnixTimestamp": 681177600,
  "confirmationUnixTimestamp": 681177600,
  "consumerID": "48c7-b9c7",
  "creationUnixTimestamp": 681177600,
  "creatorID": "c53df56e-ac4b-456b-bc3a-bb6185953d82",
  "currentSignatures": 3,
  "description": "To Cold wallet",
  "earliestProcessUnixTimestamp": 681177600,
  "failureCode": "001",
  "fee": "454981",
  "feeRate": "4",
  "feeTypeID": "high",
  "id": "648004cc-af60-4bad-bb8b-a779d19770e4",
  "inputs": [
    {
      "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
      "amount": "1345",
      "inputType": "ledger",
      "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
      "ledgerIndex": 0,
      "source": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124-0"
    }
  ],
  "isBroadcast": false,
  "isCanceled": false,
  "isConfirmed": false,
  "isFailed": true,
  "isProcessed": false,
  "isScheduled": true,
  "lastActionUnixTimestamp": 681177600,
  "ledgerID": "btc",
  "ledgerTransactionID": "80319390b80afb2fb8b6b94fbcc14b96103849ce717370c69cc8c5b703a17124",
  "outputs": [
    {
      "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
      "amount": "1345",
      "isChange": false,
      "isLocked": false,
      "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
      "ledgerIndex": 0,
      "outputType": "ledger",
      "recipientWallet": {
        "consumerID": "4997-90a2",
        "consumerLabel": "My Own Ethereum Wallet",
        "description": "Main",
        "id": "63cbae8c-350b-4997-90a2-a43ce6e40cfe",
        "publicID": "0071-0004840"
      },
      "sentAmount": "1345",
      "subtractFee": false
    }
  ],
  "policyApprovers": [
    {
      "approvalUnixTimestamp": 681177600,
      "hasSigned": true,
      "user": {
        "consumerID": "4309-8d21",
        "email": "[email protected]",
        "fullname": "Bewaarder Developer",
        "id": "0593c593-a68b-4e74-a16b-933b87a823e3"
      }
    }
  ],
  "policyOwners": [
    {
      "approvalUnixTimestamp": 681177600,
      "hasSigned": true,
      "owner": {
        "consumerID": "4309-8d21",
        "email": "[email protected]",
        "fullname": "Bewaarder Developer",
        "id": "648004cc-af60-4bad-bb8b-a779d19770e4"
      }
    }
  ],
  "processedAtUnixTimestamp": 681177600,
  "requiredSignatures": 6,
  "senderWallet": {
    "consumerID": "4997-90a2",
    "consumerLabel": "My Own Ethereum Wallet",
    "creationUnixTimestamp": 681177600,
    "description": "Main",
    "id": "63cbae8c-350b-4997-90a2-a43ce6e40cfe",
    "isArchived": true,
    "lastActionUnixTimestamp": 681177600,
    "policyID": "ff8f2986-325f-44ce-8e38-23e3e0397f9d",
    "policyLedgerID": "btc",
    "policyOwnersEmails": [
      "[email protected]"
    ],
    "policyQuota": "1500045238",
    "publicID": "0071-0004840"
  },
  "smartContractOperation": {
    "behaviourOperation": {
      "behaviour": "erc20-light",
      "events": [
        {
          "key": "Transfer",
          "parameters": {}
        }
      ],
      "isFailed": false,
      "method": "transfer",
      "parameters": {},
      "smartContract": {
        "activationTimestamp": 681177600,
        "behaviours": [
          {
            "behaviourID": "erc20-light",
            "metadata": {}
          }
        ],
        "consumerID": "C_349822",
        "id": "0e5cf704-6d59-437c-aefb-569459502322",
        "ledgerID": "eth",
        "ledgerUniqueID": 1.0549022996915278e+48,
        "name": "The new Smart Contract !"
      }
    },
    "genericOperation": {
      "isFailed": false,
      "method": "burn",
      "parameters": [
        {
          "key": "_value",
          "type": "uint256",
          "value": "123"
        }
      ],
      "smartContract": {
        "activationTimestamp": 681177600,
        "behaviours": [
          {
            "behaviourID": "erc20-light",
            "metadata": {}
          }
        ],
        "consumerID": "C_349822",
        "id": "0e5cf704-6d59-437c-aefb-569459502322",
        "ledgerID": "eth",
        "ledgerUniqueID": 1.0549022996915278e+48,
        "name": "The new Smart Contract !"
      }
    }
  }
}

Properties

Name Type Required Restrictions Description
broadcastUnixTimestamp integer(int64) false none none
cancellationUnixTimestamp integer(int64) false none none
confirmationUnixTimestamp integer(int64) false none none
consumerID string false none Defined if the entity was created with a consumerID
creationUnixTimestamp integer(int64) true none none
creatorID string false none none
currentSignatures integer(int32) false none Number of approvers that had signed so far
description string true none none
earliestProcessUnixTimestamp integer(int64) false none none
failureCode string true none none
fee string false none none
feeRate string false none none
feeTypeID string false none none
id string true none Bewaarder generated id
inputs [inputInformation] true none none

orderOwnerInformation

{
  "approvalUnixTimestamp": 681177600,
  "hasSigned": true,
  "owner": {
    "consumerID": "4309-8d21",
    "email": "[email protected]",
    "fullname": "Bewaarder Developer",
    "id": "648004cc-af60-4bad-bb8b-a779d19770e4"
  }
}

Properties

Name Type Required Restrictions Description
approvalUnixTimestamp integer(int64) false none none
hasSigned boolean true none The order has been signed by the owner

orderRecipient

{
  "amount": "1252850000",
  "recipientID": "0001-0004829",
  "recipientIDType": "ledger",
  "subtractFee": false
}

Properties

Name Type Required Restrictions Description
amount string true none none
recipientID string true none none
recipientIDType string false none none
subtractFee boolean true none none

Enumerated Values

Property Value
recipientIDType ledger
recipientIDType public
recipientIDType internal
recipientIDType consumer

outgoingOrderApprovalFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "approverID": "string",
  "failureReason": "LS_ORDER_ALREADY_APPROVED_BY_OWNER",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order approval failed event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderApprovedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "approverID": "string",
  "currentSignatures": 0,
  "id": "string",
  "ledgerID": "string",
  "requiredSignatures": 0
}

Outgoing order approved event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderCancellationFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_ORDER_ALREADY_CANCELED",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order cancellation failed event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderCancelledEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order cancelled event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderConfirmedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order confirmed

Properties

allOf - discriminator: event.eventType

and

outgoingOrderCreatedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "description": "string",
  "feeRate": "3",
  "feeTypeID": "high",
  "fromWalletID": "string",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderCreationFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "description": "string",
  "failureReason": "LS_CONSUMER_ID_ALREADY_USED",
  "feeRate": "3",
  "feeTypeID": "high",
  "fromWalletID": "string",
  "ledgerID": "string"
}

Outgoing order creation failed event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "EXPIRED",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order failed

Properties

allOf - discriminator: event.eventType

and

outgoingOrderProcessedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "ledgerID": "string",
  "ledgerTransactionID": "string"
}

Outgoing order processed event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderProcessingFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_INTERNAL_ERROR",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order processing failed event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderScheduledEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "ledgerID": "string",
  "scheduledForUnixTimestamp": 0
}

Outgoing order scheduled event

Properties

allOf - discriminator: event.eventType

and

outgoingOrderSchedulingFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_INTERNAL_ERROR",
  "id": "string",
  "ledgerID": "string"
}

Outgoing order scheduled failed event

Properties

allOf - discriminator: event.eventType

and

outputInformation

{
  "address": "3NP1jLzHkMEycmM1xuNtKT2NEJWZoyNomk",
  "amount": "1345",
  "isChange": false,
  "isLocked": false,
  "ledgerData": "404371705fa9bd789a2fcd52d2c580b65d35549d",
  "ledgerIndex": 0,
  "outputType": "ledger",
  "recipientWallet": {
    "consumerID": "4997-90a2",
    "consumerLabel": "My Own Ethereum Wallet",
    "description": "Main",
    "id": "63cbae8c-350b-4997-90a2-a43ce6e40cfe",
    "publicID": "0071-0004840"
  },
  "sentAmount": "1345",
  "subtractFee": false
}

Properties

Name Type Required Restrictions Description
address string false none none
amount string false none Amount requested through the create order API
isChange boolean true none Is this output the change returned to the sender wallet after a transaction
isLocked boolean true none Is this output's funds locked
ledgerData string false none none
ledgerIndex integer false none Index of the output in the transaction based on ledger information (might be null for some ledgers and pre-3.0 orders)
outputType string true none none

Enumerated Values

Property Value
outputType ledger
outputType smartcontract

ownerEssentialInformation

{
  "consumerID": "4309-8d21",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "id": "648004cc-af60-4bad-bb8b-a779d19770e4"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
email string true none none
fullname string true none none
id string false none none

ownerInformationLight

{
  "consumerID": "4309-8d21",
  "creationUnixTimestamp": 681177600,
  "description": "Jejejej account",
  "email": "[email protected]",
  "fullname": "Jejej dodo",
  "id": "252b3a8e-1b60-47db-9dd6-bc6812829b36",
  "isLocked": false,
  "lastActionUnixTimestamp": 681177600
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
creationUnixTimestamp integer(int64) true none none
description string true none none
email string true none none
fullname string true none none
id string true none none
isLocked boolean true none none
lastActionUnixTimestamp integer(int64) true none none

policyArchiveStatusChangeFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_POLICY_ALREADY_ARCHIVED",
  "id": "string",
  "requestedArchiveStatus": true
}

Policy archive status failed to change event

Properties

allOf - discriminator: event.eventType

and

policyArchiveStatusChangedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "isArchived": true
}

Policy archive status changed

Properties

allOf - discriminator: event.eventType

and

policyAuditorsChangeFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_INTERNAL_ERROR",
  "id": "string",
  "requestedAuditorsIDs": [
    "string"
  ]
}

Failed to change the auditors for a policy

Properties

allOf - discriminator: event.eventType

and

policyAuditorsChangedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "requestedAuditorsIDs": [
    "string"
  ]
}

Changed the auditors for a policy

Properties

allOf - discriminator: event.eventType

and

policyCollection

{
  "count": 1,
  "items": [
    {
      "consumerID": "4997-90a2",
      "createdBy": "89226c07-36ad-4970-99ed-eca1ba4c70e3",
      "creationUnixTimestamp": 681177600,
      "description": "Main",
      "id": "eeff6a2b-1402-47a2-9680-01b0f054fde9",
      "isArchived": false,
      "isAutoLockingEnabled": false,
      "isLedgerEnforced": false,
      "isLocked": false,
      "isMutable": true,
      "lastActionUnixTimestamp": 681177600,
      "ledgerID": "btc",
      "publicID": "81.0",
      "quota": "15445238",
      "quotaPeriodSeconds": 3600,
      "securitySchemeID": "one-by-one",
      "timeLockSeconds": 7200,
      "userPermissions": [
        {
          "approveOrder": true,
          "createOrder": true,
          "readAll": true,
          "userID": "bc9480ec-c77a-4e03-a3cd-fec22c642f13"
        }
      ]
    }
  ]
}

Properties

Name Type Required Restrictions Description
count integer(int32) false none none
items [policyInformation] false none none

policyCreatedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "auditorsIDs": [
    "string"
  ],
  "consumerID": "string",
  "description": "string",
  "id": "string",
  "isAutoLockingEnabled": true,
  "isLedgerEnforced": true,
  "isMutable": true,
  "ledgerID": "btc",
  "ownersIDs": [
    "string"
  ],
  "publicID": "string",
  "quota": "string",
  "quotaPeriodSeconds": 0,
  "securitySchemeID": "string",
  "timeLockSeconds": 0,
  "userPermissions": [
    {
      "approveOrder": true,
      "createOrder": true,
      "readAll": true,
      "userID": "bc9480ec-c77a-4e03-a3cd-fec22c642f13"
    }
  ]
}

Policy created event

Properties

allOf - discriminator: event.eventType

and

policyCreationFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "auditorsIDs": [
    "string"
  ],
  "consumerID": "string",
  "description": "string",
  "failureReason": "LS_CONSUMER_ID_ALREADY_USED",
  "isAutoLockingEnabled": true,
  "isLedgerEnforced": true,
  "isMutable": true,
  "ledgerID": "btc",
  "ownersIDs": [
    "string"
  ],
  "quota": "string",
  "quotaPeriodSeconds": 0,
  "securitySchemeID": "string",
  "timeLockSeconds": 0,
  "userPermissions": [
    {
      "approveOrder": true,
      "createOrder": true,
      "readAll": true,
      "userID": "bc9480ec-c77a-4e03-a3cd-fec22c642f13"
    }
  ]
}

Policy creation failed event

Properties

allOf - discriminator: event.eventType

and

policyInformation

{
  "consumerID": "4997-90a2",
  "createdBy": "89226c07-36ad-4970-99ed-eca1ba4c70e3",
  "creationUnixTimestamp": 681177600,
  "description": "Main",
  "id": "eeff6a2b-1402-47a2-9680-01b0f054fde9",
  "isArchived": false,
  "isAutoLockingEnabled": false,
  "isLedgerEnforced": false,
  "isLocked": false,
  "isMutable": true,
  "lastActionUnixTimestamp": 681177600,
  "ledgerID": "btc",
  "publicID": "81.0",
  "quota": "15445238",
  "quotaPeriodSeconds": 3600,
  "securitySchemeID": "one-by-one",
  "timeLockSeconds": 7200,
  "userPermissions": [
    {
      "approveOrder": true,
      "createOrder": true,
      "readAll": true,
      "userID": "bc9480ec-c77a-4e03-a3cd-fec22c642f13"
    }
  ]
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
createdBy string true none Administrator's Bewaarder ID creator of the policy
creationUnixTimestamp integer(int64) true none none
description string true none none
id string true none Bewaarder generated id
isArchived boolean true none none
isAutoLockingEnabled boolean true none Funds autolocking activation status
isLedgerEnforced boolean true none Approver's signatures are backed by the ledger or by Bewaarder.
isLocked boolean true none none
isMutable boolean true none none
lastActionUnixTimestamp integer(int64) true none none
ledgerID string true none none
publicID string true none Defined by Bewaarder at creation time. Four hexadecimal characters
quota string true none none
quotaPeriodSeconds integer true none none
securitySchemeID string true none none
timeLockSeconds integer true none none
userPermissions [policyUserPermissions] true none none

policyLockChangeFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_CONSUMER_ID_ALREADY_USED",
  "id": "string",
  "requestedLock": true
}

Policy lock change failed event

Properties

allOf - discriminator: event.eventType

and

policyLockChangedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "policyLocked": true
}

Policy lock changed event

Properties

allOf - discriminator: event.eventType

and

policyUpdateFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_INVALID_QUOTA",
  "id": "string",
  "requestedQuota": "string",
  "requestedQuotaPeriodSeconds": 0,
  "requestedTimeLockSeconds": 0
}

Policy update failed event

Properties

allOf - discriminator: event.eventType

and

policyUpdatedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "requestedQuota": "string",
  "requestedQuotaPeriodSeconds": 0,
  "requestedTimeLockSeconds": 0
}

Policy updated event

Properties

allOf - discriminator: event.eventType

and

policyUserPermissions

{
  "approveOrder": true,
  "createOrder": true,
  "readAll": true,
  "userID": "bc9480ec-c77a-4e03-a3cd-fec22c642f13"
}

Properties

Name Type Required Restrictions Description
approveOrder boolean true none Gives permission for the user to approve already created orders
createOrder boolean true none Gives permission for the user to create orders (separate a permission is required for approval)
readAll boolean true none Gives permission for the user to view all policy information, including user permissions, orders and balance
userID string true none ID of the user

queryBehaviourSmartContractRequestBody

{
  "method": "balanceOf",
  "parameters": {
    "address": 1.8832960756721966e+47
  },
  "senderWalletID": "260a5f42-6ea1-47e0-9f68-85b85c19c7a9"
}

Query execution with the smartContract's behaviour abstraction

Properties

Name Type Required Restrictions Description
method string false none none
parameters object true none Structure depends on method and behaviour
senderWalletID string true none none

queryGenericSmartContractOperationResultEntry

{
  "key": "balance",
  "type": "uint256",
  "value": "19"
}

Query execution with a low level definition of method and parameters

Properties

Name Type Required Restrictions Description
key string true none none
type string true none none
value string true none none

queryGenericSmartContractRequestBody

{
  "expectedResults": [
    {
      "key": "balance",
      "type": "unit256"
    }
  ],
  "method": "balanceOf",
  "parameters": [
    {
      "key": "_value",
      "type": "uint256",
      "value": "123"
    }
  ],
  "senderWalletID": "85bafb66-862e-42e0-8596-fb1762d4f0a7"
}

Properties

Name Type Required Restrictions Description
expectedResults [querySmartContractExpectedResultEntry] true none none

querySmartContractExpectedResultEntry

{
  "key": "balance",
  "type": "unit256"
}

Properties

Name Type Required Restrictions Description
key string true none none
type string true none none

rawTransaction

{
  "fee": "string",
  "fundingPolicyID": 0,
  "fundingWalletDescription": "string",
  "fundingWalletID": 0,
  "hashesData": [
    {
      "hash": "string",
      "signingExtPubKeyDerivationScheme": "string"
    }
  ],
  "ledgerID": "string",
  "ledgerSpecificData": {},
  "recipients": [
    {
      "amount": "10",
      "description": "walletDescription",
      "type": "wallet"
    }
  ],
  "signature": "string",
  "signatureVersion": 0
}

raw transaction

Properties

Name Type Required Restrictions Description
fee string true none none
fundingPolicyID number(int32) true none none
fundingWalletDescription string true none none
fundingWalletID number(int32) true none none
hashesData [signatureHashData] true none none

rawTransactionRecipient

{
  "amount": "10",
  "description": "walletDescription",
  "type": "wallet"
}

raw transaction

Properties

Name Type Required Restrictions Description
amount string true none none
description string true none none
type string true none none

Enumerated Values

Property Value
type wallet
type address

requestIDsCollection

{
  "requestIDs": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
requestIDs [string] false none none

signatureHashData

{
  "hash": "string",
  "signingExtPubKeyDerivationScheme": "string"
}

Properties

Name Type Required Restrictions Description
hash string true none Hashes to be signed by the approver's UCA
signingExtPubKeyDerivationScheme string true none Metadata required to sign with the right key

smartContractBalance

{
  "behaviour": {
    "behaviourID": "erc20-light",
    "metadata": {}
  },
  "ledgerID": "eth",
  "name": "Metacoken",
  "smartContractID": "8e55475a-ef9b-4bf3-ac19-a052bbb79f04",
  "spendableBalance": "905544800",
  "totalBalance": "95544800"
}

Properties

None

smartContractBehaviour

{
  "behaviourID": "erc20-light",
  "metadata": {}
}

Properties

Name Type Required Restrictions Description
behaviourID string true none none
metadata object false none none

smartContractCollection

{
  "count": 1,
  "items": [
    {
      "activationTimestamp": 681177600,
      "behaviours": [
        {
          "behaviourID": "erc20-light",
          "metadata": {}
        }
      ],
      "consumerID": "C_349822",
      "id": "0e5cf704-6d59-437c-aefb-569459502322",
      "ledgerID": "eth",
      "ledgerUniqueID": 1.0549022996915278e+48,
      "name": "The new Smart Contract !"
    }
  ]
}

Properties

Name Type Required Restrictions Description
count integer(int32) false none none
items [smartContractInformation] false none none

smartContractEnableFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "behaviours": [
    "string"
  ],
  "consumerID": "string",
  "failureReason": "LS_CONSUMER_ID_ALREADY_USED",
  "ledgerID": "string",
  "ledgerUniqueID": "string",
  "name": "string"
}

Smart contract enable failed event

Properties

allOf - discriminator: event.eventType

and

smartContractEnabledEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "behaviours": [
    "string"
  ],
  "consumerID": "string",
  "id": "string",
  "ledgerID": "string",
  "ledgerUniqueID": "string",
  "name": "string"
}

Smart contract enabled

Properties

allOf - discriminator: event.eventType

and

smartContractInformation

{
  "activationTimestamp": 681177600,
  "behaviours": [
    {
      "behaviourID": "erc20-light",
      "metadata": {}
    }
  ],
  "consumerID": "C_349822",
  "id": "0e5cf704-6d59-437c-aefb-569459502322",
  "ledgerID": "eth",
  "ledgerUniqueID": 1.0549022996915278e+48,
  "name": "The new Smart Contract !"
}

Properties

Name Type Required Restrictions Description
activationTimestamp integer(int64) true none Smartcontract's enabling time
behaviours [smartContractBehaviour] true none List of Bewaarder's behaviours the smartcontract suppports

smartContractOperationInformation

{
  "behaviourOperation": {
    "behaviour": "erc20-light",
    "events": [
      {
        "key": "Transfer",
        "parameters": {}
      }
    ],
    "isFailed": false,
    "method": "transfer",
    "parameters": {},
    "smartContract": {
      "activationTimestamp": 681177600,
      "behaviours": [
        {
          "behaviourID": "erc20-light",
          "metadata": {}
        }
      ],
      "consumerID": "C_349822",
      "id": "0e5cf704-6d59-437c-aefb-569459502322",
      "ledgerID": "eth",
      "ledgerUniqueID": 1.0549022996915278e+48,
      "name": "The new Smart Contract !"
    }
  },
  "genericOperation": {
    "isFailed": false,
    "method": "burn",
    "parameters": [
      {
        "key": "_value",
        "type": "uint256",
        "value": "123"
      }
    ],
    "smartContract": {
      "activationTimestamp": 681177600,
      "behaviours": [
        {
          "behaviourID": "erc20-light",
          "metadata": {}
        }
      ],
      "consumerID": "C_349822",
      "id": "0e5cf704-6d59-437c-aefb-569459502322",
      "ledgerID": "eth",
      "ledgerUniqueID": 1.0549022996915278e+48,
      "name": "The new Smart Contract !"
    }
  }
}

Properties

None

smartContractOperationParametersMapEntry

{
  "key": "_value",
  "type": "uint256",
  "value": "123"
}

Properties

Name Type Required Restrictions Description
key string true none none
type string true none none
value string true none none

transactionSignatures

{
  "signatures": [
    {
      "key": "6e8b280d3b1ab06081bca768876431f9d0f25d2d",
      "value": "5221032180d7978111e7876d0b6d1f8fbd9bed9f8ab7fcfb53f07c360b80494e8c97dc21032663d325850776fd6149ffd13c4f710f612bde3f70fc1dd886b9cf24282733482103d7c0ca738a509a3508bf726619dff3d61a5f8a14d1702f32c5df2bfaef398e8f53ae"
    }
  ]
}

Properties

Name Type Required Restrictions Description
signatures [approvalKeyValuePayload] true none none

updateArchiveStateRequest

{
  "archive": false
}

Properties

Name Type Required Restrictions Description
archive boolean true none none

updateLockStatusRequest

{
  "locked": true
}

Properties

Name Type Required Restrictions Description
locked boolean true none none

updateOrderStatusRequest

{
  "action": "cancel"
}

Properties

Name Type Required Restrictions Description
action string false none Action to be applied on the order

Enumerated Values

Property Value
action cancel
action unlock

updatePolicyRequest

{
  "quota": "15445238",
  "quotaPeriodSeconds": 86400,
  "timeLockSeconds": 3600
}

Properties

Name Type Required Restrictions Description
quota string true none none
quotaPeriodSeconds integer(int32) true none Period in seconds where the executed transactions will be accounted against the defined quota
timeLockSeconds integer(int32) true none Time in seconds during which the transactions will be held before HS signature and broadcast

updateUserInformationRequest

{
  "password": "098f6bcd4621d373cade4e832627b4f6"
}

Properties

Name Type Required Restrictions Description
password string true none New password to set

userCollection

{
  "count": 1,
  "items": [
    {
      "consumerID": "48c7-b9c7",
      "createdBy": "myself",
      "creationUnixTimestamp": 681177600,
      "description": "Bewaarder Developer admin",
      "email": "[email protected]",
      "fullname": "Bewaarder Developer",
      "hasPublicKey": true,
      "id": "203036f0-29fc-4290-ab6b-6130e15bb53e",
      "isLocked": true,
      "lastActionUnixTimestamp": 681177600,
      "publicKey": "true",
      "userRoleID": "admin"
    }
  ]
}

Properties

Name Type Required Restrictions Description
count integer(int32) false none none
items [userInformation] false none none

userCreatedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "emailAddress": "string",
  "fullName": "string",
  "hasPublicKey": true,
  "id": "string"
}

User created event

Properties

allOf - discriminator: event.eventType

and

userCreationFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "emailAddress": "string",
  "failureReason": "LS_CONSUMER_ID_ALREADY_USED",
  "fullName": "string",
  "hasPublicKey": true
}

User creation failed event

Properties

allOf - discriminator: event.eventType

and

userEssentialInformation

{
  "consumerID": "4309-8d21",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "id": "0593c593-a68b-4e74-a16b-933b87a823e3"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
email string true none none
fullname string true none none
id string false none none

userInformation

{
  "consumerID": "48c7-b9c7",
  "createdBy": "myself",
  "creationUnixTimestamp": 681177600,
  "description": "Bewaarder Developer admin",
  "email": "[email protected]",
  "fullname": "Bewaarder Developer",
  "hasPublicKey": true,
  "id": "203036f0-29fc-4290-ab6b-6130e15bb53e",
  "isLocked": true,
  "lastActionUnixTimestamp": 681177600,
  "publicKey": "true",
  "userRoleID": "admin"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
createdBy string true none none
creationUnixTimestamp integer(int64) true none none
description string true none none
email string true none none
fullname string true none none
hasPublicKey boolean true none none
id string true none Bewaarder generated ID
isLocked boolean true none none
lastActionUnixTimestamp integer(int64) true none none
publicKey string false none Defined if the entity has a publick key and was created after the 3.0.0 version
userRoleID string true none none

userLockChangeFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_INTERNAL_ERROR",
  "id": "string",
  "requestedLock": true
}

User lock change failed event

Properties

allOf - discriminator: event.eventType

and

userLockChangedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "userLocked": true
}

User lock changed event

Properties

allOf - discriminator: event.eventType

and

userPasswordChangeFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_INTERNAL_ERROR",
  "id": "string"
}

User password change failed event

Properties

allOf - discriminator: event.eventType

and

userPasswordChangedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string"
}

User password changed event

Properties

allOf - discriminator: event.eventType

and

walletArchiveStatusChangeFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "failureReason": "LS_CONSUMER_ID_ALREADY_USED",
  "id": "string",
  "requestedArchiveStatus": true
}

Wallet archive status failed to change event

Properties

allOf - discriminator: event.eventType

and

walletArchiveStatusChangedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string",
  "isArchived": true
}

Wallet archive status changed

Properties

allOf - discriminator: event.eventType

and

walletBalanceUpdatedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "id": "string"
}

Wallet's balance update requested

Properties

allOf - discriminator: event.eventType

and

walletCollection

{
  "count": 1,
  "items": [
    {
      "consumerID": "4997-90a2",
      "consumerLabel": "My Own Ethereum Wallet",
      "createdBy": "89226c07-36ad-4970-99ed-eca1ba4c70e3",
      "creationUnixTimestamp": 681177600,
      "description": "Main",
      "hasOpenOrders": true,
      "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
      "isArchived": true,
      "lastActionUnixTimestamp": 681177600,
      "policy": {
        "consumerID": "4997-90a2",
        "createdBy": "89226c07-36ad-4970-99ed-eca1ba4c70e3",
        "creationUnixTimestamp": 681177600,
        "description": "Main",
        "id": "eeff6a2b-1402-47a2-9680-01b0f054fde9",
        "isArchived": false,
        "isAutoLockingEnabled": false,
        "isLedgerEnforced": false,
        "isLocked": false,
        "isMutable": true,
        "lastActionUnixTimestamp": 681177600,
        "ledgerID": "btc",
        "publicID": "81.0",
        "quota": "15445238",
        "quotaPeriodSeconds": 3600,
        "securitySchemeID": "one-by-one",
        "timeLockSeconds": 7200,
        "userPermissions": [
          {
            "approveOrder": true,
            "createOrder": true,
            "readAll": true,
            "userID": "bc9480ec-c77a-4e03-a3cd-fec22c642f13"
          }
        ]
      },
      "publicID": "0001-0000029",
      "smartContractBalances": [
        {
          "behaviour": {
            "behaviourID": "erc20-light",
            "metadata": {}
          },
          "ledgerID": "eth",
          "name": "Metacoken",
          "smartContractID": "8e55475a-ef9b-4bf3-ac19-a052bbb79f04",
          "spendableBalance": "905544800",
          "totalBalance": "95544800"
        }
      ],
      "spendableBalance": "4200",
      "totalBalance": "100"
    }
  ]
}

Properties

Name Type Required Restrictions Description
count integer(int32) false none none
items [walletInformation] false none none

walletCreatedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "consumerLabel": "string",
  "description": "string",
  "id": "string",
  "policyID": "string",
  "publicID": "string"
}

Wallet created event

Properties

allOf - discriminator: event.eventType

and

walletCreationFailedEvent

{
  "eventType": "string",
  "requestID": "string",
  "savedAtTimestamp": 1564790400,
  "sequenceOffset": 0,
  "triggeredAtTimestamp": 681177600,
  "triggeredByUserID": "bd007b81-f9dc-4b36-933c-9d5284ad751b",
  "consumerID": "string",
  "consumerLabel": "string",
  "description": "string",
  "failureReason": "LS_CONSUMER_ID_ALREADY_USED",
  "policyID": "string"
}

Wallet creation failed event

Properties

allOf - discriminator: event.eventType

and

walletEssentialInformation

{
  "consumerID": "4997-90a2",
  "consumerLabel": "My Own Ethereum Wallet",
  "creationUnixTimestamp": 681177600,
  "description": "Main",
  "id": "63cbae8c-350b-4997-90a2-a43ce6e40cfe",
  "isArchived": true,
  "lastActionUnixTimestamp": 681177600,
  "policyID": "ff8f2986-325f-44ce-8e38-23e3e0397f9d",
  "policyLedgerID": "btc",
  "policyOwnersEmails": [
    "[email protected]"
  ],
  "policyQuota": "1500045238",
  "publicID": "0071-0004840"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
consumerLabel string false none This is the name of the wallet was created with a consumerID
creationUnixTimestamp integer(int64) true none none
description string true none none
id string true none Bewaarder generated id
isArchived boolean true none none
lastActionUnixTimestamp integer(int64) true none none
policyID string true none none
policyLedgerID string true none none
policyOwnersEmails [string] true none none
policyQuota string true none none
publicID string true none Four hexadecimal chars (policy's publicID) and seven hexadecimal chars provided by Bewaarder at creation time, separated by hyphen

walletInformation

{
  "consumerID": "4997-90a2",
  "consumerLabel": "My Own Ethereum Wallet",
  "createdBy": "89226c07-36ad-4970-99ed-eca1ba4c70e3",
  "creationUnixTimestamp": 681177600,
  "description": "Main",
  "hasOpenOrders": true,
  "id": "051e49a9-b6ba-4174-ad57-2d5501390516",
  "isArchived": true,
  "lastActionUnixTimestamp": 681177600,
  "policy": {
    "consumerID": "4997-90a2",
    "createdBy": "89226c07-36ad-4970-99ed-eca1ba4c70e3",
    "creationUnixTimestamp": 681177600,
    "description": "Main",
    "id": "eeff6a2b-1402-47a2-9680-01b0f054fde9",
    "isArchived": false,
    "isAutoLockingEnabled": false,
    "isLedgerEnforced": false,
    "isLocked": false,
    "isMutable": true,
    "lastActionUnixTimestamp": 681177600,
    "ledgerID": "btc",
    "publicID": "81.0",
    "quota": "15445238",
    "quotaPeriodSeconds": 3600,
    "securitySchemeID": "one-by-one",
    "timeLockSeconds": 7200,
    "userPermissions": [
      {
        "approveOrder": true,
        "createOrder": true,
        "readAll": true,
        "userID": "bc9480ec-c77a-4e03-a3cd-fec22c642f13"
      }
    ]
  },
  "publicID": "0001-0000029",
  "smartContractBalances": [
    {
      "behaviour": {
        "behaviourID": "erc20-light",
        "metadata": {}
      },
      "ledgerID": "eth",
      "name": "Metacoken",
      "smartContractID": "8e55475a-ef9b-4bf3-ac19-a052bbb79f04",
      "spendableBalance": "905544800",
      "totalBalance": "95544800"
    }
  ],
  "spendableBalance": "4200",
  "totalBalance": "100"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
consumerLabel string false none This is the name of the wallet was created with a consumerID
createdBy string true none Administrator's Bewaarder ID creator of the wallet
creationUnixTimestamp integer(int64) true none none
description string true none none
hasOpenOrders boolean true none none
id string true none Bewaarder generated id
isArchived boolean true none none
lastActionUnixTimestamp integer(int64) true none none

walletSummary

{
  "consumerID": "4997-90a2",
  "consumerLabel": "My Own Ethereum Wallet",
  "description": "Main",
  "id": "63cbae8c-350b-4997-90a2-a43ce6e40cfe",
  "publicID": "0071-0004840"
}

Properties

Name Type Required Restrictions Description
consumerID string false none Defined if the entity was created with a consumerID
consumerLabel string true none This is the name of the wallet was created with a consumerID
description string true none none
id string true none none
publicID string true none Four hexadecimal chars (policy's publicID) and seven hexadecimal chars provided by Bewaarder at creation time, separated by hyphen

xrpMemo

{
  "data": "string",
  "format": "string",
  "type": "string"
}

Properties

Name Type Required Restrictions Description
data string true none none
format string true none none
type string true none none

ledger

{
  "ledgerID": "e33bfbf6-0eab-4509-8cf6-cf99e20c365c",
  "itin": "TP3B-248N-Q",
  "symbol": "ETH",
  "name": "Ethereum",
  "description": "Ethereum is a global, decentralized platform for money and new kinds of applications."
}

ledger

Properties

Name Type Required Restrictions Description
ledgerID string true none none
itin string false none none
symbol string true none none
name string true none none
description string true none none