post https://api.keeptruckin.com/v1/documents
Creates a document which needs to be used.
To send a document to a dispatch please do the following steps:
Step 1: Make a POST
call to https://api.keeptruckin.com/v1/documents
and pass the category
parameter as dispatch
and also pass in the dispatch_id
of the relevant dispatch as a parameter.
{
"doc_name": "bill of lading",
"doc_date": "2022-06-08",
"category": "dispatch",
"doc_type": "pdf",
"doc_size": 5,
"driver_id": 123,
"dispatch_id": 40,
"doc_time": "2022-06-08T21:54:56.601Z"
}
Step 2: Upload the document using the upload_url
from the response of the POST
call.
Step 3: After uploading the document, make a PUT
call to https://api.keeptruckin.com/v1/documents/:id
and pass the upload_status
parameter as completed
.
{
"id":15310,
"upload_status":"completed"
}