Request: POST
Signature: /api/v1/uploadjobdoc
Uploads a document for a Job or Work Order. The API expects multi-part form data in the body with the following parts.
"Json": Must contain the Json text with document details as described below
"File": Must contain the file to be uploaded
The token must be passed as a Header in the request
The Json syntax is as per below:
{
"JobID": 1234,
"WorkOrderID": 0,
"Title": "New Doc.pdf",
"IsPublic": false,
"Checklist": "Item 1~Item 2"
}
JobID: When uploading a document for the job, set this to the Job ID; else set it to 0.
WorkOrderID: When uploading a document for a work order, set this to the Work Order ID; else set it to 0.
Title: The document title. If not specified, the title is taken from the filename.
IsPublic: Specify if the document is available for external users.
Checklist: Specify checklist items that the document must be linked with. Separate each checklist item with the ~ character. Each item must be an exact match, but not case-sensitive.
The response provided is standard. Code will be 1 for success. The ID of the document will be returned in the Identity field.
{
"Code": 1,
"Info": "",
"RowsAffected": 1,
"Scalar": null,
"Identity": 304931,
"RetInfo": null
}