Identities

The following endpoints are used to insert and retrieve entries representing identities from the database.

IDENTITIES ENDPOINTS
IDENTITIES ENDPOINTS
POST /identities
GET /identities/:id
GET /identities
GET /identities/:id/deposits
GET /identities/:id/withdrawals
GET /identities/:id/documents
GET /identities/:id/transfer-methods
GET /identities/:id/verifications
GET /identities/:id/identity-relations

The identity object

The identity object represents the identity of an individual (or company) in the database.

IDENTITIES OBJECT
IDENTITIES OBJECT
{
"id": "5e0e5129-6e39-46c3-b5c3-e9465ac49034",
"identityOwner": null,
"identityType": "person",
"verificationStatus": "pending",
"blocked": false,
"status": "disabled",
"companyOfficer": false,
"name": "Jonh Doe",
"email": "bruno@mailinator.org",
"address": {
"city": "Tampa",
"street": "Ochard Street",
"country": "PT",
"postalCode": "12345"
},
"phone": {
"sms": true,
"number": "345675643"
},
"tax": {
"state": "FL",
"country": "PT",
"idNumber": "134567890"
},
"birthday": "1991-12-01T00:00:00.000Z",
"gender": "Male",
"createdAt": "2020-02-19T11:02:14.456Z",
"updatedAt": "2020-02-19T11:02:14.456Z",
"deletedAt": null
}

post
POST /identities

[ENVIRONMENT HOSTNAME]/identities
This endpoint allows you to add a new identity to the database.
Request
Response
Request
Body Parameters
name
required
string
Name of the identity
identityOwner
optional
string
Id of the identity owner (Only for identities of the type company)
email
required
string
Email associated to the identity
birthday
required
string
Birthday of the identity
gender
required
string
Gender of the identity
address
required
string
Address of the identity
phone
required
string
Phone number associated to the identity
tax
required
string
Tax information associated to the identity
identityType
required
string
Type of the identity
companyOfficer
required
boolean
True if the identity is a company officer
Response
200: OK
Deposit successfully inserted in the database.
{
"id": "5e0e5129-6e39-46c3-b5c3-e9465ac49034",
"identityOwner": null,
"identityType": "person",
"verificationStatus": "pending",
"blocked": false,
"status": "disabled",
"companyOfficer": false,
"name": "John Doe",
"email": "bruno@mailinator.org",
"address": {
"city": "Tampa",
"street": "Ochard Street",
"country": "PT",
"postalCode": "12345"
},
"phone": {
"sms": true,
"number": "345675643"
},
"tax": {
"state": "FL",
"country": "PT",
"idNumber": "134567890"
},
"birthday": "1991-12-01T00:00:00.000Z",
"gender": "Male",
"createdAt": "2020-02-19T11:02:14.456Z",
"updatedAt": "2020-02-19T11:02:14.456Z",
"deletedAt": null
}

Example Call

Request
CURL
Response
Request
POST [ENVIRONMENT HOSTNAME]/identities
{
"name": "Jonh Doe",
"email": "johndoe@gmsail.org",
"companyOfficer": false,
"birthday": "1991-12-01",
"gender": "Male",
"identityType": "person",
"address": {
"street": "Ochard Street",
"postalCode": "12345",
"city": "Tampa",
"country": "US",
"state": "AL"
},
"phone": {
"number": "345675643",
"sms": true
},
"tax": {
"idNumber": "134567890",
"state": "FL",
"country": "US"
}
}
CURL
curl -X POST \
[ENVIRONMENT HOSTNAME]/identities \
-H 'Content-Type: application/json' \
-H 'apikey: {INSERT YOUR API KEY HERE}' \
-d '{
"name": "Jonh Doe",
"email": "johndoe@gmsail.org",
"companyOfficer": false,
"birthday": "1991-12-01",
"gender": "Male",
"identityType": "person",
"address": {
"street": "Ochard Street",
"postalCode": "12345",
"city": "Tampa",
"country": "US",
"state": "AL"
},
"phone": {
"number": "345675643",
"sms": true
},
"tax": {
"idNumber": "134567890",
"state": "FL",
"country": "US"
}
}'
Response
{
"id": "e65dde2c-4379-42c7-a665-3f476cebb691",
"identityOwner": null,
"identityType": "person",
"verificationStatus": "pending",
"blocked": false,
"status": "disabled",
"companyOfficer": false,
"name": "Jonh Doe",
"email": "johndoe@gmsail.org",
"address": {
"city": "Tampa",
"state": "AL",
"street": "Ochard Street",
"country": "US",
"postalCode": "12345"
},
"phone": {
"sms": true,
"number": "345675643"
},
"tax": {
"state": "FL",
"country": "US",
"idNumber": "134567890"
},
"birthday": "1991-12-01T00:00:00.000Z",
"gender": "Male",
"createdAt": "2020-02-19T11:04:59.345Z",
"updatedAt": "2020-02-19T11:04:59.345Z",
"deletedAt": null
}

