Page: CTP generation
v.2 by Sergey Chernov
2019-07-27 17:07
2019-07-27 17:07
Template generation
POST <base_url>/<template_id>
with JSON body of the following format:
{
lender:"<universa_address>",
borrower: "<universa_address>",
// and all non-optional fields and some optional fields as key-value pairs
}
The anseer in the case of errors:
{
status: 'error',
errors: [
{
id: "lender",
text: "invalid addres",
details: "entered data is not a valid universa address"
}, //...
]
}
In the case of success:
{
status: "OK",
transactionPack64: "<base64 encoded binary>",
requiredSignatures: "lender,debtor", // field names from template
description: "the contract should be signed by both parties and registered with Universa, then debtor will be able to use lent asset"
}