Identities

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

The identity object

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

Identity entity model

Address information

Phone information

Tax information

Create an identity

POST /identities

POST [ENVIRONMENT HOSTNAME]/identities

This endpoint allows you to create a new identity.

Request Parameters

None

Body parameters

Body address parameters

Body documents parameters

Body phone parameters

Body tax parameters

Response Options

400 Bad Request

  • validation_failed

    • If the required parameters are not provided.

    • If additional parameters are provided.

    • If some of the parameters type is invalid.

    • If some of the parameters constraints is not respected.

  • email_already_in_use

404 Not Found

  • identity_owner_not_found

    • If a non existent identity owner id is provided.

422 Unprocessable entity

  • identity_owner_must_be_of_type_person

    • If identity owner is not of type person.

200 OK

Example Call

POST [ENVIRONMENT HOSTNAME]/identities

{
  "address": {
    "city": "Braga",
    "country": "PT",
    "postalCode": "4444-333",
    "state": "Braga",
    "street": "Avenida D. João I,  40"
  },
  "birthday": "2000-11-11",
  "email": "foobar@publicmint.com",
  "gender": "Male",
  "name": "João Pedro Soares",
  "phone": {
    "number": "910000000",
    "sms": false
  },
  "tax": {
    "country": "PT",
    "idNumber": "1111111111",
    "state": "Braga"
  },
  "type": "person",
  "documents": [{
    "description": "ID card",
    "label": "id card",
    "side": "FrontSide",
    "type": "IdentityCard",
    "url": "https://[pmint_aws_s3_bucket].s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
  }],
  "faceImages": ["https://[pmint_aws_s3_bucket].s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"]
}

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

Get an identity

GET /identities/:id

GET [ENVIRONMENT HOSTNAME]/identities/:id

This endpoint retrieves and returns an identity owned by you from the database.

Request Parameters

Path parameters

Example Call

GET [ENVIRONMENT HOSTNAME]/identities/38882f21-ce8f-4e18-8b83-e43e082912ef

Get identities

GET /identities

GET [ENVIRONMENT HOSTNAME]/identities

This endpoint returns a paginated list of all identities owned by you.

Available filters

Available sorts

Paginate options

Response Options

200 OK

Example Call

GET [ENVIRONMENT HOSTNAME]/identities

// PAGINATED

GET [ENVIRONMENT HOSTNAME]/identities?page[number]=1&page[size]=1

Get identity document presign url

Returns a presign url to view a specific identity document.

GET /identities/:identityId/documents/:id/presign-url

GET [ENVIRONMENT HOSTNAME]identities/:identityId/documents/:id/presign-url

This endpoint returns a paginated list of all identities owned by you.Available filtersAvailable sorts

Path parameters

Response Options

200 OK

Example Call

GET [ENVIRONMENT HOSTNAME]/identities/:identityId/documents/:id/presign-url

Update an identity

PATCH /identities/:id

PATCH [ENVIRONMENT_HOSTNAME]/identities/:id

Updates the identity information.

Path parameters

Request Parameters

Body parameters

Note: Fields name, birthday, gender, tax.country and tax.idNumber can't be updated if identity is already confirmed (identityConfirmed = true)

Body address parameters

Body documents parameters

Body phone parameters

Body tax parameters

Response Options

400 Bad Request

  • validation_failed

    • If the required parameters are not provided.

    • If additional parameters are provided.

    • If some of the parameters type is invalid.

    • If some of the parameters constraints is not respected.

  • email_already_in_use

404 Not Found

  • identity_owner_not_found

    • If a non existent identity owner id is provided.

422 Unprocessable entity

  • identity_owner_must_be_of_type_person

    • If identity owner is not of type person.

200 OK

Example Call

PATCH [ENVIRONMENT HOSTNAME]/identities/38882f21-ce8f-4e18-8b83-e43e082912ef

{
  "address": {
    "city": "Braga",
    "country": "PT",
    "postalCode": "4444-333",
    "state": "Braga",
    "street": "Avenida D. João I,  40"
  },
  "birthday": "2000-11-11",
  "email": "foobar@publicmint.com",
  "gender": "Male",
  "name": "João Pedro Soares",
  "phone": {
    "number": "910000000",
    "sms": false
  },
  "tax": {
    "country": "PT",
    "idNumber": "1111111111",
    "state": "Braga"
  },
  "documents": [{
    "description": "ID card",
    "label": "id card",
    "side": "FrontSide",
    "type": "IdentityCard",
    "url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
  }],
  "faceImages": ["https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"]
}js

Get operations

GET /identities/:id/operations

Returns a list of all enabled operations for the active KYC providers and the current status of each one, depending on the KYC status of the identity.

Request Parameters

Path parameters

Response Options

200 OK

Request example:

GET <hostname>/identities/e7941059-74c6-4b3f-b029-d3aa03d1ea44/operation

Response example:

{
  "data": [{
    "action": "create",
    "active": false,
    "code": "deposit:wire",
    "reason": "kyc_required_status_not_reached"
  }, {
    "action": "create",
    "active": true,
    "code": "deposit:stablecoin"
  }, {
    "action": "create",
    "active": false,
    "code": "withdrawal:wire",
    "reason": "operation_not_active_due_to_extra_kyc_missing"
  }, {
    "action": "confirm",
    "active": false,
    "code": "withdrawal:stablecoin",
    "reason": "identity_kyc_is_missing"
  }]
}

Delete an identity

DELETE /identities/:id

DELETE [ENVIRONMENT_HOSTNAME]/identities/:id

Deletes the identity with the given Id.

Path parameters

Response Options

400 Bad Request

  • validation_failed

    • If an invalid identity id is provided.

404 Not Found

  • identity_not_found

    • If a non existent identity id is provided.

204 OK

Example Call

DELETE [ENVIRONMENT HOSTNAME]/identities/38882f21-ce8f-4e18-8b83-e43e082912ef

Last updated