On the Sandbox environment, you can use the approve KYC endpoint to simulate and approve the identity you created.

get
GET /identities/:id

[ENVIRONMENT HOSTNAME]/identities/:id
This endpoint retrieves and returns an identity owned by you from the database.
Request
Response
Request
Path Parameters
id
required
string
Id of the identity to be retrieved
Response
200: OK
{
"id": "e65dde2c-4379-42c7-a665-3f476cebb691",
"identityOwner": null,
"identityType": "person",
"verificationStatus": "pending",
"blocked": false,
"status": "active",
"companyOfficer": false,
"name": "Jonh Doe",
"email": "johndoe@gmsail.org",
"address": {
"city": "Tampa",
"state": "AL",
"street": "Ochard Street",
"country": "US",
"postalCode": "12345"
},
"phone": {
"sms": true,
"number": "345675643"
},
"tax": {
"state": "FL",
"country": "US",
"idNumber": "134567890"
},
"birthday": "1991-12-01T00:00:00.000Z",
"gender": "Male",
"createdAt": "2020-02-19T11:04:59.345Z",
"updatedAt": "2020-02-19T11:05:00.644Z",
"deletedAt": null
}

Example Call

Request
CURL
Response
Request
GET [ENVIRONMENT HOSTNAME]/identities/e65dde2c-4379-42c7-a665-3f476cebb691
CURL
curl -X GET \
[ENVIRONMENT HOSTNAME]/identities/e65dde2c-4379-42c7-a665-3f476cebb691 \
-H 'apikey: {INSERT YOUR API KEY HERE}' \
Response
{
"id": "e65dde2c-4379-42c7-a665-3f476cebb691",
"identityOwner": null,
"identityType": "person",
"verificationStatus": "pending",
"blocked": false,
"status": "active",
"companyOfficer": false,
"name": "Jonh Doe",
"email": "johndoe@gmsail.org",
"address": {
"city": "Tampa",
"state": "AL",
"street": "Ochard Street",
"country": "US",
"postalCode": "12345"
},
"phone": {
"sms": true,
"number": "345675643"
},
"tax": {
"state": "FL",
"country": "US",
"idNumber": "134567890"
},
"birthday": "1991-12-01T00:00:00.000Z",
"gender": "Male",
"createdAt": "2020-02-19T11:04:59.345Z",
"updatedAt": "2020-02-19T11:05:00.644Z",
"deletedAt": null
}

get
GET /identities

[ENVIRONMENT HOSTNAME]/identities
This endpoint returns a list of all identities controlled by you.
Request
Response
Request
Response
200: OK
{
"total": 2,
"data": [
{
"id": "e0ca903f-48ef-4816-a484-11dd6f6faafe",
"identityOwner": null,
"identityType": "person",
"verificationStatus": "approved",
"blocked": false,
"status": "disabled",
"companyOfficer": false,
"name": "123",
"email": "teste@armyspy.com",
"address": {
"city": "123",
"street": "123",
"country": "AF",
"postalCode": "123"
},
"phone": {
"sms": false,
"number": "+351912212121"
},
"tax": {
"country": "AF",
"idNumber": "213"
},
"birthday": "1990-11-21T00:00:00.000Z",
"gender": "Undefined",
"createdAt": "2020-01-31T14:41:37.139Z",
"updatedAt": "2020-02-03T21:16:15.726Z",
"deletedAt": null
}
]
}

Example Call

Request
CURL
Response
Request
GET [ENVIRONMENT HOSTNAME]/identities
// PAGINATED
GET [ENVIRONMENT HOSTNAME]/identities?page[number]=1&page[size]=1
CURL
curl -X GET \
[ENVIRONMENT HOSTNAME]/identities \
-H 'apikey: {INSERT YOUR API KEY HERE}'
Response
{
"total": 2,
"data": [
{
"id": "e0ca903f-48ef-4816-a484-11dd6f6faafe",
"identityOwner": null,
"identityType": "person",
"verificationStatus": "approved",
"blocked": false,
"status": "disabled",
"companyOfficer": false,
"name": "123",
"email": "teste@armyspy.com",
"address": {
"city": "123",
"street": "123",
"country": "AF",
"postalCode": "123"
},
"phone": {
"sms": false,
"number": "+351912212121"
},
"tax": {
"country": "AF",
"idNumber": "213"
},
"birthday": "1990-11-21T00:00:00.000Z",
"gender": "Undefined",
"createdAt": "2020-01-31T14:41:37.139Z",
"updatedAt": "2020-02-03T21:16:15.726Z",
"deletedAt": null
}
]
}

