/workorder/{workOrderId}/getWorkOrderDataSheet v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Work Orders
postWorkOrderIdGetWorkOrderDataSheet
Code samples
const inputBody = '{
"type": "object",
"properties": {
"format": {
"type": "string",
"description": "The format as a non-empty string.",
"example": "pdf,xlsx"
}
},
"required": [
"format"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/pdf'
};
fetch('https://goldleaf.app/api/v1/workorder/{workOrderId}/getWorkOrderDataSheet',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /workorder/{workOrderId}/getWorkOrderDataSheet
Creates a PDF customer drawing, or Excel file
Retrieves a datasheet for the specified work order in the given format. Currently only supports pdf, and xlsx formats.
Body parameter
{
"type": "object",
"properties": {
"format": {
"type": "string",
"description": "The format as a non-empty string.",
"example": "pdf,xlsx"
}
},
"required": ["format"]
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workOrderId | path | string(mongo-id) | true | The ID of the work order. |
| body | body | object | true | none |
| ยป format | body | string | true | The format as a non-empty string. |
Example responses
200 Response
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A PDF file | string |
| 500 | Internal Server Error | none | string |
