URL Import
The url import allows users to import a document from a specified URL using the /v1/import/url
endpoint.
The categorisationId
can be obtained by using the Categorisation Resource as outlined here.
The document will then be available for review in the Red Marker platform.
It is possible to check the status of the Review using the status endpoint outlined below.
Request
Correlation ID
The Correlation ID is your unique identifier. It is used to track the request through the system and is returned in the available webhooks.
If one is not supplied, Red Marker will generate one included in the response that can be used to track the import.
POST /v1/import/url HTTP/1.1
{
"categorisationId": 1234,
"correlationId": "3127",
"url":"https://example.com/file.pdf"
}
Response
HTTP/1.1 201 Created
{
"categorisationId": 1234,
"correlationId": "3127",
"url": "https://example.com/file.pdf"
}
URL Import Status
To get a URL's status, use pass the correlationId
to below endpoint.
GET /v1/import/url/${correlationId}/status HTTP/1.1
Response
HTTP/1.1 200 Created
{
"data": [
{
"asset": {
"id": 123,
"status": "ready"
},
"review": {
"id": 128,
"status": "finished"
},
"errors": null
},
{
"asset": {
"id": 124,
"status": "pending-upload"
},
"review": {
"id": null,
"status": null
},
"errors": null
}
],
"links": {
"first": "https://api.us.redmarker.ai/v1/import/url/1234567890/status?page=1",
"last": null,
"prev": null,
"next": null,
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://api.us.redmarker.ai/v1/import/url/1234567890/status",
"per_page": 15,
"to": 15
}
}