get
GET /identities/:id/deposits

[ENVIRONMENT HOSTNAME]/identities/:id/deposits
This endpoint returns all the deposits associated to an identity.
Request
Response
Request
Path Parameters
id
required
string
Id of the identity associated to the deposits
Response
200: OK

Example Call

Request
Curl
Response
Request
GET [ENVIRONMENT HOSTNAME]/identities/cafe5f64-5717-fafe-cafe-2c963f66afa6/deposits
Curl
curl -X GET \
[ENVIRONMENT HOSTNAME]/identities/5b145407-ebca-474c-92be-a0a5c577f1aa/deposits \
-H 'apikey: {INSERT API KEY HERE}'
Response
{
"total": 1,
"data": [
{
"id": "ea5894d2-2657-424a-906e-0f9c345ab48b",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"amount": "11",
"currency": "USD",
"blockchainAddress": "0xF2A511240E0D6b7E9683Ff979b4C4Afb9d3fE2E9",
"message": null,
"status": "pending",
"fundsTransferDetails": null,
"reference": "CUSDTXJ",
"transferInformation": {
"transferType": "wire"
},
"createdAt": "2020-02-19T11:15:08.144Z",
"updatedAt": "2020-02-19T11:15:10.482Z"
}
]
}

get
GET /identities/:id/withdrawals

[ENVIRONMENT HOSTNAME]/identities/:id/withdrawals
This endpoint returns all the withdrawals requests associated to an identity.
Request
Response
Request
Path Parameters
id
required
string
Id of the identity associated to the withdrawals
Response
200: OK
{
"total": 1,
"data": [
{
"id": "2642dedd-4fa0-40bf-8b15-7c0513bcdb38",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"transferType": "ach",
"transactionReference": "0xbba8f98772463079ed98826507b5accc0180220ef45641e6d882d43260a082f7",
"blockchainAddress": "0x8ba13aB181E9F30e543C6376Cd408192E95bCD1C",
"amount": null,
"currency": "USD",
"transactionHash": null,
"transferMethodId": "ce953d97-4e41-4396-8626-12d07914c045",
"status": "prepared",
"paymentDetails": null,
"transactionNumber": null,
"specialType": null,
"createdAt": "2020-02-19T11:43:04.553Z",
"updatedAt": "2020-02-19T11:43:04.553Z"
}
]
}

Example Call

Request
Curl
Response
Request
GET [ENVIRONMENT HOSTNAME]/identities/7c8867d7-b9b8-40de-86c7-f4a8e4ee566d/withdrawals
// PAGINAT£D
GET [ENVIRONMENT HOSTNAME]/identities/7c8867d7-b9b8-40de-86c7-f4a8e4ee566d/withdrawals?page[number]=1&page[size]=1
Curl
curl -X GET \
[ENVIRONMENT HOSTNAME]/identities/5b145407-ebca-474c-92be-a0a5c577f1aa/withdrawals \
-H 'apikey: {INSERT API KEY HERE}'
Response
{
"total": 1,
"data": [
{
"id": "2642dedd-4fa0-40bf-8b15-7c0513bcdb38",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"transferType": "ach",
"transactionReference": "0xbba8f98772463079ed98826507b5accc0180220ef45641e6d882d43260a082f7",
"blockchainAddress": "0x8ba13aB181E9F30e543C6376Cd408192E95bCD1C",
"amount": null,
"currency": "USD",
"transactionHash": null,
"transferMethodId": "ce953d97-4e41-4396-8626-12d07914c045",
"status": "prepared",
"paymentDetails": null,
"transactionNumber": null,
"specialType": null,
"createdAt": "2020-02-19T11:43:04.553Z",
"updatedAt": "2020-02-19T11:43:04.553Z"
}
]
}

get
GET /identities/:id/documents

[ENVIRONMENT HOSTNAME]/identities/:id/documents
Request
Response
Request
Path Parameters
id
required
string
Id of the identity associated to the documents
Response
200: OK
{
"total": 1,
"data": [
{
"id": "6215e0aa-dde7-40ac-af3b-b6fa733529ff",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"status": "active",
"label": "identity card",
"description": "identity card of jonh smith",
"extension": ".jpg",
"fileUrl": "https://pmint-custodial-api-tst-identity-docs.s3.amazonaws.com/e6/5d/de/2c/tLHGdo6z3PgOp4lR.jpeg",
"documentType": "IdentityCard",
"documentSide": "FrontSide",
"createdAt": "2020-02-19T15:15:23.546Z",
"updatedAt": "2020-02-19T15:15:24.864Z",
"deletedAt": null
}
]
}

