v1

latestOpenAPI 3.1.02026-07-2617501.1 MB

Create a new document (v2)

post/v2/documents

Request body

uploader_idinteger

Specify the ID of the uploader who is creating the document.

document_form_idinteger

Specify the ID of the form ID.

doc_datestring date

Specify the date of the document.

ref_nostring

Specify the reference number for the document.

notesstring

Specify any additional notes for the document.

doc_json_fieldsstring json

Input for fields defined in form specified via document_form_id

doc_timestring date

Denotes the date and time of the upload. If left blank, it will default to the current time.

Response

201

Example response

{
  "document": {
    "id": 13992548,
    "category": "notes",
    "ref_no": "ref",
    "notes": "notes",
    "doc_date": "2021-01-01",
    "doc_fields": {
      "notes": "notes"
    },
    "doc_time": "2021-10-14T22:30:31Z",
    "uploader": {
      "id": 1044876,
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@keeptruckin.com",
      "role": "dispatcher"
    },
    "attachments": [
      {
        "id": 13992548,
        "name": "attach1",
        "upload_url": "/url/to/upload/the/document",
        "doc_type": "jpeg"
      }
    ],
    "created_at": "2021-10-14T22:33:00Z",
    "updated_at": "2021-10-14T22:33:00.152437Z"
  }
}