1.2 KiB
1.2 KiB
API EXTENSIONS FOR INDEPENDENT TRANSFER ACCOUNTS
At time of writing, apis are registered under /api/v2
. This will change.
NOMENCLATURE
Values enclosed with <>
are required.
Values enclosed with []
means optional.
No enclosure means literal.
ADDED METHODS
Endpoints added are found under /api/ext/
/api/ext/transfer_account/register/
POST
Create a new transfer_account bound to an organisation.
Request payload:
{
address: <address>,
organisation_id: <uint>,
}
Response payload on success:
{
message: 'Created',
data: {
id: <uint>
},
}
id
is the id of the newly created transfer account
Returns:
201 - transfer account is added
400 - address or organisation data invalid
404 - organisation not found
/api/ext/user/
POST
Add a new user without transfer account. The user will be associated with the organisation in the API session context.
Request payload:
{
phone: <string>,
first_name: <string>,
last_name: <string>,
}
Response payload on success:
{
data: {
id: <uint>
},
}
id
is the id of the newly created user.
Returns:
201 - user created
400 - organisation context missing