Create a Document

Add a document to a Business Account, Customer Account, or Beneficial Owner. You can add documents with the following extensions: JPG, JPEG, PNG, and PDF.

Adding a document involves the following steps:

  1. Send a request with the account holder information and document details.
  2. Once you receive the response, upload the document by calling the content URL (url.value) with an HTTP PUT request.

Endpoint

POST /v1/documents

Authorization Header

Authorization: Bearer <access_token>

Request Body

holderId  REQUIRED

string (UUID)

ID of the account holder for the document. The account holder can be a Business Account, Customer Account, or Beneficial Owner.

holderType  REQUIRED

string enum, values: BENEFICIARY, BUSINESS_ACCOUNT, CUSTOMER

Type of entity referenced by the accountHolderId field. The following values are supported:

  • BENEFICIARY  Beneficial Owner.
  • BUSINESS_ACCOUNT  Business Account.
  • CUSTOMER  Individual or Business Customer Account.

documentType  REQUIRED

string enum, values: driving-license, passport, formation, tax, ownership, other

Type of document. The following values are supported:

  • driving-license  Driver’s license. Can be added for Individual Customers and Beneficial Owners.
  • passport  Passport. Can be added for Individual Customers and Beneficial Owners.
  • formation  Formation document. Can be added for Business Customers.
  • tax  Tax document. Can be added for Business Customers.
  • ownership  Ownership document. Can be added for Business Customers.
  • other  Other type of document. Can be added for Individual Customers, Business Customers, Beneficial Owners, and Business Accounts.

name  REQUIRED

string, min length: 1, max length: 40

Name of the document (example: Bob Smith Driver’s License).

description  CONDITIONAL

string, min length: 1, max length: 100

Description of the document. Required if documentType is formation, tax, ownership, or other.

number  CONDITIONAL

string

Document number. Required if documentType is driving-license or passport.

issuingDate

string (date), format: yyyy-mm-dd

Date the document was issued. Cannot be a future date.

issuingCountryCode  CONDITIONAL

string, min length: 2, max length: 3

Country where the document was issued. Must be an ISO 3166-1 uppercase alpha 2-character or 3-character country code. For example, the United States is US or USA.

Required if documentType is driving-license or passport.

issuingStateCode  CONDITIONAL

string, min length: 2, max length: 3

State or province where the document was issued. Must be an ISO 3166-2 uppercase alpha 2-character or 3-character country subdivision code. For example, Missouri is MO. Required if documentType is driving-license.

extension  REQUIRED

string enum, values: JPG, JPEG, PNG, PDF

Document file extension. Allowed values are JPG, JPEG, PNG, and PDF.

contentLength  REQUIRED

integer (int64), max size: 5,242,880 bytes (5 MB)

File content size in bytes.

expiryDate  CONDITIONAL

string (date), format: yyyy-mm-dd

Expiry date for the document. Required if documentType is driving-license or passport.

metadata

string, max properties: 6, value max length: 1024

Key/value pairs used to store additional information about the document.

Returns

Returns the Document object. This object contains the document details, including a unique ID for the document and a content URL.

To upload the document, call the content URL (url.value) with an HTTP PUT request.

SAMPLE REQUEST

				
					{
  "holderId": "4b79e405-959e-41b5-92c5-1f49e6b71745",
  "holderType": "CUSTOMER",
  "documentType": "driving-license",
  "name": "John Doe Driving License",
  "description": "driving license",
  "number": "123-456-789",
  "issuingDate": "2022-02-03",
  "issuingCountryCode": "US",
  "issuingStateCode": "NY",
  "extension": "JPG",
  "contentLength": 81169,
  "expiryDate": "2024-02-03",
  "metadata": {
    "docRefId": "100000333"
  }
}
				
			

SAMPLE RESPONSE

				
					{
  "id": "b175994b-fd5b-46d6-aba9-73638902f4a0",
  "providerExternalId": "b648fc",
  "provider": "ABC",
  "businessAccountId": "733df8ac-5d93-4e5a-b665-36a1525353d8",
  "holderId": "4b79e405-959e-41b5-92c5-1f49e6b71745",
  "holderType": "CUSTOMER",
  "documentType": "driving-license",
  "name": "John Doe Driving License",
  "description": "driving license",
  "number": "123-456-789",
  "issuingDate": "2022-02-03",
  "issuingCountryCode": "US",
  "issuingStateCode": "NY",
  "extension": "JPG",
  "contentLength": 81169,
  "version": "1",
  "expiryDate": "2024-02-03",
  "url": {
    "value": "https://documents.rocketkor.net/7260554c5",
    "allowed": "PUT",
    "expiresIn": 600
  },
  "thumbnailUrl": {
    "value": "https://documents.rocketkor.net/8145796e7",
    "allowed": "GET",
    "expiresIn": 600
  },
  "status": "NEW",
  "verificationStatus": "UNVERIFIED",
  "metadata": {
    "docRefId": "100000333"
  },
  "createdBy": {
    "id": "c503092d-e6c4-4f7a-b893-46ebe56b18a8",
    "type": "service-account"
  },
  "createdAt": "2023-05-03T23:11:59.656Z",
  "updatedBy": {
    "id": "c503092d-e6c4-4f7a-b893-46ebe56b18a8",
    "type": "service-account"
  },
  "updatedAt": "2023-06-05T23:11:59.656Z"
}
				
			
Exit mobile version