Search…
Documents
This resource corresponds to a digitized document hosted on Public Mint's servers in file format.
ENDPOINTS
1
POST /documents
2
GET /documents/:id
3
GET /documents
4
DELETE /documents/:id
Copied!

The document object

The document object represents a digitized document (generally a government ID or proof of address) in the shape of a file uploaded to Public Mint's servers.
A document is identified by a unique, random id and relates to a user's identityId.
DOCUMENT OBJECT
1
{
2
"id": "e9cbc096-bb79-438b-93ac-7c15dfdb1274",
3
"identityId": "971c3241-9876-471e-b0b3-40040893efd0",
4
"status": "pending",
5
"label": "identity card",
6
"description": "identity card of jonh smith",
7
"extension": ".png",
8
"fileUrl": "https://pmint-custodial-api-tst-identity-docs.s3.amazonaws.com/97/1c/32/41/LaDRHrVEScopeYBT.png",
9
"documentType": "IdentityCard",
10
"documentSide": "FrontSide",
11
"createdAt": "2021-02-17T14:03:51.974Z",
12
"updatedAt": "2021-02-17T14:03:51.974Z",
13
"deletedAt": null
14
}
Copied!
post
[ENVIRONMENT HOSTNAME]
/documents
POST /documents

Example Call

Request
Curl
Response
1
POST [ENVIRONMENT HOSTNAME]/documents
2
3
Copied!
1
curl --location --request POST 'https://api.tst.publicmint.io/documents' \
2
--header 'apiKey: J8fMImECtv0jAYXJ8D6gS48z45B3YeC5' \
3
--form 'description="identity card of jonh smith"' \
4
--form 'label="identity card"' \
5
--form 'identityId="971c3241-9876-471e-b0b3-40040893efd0"' \
6
--form 'documentType="IdentityCard"' \
7
--form 'documentSide="FrontSide"' \
8
--form '[email protected]"/Users/foo/Screen Shot 2021-02-04 at 14.33.01.png"'
Copied!
1
{
2
"id": "e9cbc096-bb79-438b-93ac-7c15dfdb1274",
3
"identityId": "971c3241-9876-471e-b0b3-40040893efd0",
4
"status": "pending",
5
"label": "identity card",
6
"description": "identity card of jonh smith",
7
"extension": ".png",
8
"fileUrl": "https://pmint-custodial-api-tst-identity-docs.s3.amazonaws.com/97/1c/32/41/LaDRHrVEScopeYBT.png",
9
"documentType": "IdentityCard",
10
"documentSide": "FrontSide",
11
"createdAt": "2021-02-17T14:03:51.974Z",
12
"updatedAt": "2021-02-17T14:03:51.974Z",
13
"deletedAt": null
14
}
Copied!
get
[ENVIRONMENT HOSTNAME]
/documents/:id
GET /documents/:id

Example Call

Request
Curl
Response
1
GET [ENVIRONMENT HOSTNAME]/documents/0acb6a86-e21e-45d6-a4e5-70bd4f85ecae
2
Copied!
1
curl -X GET \
2
[ENVIRONMENT HOSTNAME]/documents/0acb6a86-e21e-45d6-a4e5-70bd4f85ecae \
3
-H "apikey: {INSERT YOUR API KEY HERE}" \
Copied!
1
{
2
"id": "0acb6a86-e21e-45d6-a4e5-70bd4f85ecae",
3
"identityId": "e0564926-96e0-42e2-a544-68bc18598e40",
4
"status": "active",
5
"label": "identity card",
6
"description": "identity card of jonh smith",
7
"extension": ".jpeg",
8
"fileUrl": "https://pmint-custodial-api-tst-identity-docs.s3.amazonaws.com/e0/56/49/26/N5MXjSIhK0bGAOt2.jpeg",
9
"documentType": "IdentityCard",
10
"documentSide": "FrontSide",
11
"createdAt": "2020-01-10T17:24:23.561Z",
12
"updatedAt": "2020-01-10T17:24:24.455Z",
13
"deletedAt": null
14
}
Copied!
get
[ENVIRONMENT HOSTNAME]
/documents
GET /documents

Example Call

Request
Curl
Response
1
GET [ENVIRONMENT HOSTNAME]/documents
2
3
// PAGINATED
4
5
GET [ENVIRONMENT HOSTNAME]/documents?page[number]=1&page[size]=1
Copied!
1
curl -X GET \
2
"[ENVIRONMENT HOSTNAME]/documents" \
3
-H "apikey: {INSERT YOUR API KEY HERE}" \
Copied!
1
{
2
"total": 1,
3
"data": [
4
{
5
"id": "0acb6a86-e21e-45d6-a4e5-70bd4f85ecae",
6
"identityId": "e0564926-96e0-42e2-a544-68bc18598e40",
7
"status": "active",
8
"label": "identity card",
9
"description": "identity card of jonh smith",
10
"extension": ".jpeg",
11
"fileUrl": "https://pmint-custodial-api-tst-identity-docs.s3.amazonaws.com/e0/56/49/26/N5MXjSIhK0bGAOt2.jpeg",
12
"documentType": "IdentityCard",
13
"documentSide": "FrontSide",
14
"createdAt": "2020-01-10T17:24:23.561Z",
15
"updatedAt": "2020-01-10T17:24:24.455Z",
16
"deletedAt": null
17
}
18
]
19
}
Copied!
delete
[ENVIRONMENT HOSTNAME]
/documents/:id
DELETE /documents/:id
Last modified 11mo ago