/hoseassemblies/export 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:
Hose Assembly
postHoseAssembliesExport
Code samples
const inputBody = '{
"type": "object",
"properties": {
"hoseAssemblies": {
"type": "array",
"description": "List of MongoDB ObjectIds for hose assemblies to export.",
"items": {
"type": "string",
"format": "objectId"
}
},
"selectAll": {
"type": "boolean",
"description": "If true, all items matching the search criteria will be exported."
},
"search": {
"type": "object",
"description": "Optional filters for searching hose assemblies.",
"properties": {
"customerName": {
"type": "string"
},
"partNumberWithRevision": {
"type": "string"
},
"customerPartNumber": {
"type": "string"
},
"customerRevision": {
"type": "string"
},
"hosePartNumber": {
"type": "string"
},
"end1PartNumber": {
"type": "string"
},
"end2PartNumber": {
"type": "string"
},
"length": {
"type": "string"
},
"description": {
"type": "string"
},
"comments": {
"type": "string"
},
"hoseBrand": {
"type": "string"
},
"commonSearch": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
},
"required": [
"hoseAssemblies",
"selectAll"
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hoseassemblies/export',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hoseassemblies/export
Export hose assemblies
Exports hose assemblies based on selected IDs or filtered search criteria.
Body parameter
{
"type": "object",
"properties": {
"hoseAssemblies": {
"type": "array",
"description": "List of MongoDB ObjectIds for hose assemblies to export.",
"items": {
"type": "string",
"format": "objectId"
}
},
"selectAll": {
"type": "boolean",
"description": "If true, all items matching the search criteria will be exported."
},
"search": {
"type": "object",
"description": "Optional filters for searching hose assemblies.",
"properties": {
"customerName": {
"type": "string"
},
"partNumberWithRevision": {
"type": "string"
},
"customerPartNumber": {
"type": "string"
},
"customerRevision": {
"type": "string"
},
"hosePartNumber": {
"type": "string"
},
"end1PartNumber": {
"type": "string"
},
"end2PartNumber": {
"type": "string"
},
"length": {
"type": "string"
},
"description": {
"type": "string"
},
"comments": {
"type": "string"
},
"hoseBrand": {
"type": "string"
},
"commonSearch": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
},
"required": ["hoseAssemblies", "selectAll"]
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » hoseAssemblies | body | [string] | true | List of MongoDB ObjectIds for hose assemblies to export. |
| » selectAll | body | boolean | true | If true, all items matching the search criteria will be exported. |
| » search | body | object | false | Optional filters for searching hose assemblies. |
| »» customerName | body | string | false | none |
| »» partNumberWithRevision | body | string | false | none |
| »» customerPartNumber | body | string | false | none |
| »» customerRevision | body | string | false | none |
| »» hosePartNumber | body | string | false | none |
| »» end1PartNumber | body | string | false | none |
| »» end2PartNumber | body | string | false | none |
| »» length | body | string | false | none |
| »» description | body | string | false | none |
| »» comments | body | string | false | none |
| »» hoseBrand | body | string | false | none |
| »» commonSearch | body | string | false | none |
| »» status | body | string | false | none |
Example responses
200 Response
{
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "string",
"description": "Download link or reference to exported file."
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Hose assemblies export successful | Inline |
| 400 | Bad Request | Server error | string |
| 500 | Internal Server Error | Server error | string |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » success | boolean | false | none | none |
| » data | string | false | none | Download link or reference to exported file. |
