Skip to main content
Skip table of contents

API Quick Start Guide

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:

  1. Log in to Verify

  2. Navigate to the user section and click My account > Settings > API Key

3. Click Generate New API Key

4. Copy your New API Key

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 (lightbulb)

1. Upload the first file: Upload a new file

POST /api/v1/files

Example Request

BASH
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

Response Code

201 → The file has been successfully uploaded

401 → Forbidden

JSON
{
    "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

index.js
JS
const formData = new FormData();
const apiUrl = 'https://verify.demo.globalvision.co/api/v1/files'
const stream = createReadStream('./sampleFile.doc');
formData.append('file', stream);

const apiResponse = await nodeFetch(apiUrl, {
    method: 'POST',
    headers: {
        'x-gv-integration': 'test',
        'x-api-key': 'YOUR API KEY',
        'accept': '/'
    },
    body: formData
});

const json = await apiResponse.json();
console.log(json);

Example Response

JS
{
    "id": "41754da3-6d6c-4c6c-9776-e19997ad30b3",
    "originalPath": "users/auth0|60787cd8abeeee0068dq5t6hf/userfiles/41754da3-6d6c-4c6c-9776-e19997ad30b3/sampleFile.doc",
    "originalFilename": "sampleFile.doc",
    "userId": "auth0|60787cd8abeeee0068d5a878",
    "filename": "",
    "path": "",
    "status": "PENDING",
    "createdAt": "2021-06-14T15:37:05.211Z",
    "updatedAt": "2021-06-14T15:37:05.211Z"
}

2. Upload the second file: Upload a new file

POST /api/v1/files

Example Request

BASH
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

JSON
{
    "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

index.js
JS
const formData = new FormData();
const apiUrl = 'https://verify.demo.globalvision.co/api/v1/files'
const stream = createReadStream('./masterFile.doc');
formData.append('file', stream);

const apiResponse = await nodeFetch(apiUrl, {
    method: 'POST',
    headers: {
        'x-gv-integration': 'test',
        'x-api-key': 'YOUR API KEY',
        'accept': '/'
    },
    body: formData
});

const json = await apiResponse.json();
console.log(json);

Example Response

CODE
{
    "id": "e4d115b3-2d93-48c9-839e-3a5e4e502020",
    "originalPath": "users/auth0|60787cd8abeeee0068dq5t6hf/userfiles/e4d115b3-2d93-48c9-839e-3a5e4e502020/masterFile.doc",
    "originalFilename": "masterFile.doc",
    "userId": "auth0|60787cd8abeeee0068d5a878",
    "filename": "",
    "path": "",
    "status": "PENDING",
    "createdAt": "2021-06-14T17:12:42.562Z",
    "updatedAt": "2021-06-14T17:12:42.562Z"
}


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

BASH
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

Click here to expand...

201 → The inspection has been created successfully

400 → Forbidden

JSON
{
    "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

index.js
CODE
const apiUrl = 'https://verify.demo.globalvision.co/api/v1/inspections'
const data = {
    masterFileId: 'e4d115b3-2d93-48c9-839e-3a5e4e502020',
    sampleFileId: '41754da3-6d6c-4c6c-9776-e19997ad30b3'
};

const apiResponse = await nodeFetch(apiUrl, {
    method: 'POST',
    headers: {
        'x-gv-integration': 'test',
        'x-api-key': 'YOUR API KEY',
        'accept': '/'
    },
    body: data
});
const json = await apiResponse.json();

Example Response

CODE
{
    "sortOptions": {
        "sortBy": "order",
        "sortOrder": "ASC"
    },
    "filterOptions": {},
    "settings": {
        "dictionaryId": "",
        "tableEnhancement": false
    },
    "id": "2b60f93d-862c-46b2-9970-d9d1676cd877",
    "masterFileId": null,
    "sampleFileId": null,
    "templateId": "81e45e9c-f443-4092-afe7-e017520d625e",
    "input": {
        "documents": [
            {
                "type": "master"
            },
            {
                "type": "sample"
            }
        ]
    },
    "status": "PENDING",
    "name": "Inspection 8",
    "userId": "auth0|60787cd8abeeee0068dq5t6hf",
    "lastJobId": null,
    "createdAt": "2021-06-14T17:24:03.129Z",
    "updatedAt": "2021-06-14T17:24:03.129Z",
    "deletedAt": null,
    "template": {
        "id": "81e45e9c-f443-4092-afe7-e017520d625e",
        "userId": "auth0|60787cd8abeeee0068d5a878",
        "templateName": "Template 8",
        "textProfile": {
            "layout": "high",
            "readingDirection": "ltr",
            "documentProcessing": {
                "processLinesTables": true,
                "removeHeadersFooters": true,
                "removeHighlightsWordFile": false
            }
        },
        "graphicProfile": null,
        "barcodeProfile": null,
        "brailleProfile": null,
        "createdAt": "2021-06-14T17:24:03.121Z",
        "updatedAt": "2021-06-14T17:24:03.121Z",
        "deletedAt": null
    }
}

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.

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

BASH
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

JSON
[
    {
        "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

CODE
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

,,index.js
JS
const inspectionId = '';
const masterFileId = 'e4d115b3-2d93-48c9-839e-3a5e4e502020';
const sampleFileId = '41754da3-6d6c-4c6c-9776-e19997ad30b3';

const apiUrl = 'https://verify.demo.globalvision.co/api/v1/reports/inspection/${inspectionId}'

const apiResponse = await nodeFetch(apiUrl, {
    method: 'GET',
    headers: {
        'x-gv-integration': 'test',
        'x-api-key': 'YOUR API KEY',
        'accept': '/'
    },
    body: {
        masterFileId,
        sampleFileId
    }
});
const data = await apiResponse.json(); // list of all report objects
const latestReport = data[data.length - 1];
const reportFileURL = latestReport.path;

Example Response

JSON
[
    {
        "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
        }
    }
]


You have any feedback on our user guide? Feel free to tell us your opinion here!

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.