These docs are for v2.1. Click to read the latest docs for v3.

Migrating originals

Migrating the flows for source documents is a crucial flow common to all integrations.

The steps below illustrate the changes required to migrate the API flows to v2.

Creating an original document

POST /v1/files/original/

Content-Type: mulipart/form-data

file: <file_contents>
name: <File name>
POST /v2/original/

Content-Type: mulipart/form-data

file: <file_contents>
name: <File name>
POST /v2.1/original/

Content-Type: mulipart/form-data

file: <file_contents>
name: <File name>
rename_if_exists: <Boolean>

List all original documents

GET /v1/files/original/

{
    "count": 2,
    "files": [
        {
          "created_time": 1590751553,
          "id": 23188790,
          "last_modified_time": 1590751553,
          "name": "IT Contract - Employee.pdf"
        },
        {
            "created_time": 1588142205,
            "id": 23187514,
            "last_modified_time": 1588142206,
            "name": "IT Contract - Employee.pdf"
        }
    ]
}
GET /v2/original/

{
    "count": 2,
    "files": [
        {
          "created_time": 1590751553,
          "id": 23188790,
          "last_modified_time": 1590751553,
          "name": "IT Contract - Employee.pdf"
        },
        {
            "created_time": 1588142205,
            "id": 23187514,
            "last_modified_time": 1588142206,
            "name": "IT Contract - Employee.pdf"
        }
    ]
}
GET /v2.1/original/

{
    "count": 2,
    "files": [
        {
          "created_time": 1590751553,
          "id": 23188790,
          "last_modified_time": 1590751553,
          "name": "IT Contract - Employee.pdf"
        },
        {
            "created_time": 1588142205,
            "id": 23187514,
            "last_modified_time": 1588142206,
            "name": "IT Contract - Employee.pdf"
        }
    ]
}

Fetch details of a single original document

GET /v1/files/original/<original_id>


{
  "created_time": 1590751553,
  "id": 23188790,
  "last_modified_time": 1590751553,
  "name": "IT Contract - Employee.pdf"
}
GET /v2/original/<original_id>

{
  "created_time": 1590751553,
  "id": 23188790,
  "last_modified_time": 1590751553,
  "name": "IT Contract - Employee (Anirjit Bakshi).pdf"
}
GET /v2.1/original/<original_id>

{
  "created_time": 1590751553,
  "id": 23188790,
  "last_modified_time": 1590751553,
  "name": "IT Contract - Employee (John Doe).pdf"
}

Download single original document as PDF

GET /v1/files/original/<original_id>/download/
GET /v2/original/<original_id>/download/
GET /v2.1/original/<original_id>/download/

Delete a single original document

DELETE /v1/files/original/<original_id>
DELETE /v2/original/<original_id>
DELETE /v2.1/original/<original_id>