/hoseassemblies/import 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
postHoseAssembliesImport
Code samples
const inputBody = '{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "Excel (.xlsx) file containing hose assembly data."
},
"doNotRelease": {
"type": "boolean",
"description": "Optional flag to skip releasing assemblies upon import."
},
"hoseKit": {
"type": "object",
"properties": {
"partNumber": {
"type": "string"
},
"revision": {
"type": "string"
},
"customerName": {
"type": "string"
},
"customerPartNumber": {
"type": "string"
},
"customerRevision": {
"type": "string"
},
"description": {
"type": "string"
},
"comments": {
"type": "string"
},
"customerOrgId": {
"type": "string",
"description": "MongoDB ObjectId of the customer organization."
}
}
}
}
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hoseassemblies/import',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hoseassemblies/import
Bulk import hose assemblies from Excel
Imports multiple hose assemblies via an uploaded Excel (.xlsx) file. You may include optional metadata fields such as part number, revision, and customer information. You can also set a doNotRelease flag to control import behavior.
Body parameter
type: object
properties:
file:
type: string
format: binary
description: Excel (.xlsx) file containing hose assembly data.
doNotRelease:
type: boolean
description: Optional flag to skip releasing assemblies upon import.
hoseKit:
type: object
properties:
partNumber:
type: string
revision:
type: string
customerName:
type: string
customerPartNumber:
type: string
customerRevision:
type: string
description:
type: string
comments:
type: string
customerOrgId:
type: string
description: MongoDB ObjectId of the customer organization.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » file | body | string(binary) | false | Excel (.xlsx) file containing hose assembly data. |
| » doNotRelease | body | boolean | false | Optional flag to skip releasing assemblies upon import. |
| » hoseKit | body | object | false | none |
| »» partNumber | body | string | false | none |
| »» revision | body | string | false | none |
| »» customerName | body | string | false | none |
| »» customerPartNumber | body | string | false | none |
| »» customerRevision | body | string | false | none |
| »» description | body | string | false | none |
| »» comments | body | string | false | none |
| »» customerOrgId | body | string | false | MongoDB ObjectId of the customer organization. |
Example responses
500 Response
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"details": {
"type": "string"
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 500 | Internal Server Error | Server error | Inline |
Response Schema
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
| » details | string | false | none | none |
