- TranSwap Api v1.8.8
- Access Token
- Accounts
- Contacts
- Conversions
- References
- Transfers
- Wallets
- CallBacks
Create a new Contact
POST
/v1/contacts
Contacts
Last modified:2024-09-11 00:41:03
Maintainer:Not configured
Contact
.Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
The abstract contact view used by `ContactPersonalView` and `ContactBusinessView`
id
string <uuid>
required
type
enum<string>Â
required
personal
or business
Allowed values:
personalbusiness
currency
stringÂ
required
Two-letter ISO 3166-2 country code
country
stringÂ
required
Two-letter ISO 3166-2 country code
display_name
stringÂ
required
category
enum<string>Â
required
sender
, recipient
or all
Allowed values:
recipientsenderall
bank
object (ContactBankAccountDetail)Â
optional
Recipient
.bank_name
string  | nullÂ
optional
bank_address
stringÂ
optional
bank_country
string  | nullÂ
required
Example:
US
bank_account_currency
string  | nullÂ
required
Example:
USD
bank_account_name
stringÂ
required
Example:
John Doe
bank_account_number
stringÂ
required
ts_bank_code
string  | nullÂ
required
swift_bic_code
stringÂ
optional
bank_code
string  | nullÂ
optional
sort_code
string  | nullÂ
optional
iban_code
string  | nullÂ
optional
bsb_code
string  | nullÂ
optional
zengin_code
string  | nullÂ
optional
ifsc_code
string  | nullÂ
optional
cnaps_code
string  | nullÂ
optional
aba_routing_number
string  | nullÂ
optional
ewallet
object (ContactEwalletDetail)Â
optional
Recipient
.ewallet_provider
string  | nullÂ
required
ewallet_account_name
string  | nullÂ
required
ewallet_account_number
string  | nullÂ
required
cash
object (ContactCashPickupDetail)Â
optional
Recipient
.cash_provider
string  | nullÂ
optional
Example
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/contacts' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢201Created
application/json
Body
optional
id
string <uuid>
required
type
enum<string>Â
ContactType
personal
or business
Allowed values:
personalbusiness
currency
stringÂ
required
Two-letter ISO 3166-2 country code
country
stringÂ
required
Two-letter ISO 3166-2 country code
display_name
stringÂ
required
category
enum<string>Â
ContactCategory
sender
, recipient
or all
Allowed values:
recipientsenderall
bank
objectÂ
ContactBankAccountDetail
Recipient
.ewallet
objectÂ
ContactEwalletDetail
Recipient
.cash
objectÂ
ContactCashPickupDetail
Recipient
.personal
objectÂ
ContactPersonal
ContactPersonalView
and ContactPersonalModel
.Examples
{
"id": "7b048f91-0521-4f02-8e45-51eb8658822e",
"type": "personal",
"category": "recipient",
"currency": "VND",
"country": "VN",
"display_name": "VND - Bao Bao Truong",
"personal": {
"first_name": "Bao",
"middle_name": "Bao",
"last_name": "Truong",
"other_name": "",
"gender": "female",
"date_of_birth": null,
"nationality": "VN",
"email": "xxx@test.com",
"mobile_number": "903123456",
"mobile_number_prefix": "+84",
"country_of_birth": null,
"occupation": null,
"industry_category": null,
"industry_sub_category": null,
"identification": {
"id_type": "passport",
"id_number": "AA1234567"
},
"address": {
"line1": "243C Chi Trai, Ward 1, District 3",
"line2": "",
"city": "Hanoi",
"state_or_province": "Hanoi",
"country": "VN",
"postal": "700000"
}
},
"bank": {
"bank_name": "Military Commercial Joint Stock bank (MB)",
"bank_country": "VN",
"bank_account_currency": "VND",
"bank_account_name": "BAO BAO TRUONG",
"bank_account_number": "12341236001",
"ts_bank_code": "TSVN0020",
"swift_bic_code": "",
"bank_code": null,
"sort_code": "",
"iban_code": "",
"bsb_code": "",
"zengin_code": "",
"ifsc_code": null,
"cnaps_code": null,
"aba_routing_number": ""
},
"ewallet": {
"ewallet_provider": null,
"ewallet_account_name": null,
"ewallet_account_number": null
},
"cash": {
"cash_provider": null
}
}
🟠400Bad Request
🟠401Unauthorized
🟠429429
🔴500Server Error
Modified at 2024-09-11 00:41:03