4. External User (Customer)
Working with customers you have the following features:
Create customer
To create an external user (customer) you should use the folowing request:
Auth a user
Auth customer
Counterparty GUID
auth user token
POST /api/v1/counterparty/{counterparty_guid}/customers/auth HTTP/1.1
Host: dev-dcm-api.armenotech.dev
X-Auth-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"counterparty_guid": "text",
"login": "text"
}
{
"access_token": "text",
"customer_guid": "text",
"expires_in": 1,
"refresh_token": "text",
"token_type": "text",
"user_guid": "text"
}
Create a user
Create dcm customer
Counterparty GUID
auth user token
optional default 0
optional
CounterpartyGUID application guid from wallet
GUID if guid is zero, generate new random guid if guid exist return error
optional
optional default false
optional default 0
Login unique user name phone\email\other
POST /api/v1/counterparty/{counterparty_guid}/customers/create HTTP/1.1
Host: dev-dcm-api.armenotech.dev
X-Auth-Token: text
Content-Type: application/json
Accept: */*
Content-Length: 223
{
"balance_allowed": 1,
"balance_asset_code": "text",
"balance_asset_issuer": "text",
"branch_name": "text",
"counterparty_guid": "text",
"guid": "text",
"iban": "text",
"is_disabled": true,
"kyc_level": 1,
"login": "text",
"user_token": "text"
}
{
"access_token": "text",
"activated": true,
"assets": [
{
"activated": true,
"balance": 1,
"code": "text",
"minor_unit": 1,
"name": "text",
"platform": "text"
}
],
"assets_total": 1,
"blocked": true,
"customer_guid": "text",
"expires_in": 1,
"guid": "text",
"name": "text",
"platform": "text",
"refresh_token": "text",
"registered": true,
"token_type": "text",
"type": "text",
"user_guid": "text"
}
Update a customer
Update dcm customer
Counterparty GUID
Customer GUID
PUT /api/v1/counterparty/{counterparty_guid}/customers/{customer_guid} HTTP/1.1
Host: dev-dcm-api.armenotech.dev
Content-Type: application/json
Accept: */*
Content-Length: 147
{
"balance_allowed": 1,
"balance_asset_code": "text",
"balance_asset_issuer": "text",
"branch_name": "text",
"iban": "text",
"is_disabled": true,
"kyc_level": 1
}
{}
List users per counterparty
Get dcm customers list with filter
Counterparty GUID
Customer's GUIDs
Counterparty's GUIDs
Customer's logins
Customer's kyc levels
Include disabled
Customer's allowed balance
Customer's allowed balance
Balance's asset code
Balance's asset issuers
Customer's branch names
IBANs
Customer's time of creation
Customer's time of creation
Customer's time of last update
Customer's time of lat update
Offset
Limit
Ordering
GET /api/v1/counterparty/{counterparty_guid}/customers HTTP/1.1
Host: dev-dcm-api.armenotech.dev
Accept: */*
{
"customers": [
{
"balance_allowed": 1,
"balance_asset_code": "text",
"balance_asset_issuer": "text",
"branch_name": "text",
"counterparty_guid": "text",
"created_at": "text",
"iban": "text",
"is_disabled": true,
"kyc_level": 1,
"login": "text",
"updated_at": "text",
"wallet_user_guid": "text"
}
],
"total": 1
}
Show a customer
To show a single user you should do the previuos request and to find the user you need with an appropriate guid.
Last updated