Example Call

Request
Curl
Response
Request
GET [ENVIRONMENT HOSTNAME]/identities/32634b13-c370-4e77-afbc-2841d9d4b760/documents
// PAGINATED
GET [ENVIRONMENT HOSTNAME]/identities/32634b13-c370-4e77-afbc-2841d9d4b760/documents?page[number]=1&page[size]=1
Curl
curl -X GET \
[ENVIRONMENT HOSTNAME]/identities/5f5e13fb-c5d7-488b-923b-278b96b138b9/documents \
-H "apikey: {INSERT YOUR API KEY HERE}" \
Response
{
"total": 1,
"data": [
{
"id": "6215e0aa-dde7-40ac-af3b-b6fa733529ff",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"status": "active",
"label": "identity card",
"description": "identity card of jonh smith",
"extension": ".jpg",
"fileUrl": "https://pmint-custodial-api-tst-identity-docs.s3.amazonaws.com/e6/5d/de/2c/tLHGdo6z3PgOp4lR.jpeg",
"documentType": "IdentityCard",
"documentSide": "FrontSide",
"createdAt": "2020-02-19T15:15:23.546Z",
"updatedAt": "2020-02-19T15:15:24.864Z",
"deletedAt": null
}
]
}

get
GET /identities/:id/verifications

[ENVIRONMENT HOSTNAME]/identities/:id/verifications
Request
Response
Request
Path Parameters
id
required
string
Id of the identity associated to the verifications
Response
200: OK

Example Call

Request
Curl
Response
Request
GET [ENVIRONMENT HOSTNAME]/identities/74418597-9bc9-4791-aadc-8993961509c9/verifications
// PAGINATED
GET [ENVIRONMENT HOSTNAME]/identities/74418597-9bc9-4791-aadc-8993961509c9/verifications?page[number]=1&page[size]=1
Curl
curl -X GET \
[ENVIRONMENT HOSTNAME]/identities/5b145407-ebca-474c-92be-a0a5c577f1aa/verifications \
-H 'apikey: {INSERT API KEY HERE}'
Response
{
"total": 4,
"data": [
{
"id": "c0f38c55-3d93-4799-b3e9-da7ba195ab1e",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"status": "approved",
"exceptionDetails": "",
"createdAt": "2020-02-19T11:05:07.750Z",
"updatedAt": "2020-02-19T11:42:57.138Z"
},
{
"id": "7116651f-bf20-4a73-9f0a-b61d3e72568f",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"status": "approved",
"exceptionDetails": "",
"createdAt": "2020-02-19T11:05:07.760Z",
"updatedAt": "2020-02-19T11:42:57.248Z"
},
{
"id": "20c1fdd8-675f-4c88-b7ef-740db119c3d4",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"status": "approved",
"exceptionDetails": "",
"createdAt": "2020-02-19T11:05:07.853Z",
"updatedAt": "2020-02-19T11:42:57.462Z"
},
{
"id": "9ad2b23a-c2f0-4f80-af5c-0deb7a0a57e6",
"identityId": "e65dde2c-4379-42c7-a665-3f476cebb691",
"status": "approved",
"exceptionDetails": "",
"createdAt": "2020-02-19T11:05:07.955Z",
"updatedAt": "2020-02-19T11:42:57.644Z"
}
]
}

get
GET /identities/:id/identity-relations

[ENVIRONMENT HOSTNAME]/identities/:id/identity-relations
This endpoint retrieves all the relations associated to an identity. Note: The identity must be type company.
Request
Response
Request
Path Parameters
id
required
string
Id of the identity to whom belong the relations (must be a company type identity)
Response
200: OK

Example call

Request
Curl
Response
Request
GET [ENVIRONMENT HOSTNAME]/identities/577b2ebc-4d08-42fc-9217-46eae3bb2426/identity-relations
Curl
curl -X GET \
[ENVIRONMENT HOSTNAME]/identities/577b2ebc-4d08-42fc-9217-46eae3bb2426/identity-relations \
-H 'Content-Type: application/json' \
-H 'apikey: {INSERT YOUR API KEY HERE}'
Response
{
"total": 1,
"data": [
{
"id": "b28d7969-ff31-435a-a173-469d6136da4c",
"appId": "f3f8f171-975a-436d-9c7f-92f2fb145385",
"fromIdentity": "577b2ebc-4d08-42fc-9217-46eae3bb2426",
"toIdentity": "f51c7041-fdab-4f03-acaf-9c34df178724",
"label": "CEO"
}
]