/salesestimate/{salesEstimateId}/getBillOfMaterials 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:
Sales Estimates
postSalesEstimateIdGetBillOfMaterials
Code samples
const inputBody = '{
"type": "object",
"properties": {
"format": {
"type": "string",
"enum": [
"pdf",
"excel"
],
"description": "The file format for the BOM document"
}
},
"required": [
"format"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/pdf',
'Authorization':undefined
};
fetch('https://goldleaf.app/api/v1/salesestimate/{salesEstimateId}/getBillOfMaterials',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /salesestimate/{salesEstimateId}/getBillOfMaterials
Generate a Bill of Materials (BOM) document for a sales estimate
Generates a Bill of Materials (BOM) document in PDF or Excel format for the specified sales estimate.
Body parameter
{
"type": "object",
"properties": {
"format": {
"type": "string",
"enum": ["pdf", "excel"],
"description": "The file format for the BOM document"
}
},
"required": ["format"]
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| salesEstimateId | path | string(mongoId) | true | The ID of the sales estimate to generate the BOM for |
| Authorization | header | undefined | true | Bearer token for authentication |
| body | body | object | true | Format of the BOM document to generate |
| » format | body | string | true | The file format for the BOM document |
Enumerated Values
| Parameter | Value |
|---|---|
| » format | |
| » format | excel |
Example responses
200 Response
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | BOM document generated successfully | string |
| 400 | Bad Request | Invalid salesEstimateId or format parameter | None |
| 401 | Unauthorized | Unauthorized - user must be authenticated | None |
| 403 | Forbidden | Forbidden - customers are blocked from this endpoint | None |
| 404 | Not Found | Sales estimate not found | None |
| 500 | Internal Server Error | Internal server error | None |
