Create a new document

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Purpose: Use this API to create a new document. You must specify values such as Category, Document Type, Name, and Size of the document in the Body Parameters. Refer to the Body Parameters section for more info.

If you are creating a document for a dispatch, you must upload the same document for your drivers to access. Take the following steps to upload the created document:

  1. Use this API and ensure to pass the following body parameters:
    1. Category: Mention the category as 'dispatch'.
    2. Dispatch ID: Mention the corresponding dispatch ID.
      {
           "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"
      }
      
  2. Make the API call.
    You will receive a response.
  3. Copy the upload_url, and open the same in a browser.
  4. Upload the document.
  5. Now use the Update a specific document endpoint and add the following details:
    1. ID (Path Parameter): Mention the ID of the document that you've just uploaded.
    2. Status (Body Parameter): Mention the upload_status, as completed.

      {
        "id":15310,
        "upload_status":"completed"
      }
      
      You have now successfully created a document for the dispatch as well as uploaded the same.

Response Parameters

document

  • Type: Object
  • Description: Details of the uploaded document.

id

  • Type: Integer
  • Description: The unique identifier for the document.

category

  • Type: String
  • Description: The category of the document, e.g., "other".

upload_url

  • Type: String
  • Description: The URL where the document is to be uploaded.

ref_no

  • Type: String
  • Description: The reference number associated with the document.

notes

  • Type: String
  • Description: Notes associated with the document.

doc_date

  • Type: Date (YYYY-MM-DD)
  • Description: The date the document was created.

doc_fields

  • Type: Array of Objects (nullable)
  • Description: Custom fields associated with the document.

doc_time

  • Type: DateTime (ISO 8601)
  • Description: The time the document was created.

Body Params
string
required

Specify the name of the document that you are creating.

date
required

Specify the date of the document that you are creating.

string
required

Specify the category of the document. Allowed values are "dispatch", or "other".

string
required

Specify the type of the document that you are creating. Allowed values are: 'png', 'jpeg', 'jpg', 'pdf'

int32
required

Specify the size of the document that you are creating.

int32

Specify the ID of the driver for whom you are creating this document. After the creating, the document will sent to the corresponding driver.

string

Specify the reference number or the order number that will be attached to the document.

string

Mention any notes for the document. For example, if you are sending a Dispatch related document, you can mention, Dispatch # XXXXX document for Driver # XXXXX.

int32

If the category of the document is 'dispatch", then you must mention the Dispatch ID as well.

date

The timestamp on the document.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json