Document

Create/manage documents attached to your businesses and identities. When a document record is created using this API the response object returns a presigned url used to upload this document to an encrypted bucket. The presigned url can then be used to upload directly to an AWS s3 bucket, with a command like curl -X PUT -T /path/to/file.pdf "insert presigned url". You must use the PUT method. This can also be accomplished from a backend or mobile app, from the browser or using our web components. After upload is complete the status changes from pending to uploaded.

Create a Document

Create a reference to a document, and receive a presigned URL for uploading the document

Request
header Parameters
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Request Body schema: application/json
required
description
string
file_name
required
string
file_type
required
string

the file media type/extension of the file you are uploading. For example, text/plain, application/pdf, image/png

document_type
required
string
Enum: "balance_sheet" "bank_statement" "government_id" "profit_and_loss_statement" "tax_return" "other"
business_id
string <uuid>

the business id to associate with this document (one of business id or identity id is required)

identity_id
string <uuid>

the identity id to associate with this document (one of business id or identity id is required)

metadata
object

any useful information you'd like to store alongside this document

Responses
201

Document was created and presigned successfully

post/entities/document
Request samples
application/json
{
  • "description": "My Document",
  • "file_name": "the_file_name",
  • "file_type": "application/pdf",
  • "document_type": "balance_sheet",
  • "business_id": "biz_abc123",
  • "identity_id": "idty_abc123",
  • "metadata": {
    }
}
Response samples
application/json
{
  • "id": 1,
  • "type": "document",
  • "data": {
    },
  • "page_info": "string"
}

List Documents

List the documents you have uploaded. This endpoint supports pagination.

Request
header Parameters
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Responses
200

Successfully list documents

get/entities/document
Request samples
Response samples
application/json
{
  • "id": 1,
  • "type": "array",
  • "data": [
    ],
  • "page_info": {
    }
}

Get a Document

Get details about a document, and a presigned download URL

Request
path Parameters
id
required
string <uuid>
header Parameters
Authorization
required
string

the access_token value returned from the JustiFi oauth/token endpoint (be sure to append Bearer before the token)

Example: Bearer {access_token}
Responses
200

Get Document

get/entities/document/{id}
Request samples
Response samples
application/json
{
  • "id": 1,
  • "type": "document",
  • "data": {
    },
  • "page_info": "string"
}