API Quick Start Guide
![](../__attachments/3014590465/att_1_for_2105376807.png?inst-v=41e48d49-2f58-4a86-b943-8ca241a10804)
API Quick Start
Getting Started
Before you get started with Verify API, first you will have to obtain a Verify account from your administrator.
Generate your API Key
Here’s how you can generate one for yourself:
Log in to Verify
Navigate to the user section and click My account > Settings > API Key
![](../__attachments/3014590465/image-20210608-185226.png?inst-v=41e48d49-2f58-4a86-b943-8ca241a10804)
3. Click Generate New API Key
4. Copy your New API Key
![](../__attachments/3014590465/image-20210614-183938.png?inst-v=41e48d49-2f58-4a86-b943-8ca241a10804)
Your API Key should be managed like a password. Do not paste or share it anywhere. Treat it as a secret.
Make your first inspection
1. Upload the first file: Upload a new file
POST /api/v1/files
Example Request
curl -X POST "https://verify.demo.globalvision.co/api/v1/files"\
-H "accept: /" -H "x-gv-integration: test"\
-H "x-api-key: YOUR API KEY" -H "Content-Type: multipart/form-data"\
-F "integration="\
-F "file=@test.pdf;type=application/pdf"
Example Response
{
"id": "517430fe-66cb-47a9-a0e6-714af7bd543a",
"originalPath": "users/auth0|60787cd8abeeee0068dq5t6hf/userfiles/517430fe-66cb-47a9-a0e6-714af7bd543a/test.pdf",
"originalFilename": "test.pdf",
"userId": "auth0|60787cd8abeeee0068d5a878",
"filename": "test.pdf",
"path": "users/auth0|60787cd8abeeee0068d5a878/userfiles/517430fe-66cb-47a9-a0e6-714af7bd543a/test.pdf",
"status": "COMPLETE",
"createdAt": "2021-06-13T22:26:13.414Z",
"updatedAt": "2021-06-13T22:26:13.414Z"
}
💻 Node.js Example
2. Upload the second file: Upload a new file
POST /api/v1/files
Example Request
curl -X POST "https://verify.demo.globalvision.co/api/v1/files"\
-H "accept: /"\
-H "x-gv-integration: test2"\
-H "x-api-key: YOUR API KEY"\
-H "Content-Type: multipart/form-data"\
-F "integration="\
-F "file=@test2.pdf;type=application/pdf"
Example Response
{
"id": "8dee93b0-7f29-4783-85a8-0b429f617196",
"originalPath": "users/auth0|60787cd8abeeee0068dq5t6hf/userfiles/8dee93b0-7f29-4783-85a8-0b429f617196/test2.pdf",
"originalFilename": "test2.pdf",
"userId": "auth0|60787cd8abeeee0068d5a878",
"filename": "test2.pdf",
"path": "users/auth0|60787cd8abeeee0068dq5t6hf/userfiles/8dee93b0-7f29-4783-85a8-0b429f617196/test2.pdf",
"status": "COMPLETE",
"createdAt": "2021-06-13T22:33:25.179Z",
"updatedAt": "2021-06-13T22:33:25.179Z"
}
💻 Node.js Example
3. Create a new Inspection:
After steps 1 and 2. The next step is creating the inspection with the ID
POST /api/v1/inspections
Example Request
curl -X POST "https://verify.demo.globalvision.co/api/v1/inspections"\
-H "x-gv-integration: test"\
-H "x-api-key:YOUR API KEY"\
-H "accept: application/json"\
-H "Content-Type: application/json"\
-d "{"masterFileId":"e083e45e-24c7-4712-ab08-2e8a0ccf1fbc","sampleFileId":"e083e45e-24c7-4712-ab08-2e8a0ccf1fwc","name":"test"}"
Example Response
{
"sortOptions": {
"sortBy": "order",
"sortOrder": "ASC"
},
"filterOptions": {},
"settings": {
"dictionaryId": "",
"tableEnhancement": false
},
"id": "4dc82af1-926f-4cf5-b560-d544fe651133",
"masterFileId": null,
"sampleFileId": null,
"templateId": "d80d47ed-15b3-47af-a4bf-740e7e4873c3",
"input": {
"documents": [
{
"type": "master"
},
{
"type": "sample"
}
]
},
"status": "PENDING",
"name": "Inspection 6",
"userId": "auth0|60787cd8abeeee0068dq5t6hf",
"lastJobId": null,
"createdAt": "2021-06-13T22:48:53.896Z",
"updatedAt": "2021-06-13T22:48:53.896Z",
"deletedAt": null,
"template": {
"id": "d80d47ed-15b3-47af-a4bf-740e7e4873c3",
"userId": "auth0|60787cd8abeeee0068dq5t6hf",
"templateName": "Template 6",
"textProfile": {
"layout": "high",
"readingDirection": "ltr",
"documentProcessing": {
"processLinesTables": true,
"removeHeadersFooters": true,
"removeHighlightsWordFile": false
}
},
"graphicProfile": null,
"barcodeProfile": null,
"brailleProfile": null,
"createdAt": "2021-06-13T22:48:53.884Z",
"updatedAt": "2021-06-13T22:48:53.884Z",
"deletedAt": null
}
}
masterFileId and sampleFileId are references to the ID obtained in steps 1 & 2
💻 Node.js Example
4. Login on Verify Webapp:
Using the {{inspectionID}}
from above, navigate to the webapp:
https://verify.globalvision.co/{{inspectionID}}
Login to your account -- you will be automatically redirected to the inspection you created.
![](../__attachments/3014590465/att_5_for_2105376807.png?inst-v=41e48d49-2f58-4a86-b943-8ca241a10804)
A user can now perform an inspection and generate a report
5. Fetch the Report:
Once the user has created a report in the web UI, the following endpoint can be reached to fetch a list of all the reports for the given inspectionID
. Each item in the list will have a path
to the remote location of each report file.
GET api/v1/reports/inspection/{inspectionID}
Example Request
curl -X GET "https://verify.demo.globalvision.co/api/v1/reports/inspection/{inspectionID}"\
-H "accept: /"\
-H "x-gv-integration: test"\
-H "x-api-key: YOUR API KEY"\
Example Response
[
{
"id": "800cd3f2-526c-435c-98ee-45d77720a242",
"inspectionId": "5aeeba9d-6d48-480b-b133-1469a5fb685b",
"name": "Report - Sample_Bittamucin_Booklet_F",
"path": "users/auth0|6054fdef794b1e006b073a69/inspections/5aeeba9d-6d48-480b-b133-1469a5fb685b/reports/800cd3f2-526c-435c-98ee-45d77720a242/ReportAnnotated.pdf",
"status": "COMPLETE",
"createdAt": "2021-06-17T16:13:58.321Z",
"options": {
"type": "annotated"
},
"deletedAt": null,
"inspection": {
"sortOptions": {
"sortBy": "order",
"sortOrder": "ASC"
},
"filterOptions": {},
"settings": {
"dictionaryId": "",
"tableEnhancement": false
},
"id": "5aeeba9d-6d48-480b-b133-1469a5fb685b",
"masterFileId": "6fcd8683-d888-43f6-a689-d4a5dc7f5a66",
"sampleFileId": "178b020e-3b8e-48c4-9b88-fa37d1dfae89",
"templateId": "20fe6b1d-4c3f-462d-8e8d-6de7f0906ae1",
"input": {
"documents": [
{
"type": "master"
},
{
"type": "sample"
}
]
},
"status": "COMPLETE",
"name": "Sprint Review Demo",
"userId": "auth0|6054fdef794b06b073a69",
"lastJobId": "3f7d364b-37a6-44f2-8d1c-5645c2ecd308",
"createdAt": "2021-06-17T15:49:17.069Z",
"updatedAt": "2021-06-17T16:13:46.803Z",
"deletedAt": null
}
},
{
"id": "05c48c8c-5840-44eb-8b97-10fca8d1c421",
"inspectionId": "5aeeba9d-6d48-480b-b133-1469a5fb685b",
"name": "Report - Sample_Bittamucin_Booklet_F",
"path": "users/auth0|6054fdef794b1e006b073a69/inspections/5aeeba9d-6d48-480b-b133-1469a5fb685b/reports/05c48c8c-5840-44eb-8b97-10fca8d1c421/ReportAnnotated.pdf",
"status": "COMPLETE",
"createdAt": "2021-06-17T15:51:12.834Z",
"options": {
"type": "annotated"
},
"deletedAt": null,
"inspection": {
"sortOptions": {
"sortBy": "order",
"sortOrder": "ASC"
},
"filterOptions": {},
"settings": {
"dictionaryId": "",
"tableEnhancement": false
},
"id": "5aeeba9d-6d48-480b-b133-1469a5fb685b",
"masterFileId": "6fcd8683-d888-43f6-a689-d4a5dc7f5a66",
"sampleFileId": "178b020e-3b8e-48c4-9b88-fa37d1dfae89",
"templateId": "20fe6b1d-4c3f-462d-8e8d-6de7f0906ae1",
"input": {
"documents": [
{
"type": "master"
},
{
"type": "sample"
}
]
},
"status": "COMPLETE",
"name": "Sprint Review Demo",
"userId": "auth0|6054fdef794b1e6b073a69",
"lastJobId": "3f7d364b-37a6-44f2-8d1c-5645c2ecd308",
"createdAt": "2021-06-17T15:49:17.069Z",
"updatedAt": "2021-06-17T16:13:46.803Z",
"deletedAt": null
}
}
]
The report can be downloaded by using the path
of the most recent report at the following URL
https://verify.demo.globalvision.co/api/v1/inspection-files/users/{path}
Example
https://verify.demo.globalvision.co/api/v1/inspection-files/users/auth0|6054f794b1e006b073a69/inspections/5aeeba9d-6d48-480b-b133-1469a5fb685b/reports/05c48c8c-5840-44eb-8b97-10fca8d1c421/ReportAnnotated.pdf
💻 Node.js Example
You have any feedback on our user guide? Feel free to tell us your opinion here!