/hoseassemblies/create 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
postHoseAssembliesCreate
Code samples
const inputBody = '{
"type": "object",
"required": [
"params",
"params.partNumber",
"params.hose",
"params.length"
],
"properties": {
"params": {
"type": "object",
"required": [
"partNumber",
"hose",
"length"
],
"properties": {
"partNumber": {
"type": "string",
"description": "Assembly part number."
},
"revision": {
"type": "string",
"nullable": true
},
"hose": {
"type": "string",
"format": "mongo-id",
"description": "MongoDB ID of the base hose."
},
"length": {
"type": "number",
"format": "decimal",
"description": "Length of the assembly."
},
"hoseBrand": {
"type": "string",
"nullable": true
},
"hosePartNumber": {
"type": "string",
"nullable": true
},
"end1PartNumber": {
"type": "string",
"nullable": true
},
"end2PartNumber": {
"type": "string",
"nullable": true
},
"description": {
"type": "string",
"nullable": true
},
"modelCode": {
"type": "string",
"nullable": true
},
"tag": {
"type": "string",
"nullable": true
},
"lengthUnit": {
"type": "string",
"nullable": true
},
"lengthTolerance": {
"type": "string",
"nullable": true
},
"comments": {
"type": "string",
"nullable": true
},
"productionNotes": {
"type": "string",
"nullable": true
},
"printText": {
"type": "string",
"nullable": true
},
"vendorPartNumber": {
"type": "string",
"nullable": true
},
"customerPartNumber": {
"type": "string",
"nullable": true
},
"customerRevision": {
"type": "string",
"nullable": true
},
"customerName": {
"type": "string",
"nullable": true
},
"status": {
"type": "string",
"nullable": true
},
"manualDescription": {
"type": "boolean",
"nullable": true
},
"definedByCutLength": {
"type": "boolean",
"nullable": true
},
"proofTest": {
"type": "boolean",
"nullable": true
},
"burstTest": {
"type": "boolean",
"nullable": true
},
"WeightLbs": {
"type": "number",
"format": "decimal",
"nullable": true
},
"minPressurePsi": {
"type": "number",
"format": "decimal",
"nullable": true
},
"cutLengthEntered": {
"type": "number",
"format": "decimal",
"nullable": true
},
"orientation": {
"type": "number",
"format": "decimal",
"nullable": true
},
"proofTestPressureMultiplier": {
"type": "number",
"format": "decimal",
"nullable": true
},
"proofTestTimeMinutes": {
"type": "number",
"format": "decimal",
"nullable": true
},
"burstTestPressureMultiplier": {
"type": "number",
"format": "decimal",
"nullable": true
},
"burstTestTimeMinutes": {
"type": "number",
"format": "decimal",
"nullable": true
},
"wrapStyle": {
"type": "object",
"nullable": true,
"properties": {
"wrapType": {
"type": "string",
"nullable": true
},
"colour": {
"type": "string",
"nullable": true
},
"imageName": {
"type": "string",
"nullable": true
},
"coverage": {
"type": "object",
"nullable": true,
"properties": {
"coverageType": {
"type": "string",
"nullable": true
},
"imageName": {
"type": "string",
"nullable": true
},
"length": {
"type": "number",
"format": "decimal",
"nullable": true
},
"length2": {
"type": "number",
"format": "decimal",
"nullable": true
},
"offset": {
"type": "number",
"format": "decimal",
"nullable": true
}
}
}
}
},
"extraItems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemType": {
"type": "string",
"nullable": true
},
"location": {
"type": "string",
"nullable": true
},
"comments": {
"type": "string",
"nullable": true
},
"unitOfMeasure": {
"type": "string",
"nullable": true
},
"number": {
"type": "number",
"nullable": true
},
"quantity": {
"type": "number",
"format": "decimal",
"nullable": true
},
"order": {
"type": "integer",
"nullable": true
},
"item": {
"type": "string",
"format": "mongo-id",
"nullable": true
}
}
}
},
"end1": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"end2": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"ferrule1": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"ferrule2": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"wrap": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"customerOrgId": {
"type": "string",
"format": "mongo-id",
"nullable": true
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hoseassemblies/create',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hoseassemblies/create
Create a new hose assembly
Creates a new hose assembly using the provided parameters. Requires admin, regular, or customer role.
Body parameter
{
"type": "object",
"required": ["params", "params.partNumber", "params.hose", "params.length"],
"properties": {
"params": {
"type": "object",
"required": ["partNumber", "hose", "length"],
"properties": {
"partNumber": {
"type": "string",
"description": "Assembly part number."
},
"revision": {
"type": "string",
"nullable": true
},
"hose": {
"type": "string",
"format": "mongo-id",
"description": "MongoDB ID of the base hose."
},
"length": {
"type": "number",
"format": "decimal",
"description": "Length of the assembly."
},
"hoseBrand": {
"type": "string",
"nullable": true
},
"hosePartNumber": {
"type": "string",
"nullable": true
},
"end1PartNumber": {
"type": "string",
"nullable": true
},
"end2PartNumber": {
"type": "string",
"nullable": true
},
"description": {
"type": "string",
"nullable": true
},
"modelCode": {
"type": "string",
"nullable": true
},
"tag": {
"type": "string",
"nullable": true
},
"lengthUnit": {
"type": "string",
"nullable": true
},
"lengthTolerance": {
"type": "string",
"nullable": true
},
"comments": {
"type": "string",
"nullable": true
},
"productionNotes": {
"type": "string",
"nullable": true
},
"printText": {
"type": "string",
"nullable": true
},
"vendorPartNumber": {
"type": "string",
"nullable": true
},
"customerPartNumber": {
"type": "string",
"nullable": true
},
"customerRevision": {
"type": "string",
"nullable": true
},
"customerName": {
"type": "string",
"nullable": true
},
"status": {
"type": "string",
"nullable": true
},
"manualDescription": {
"type": "boolean",
"nullable": true
},
"definedByCutLength": {
"type": "boolean",
"nullable": true
},
"proofTest": {
"type": "boolean",
"nullable": true
},
"burstTest": {
"type": "boolean",
"nullable": true
},
"WeightLbs": {
"type": "number",
"format": "decimal",
"nullable": true
},
"minPressurePsi": {
"type": "number",
"format": "decimal",
"nullable": true
},
"cutLengthEntered": {
"type": "number",
"format": "decimal",
"nullable": true
},
"orientation": {
"type": "number",
"format": "decimal",
"nullable": true
},
"proofTestPressureMultiplier": {
"type": "number",
"format": "decimal",
"nullable": true
},
"proofTestTimeMinutes": {
"type": "number",
"format": "decimal",
"nullable": true
},
"burstTestPressureMultiplier": {
"type": "number",
"format": "decimal",
"nullable": true
},
"burstTestTimeMinutes": {
"type": "number",
"format": "decimal",
"nullable": true
},
"wrapStyle": {
"type": "object",
"nullable": true,
"properties": {
"wrapType": {
"type": "string",
"nullable": true
},
"colour": {
"type": "string",
"nullable": true
},
"imageName": {
"type": "string",
"nullable": true
},
"coverage": {
"type": "object",
"nullable": true,
"properties": {
"coverageType": {
"type": "string",
"nullable": true
},
"imageName": {
"type": "string",
"nullable": true
},
"length": {
"type": "number",
"format": "decimal",
"nullable": true
},
"length2": {
"type": "number",
"format": "decimal",
"nullable": true
},
"offset": {
"type": "number",
"format": "decimal",
"nullable": true
}
}
}
}
},
"extraItems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"itemType": {
"type": "string",
"nullable": true
},
"location": {
"type": "string",
"nullable": true
},
"comments": {
"type": "string",
"nullable": true
},
"unitOfMeasure": {
"type": "string",
"nullable": true
},
"number": {
"type": "number",
"nullable": true
},
"quantity": {
"type": "number",
"format": "decimal",
"nullable": true
},
"order": {
"type": "integer",
"nullable": true
},
"item": {
"type": "string",
"format": "mongo-id",
"nullable": true
}
}
}
},
"end1": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"end2": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"ferrule1": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"ferrule2": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"wrap": {
"type": "string",
"format": "mongo-id",
"nullable": true
},
"customerOrgId": {
"type": "string",
"format": "mongo-id",
"nullable": true
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » params | body | object | true | none |
| »» partNumber | body | string | true | Assembly part number. |
| »» revision | body | string¦null | false | none |
| »» hose | body | string(mongo-id) | true | MongoDB ID of the base hose. |
| »» length | body | number(decimal) | true | Length of the assembly. |
| »» hoseBrand | body | string¦null | false | none |
| »» hosePartNumber | body | string¦null | false | none |
| »» end1PartNumber | body | string¦null | false | none |
| »» end2PartNumber | body | string¦null | false | none |
| »» description | body | string¦null | false | none |
| »» modelCode | body | string¦null | false | none |
| »» tag | body | string¦null | false | none |
| »» lengthUnit | body | string¦null | false | none |
| »» lengthTolerance | body | string¦null | false | none |
| »» comments | body | string¦null | false | none |
| »» productionNotes | body | string¦null | false | none |
| »» printText | body | string¦null | false | none |
| »» vendorPartNumber | body | string¦null | false | none |
| »» customerPartNumber | body | string¦null | false | none |
| »» customerRevision | body | string¦null | false | none |
| »» customerName | body | string¦null | false | none |
| »» status | body | string¦null | false | none |
| »» manualDescription | body | boolean¦null | false | none |
| »» definedByCutLength | body | boolean¦null | false | none |
| »» proofTest | body | boolean¦null | false | none |
| »» burstTest | body | boolean¦null | false | none |
| »» WeightLbs | body | number(decimal)¦null | false | none |
| »» minPressurePsi | body | number(decimal)¦null | false | none |
| »» cutLengthEntered | body | number(decimal)¦null | false | none |
| »» orientation | body | number(decimal)¦null | false | none |
| »» proofTestPressureMultiplier | body | number(decimal)¦null | false | none |
| »» proofTestTimeMinutes | body | number(decimal)¦null | false | none |
| »» burstTestPressureMultiplier | body | number(decimal)¦null | false | none |
| »» burstTestTimeMinutes | body | number(decimal)¦null | false | none |
| »» wrapStyle | body | object¦null | false | none |
| »»» wrapType | body | string¦null | false | none |
| »»» colour | body | string¦null | false | none |
| »»» imageName | body | string¦null | false | none |
| »»» coverage | body | object¦null | false | none |
| »»»» coverageType | body | string¦null | false | none |
| »»»» imageName | body | string¦null | false | none |
| »»»» length | body | number(decimal)¦null | false | none |
| »»»» length2 | body | number(decimal)¦null | false | none |
| »»»» offset | body | number(decimal)¦null | false | none |
| »» extraItems | body | [object] | false | none |
| »»» itemType | body | string¦null | false | none |
| »»» location | body | string¦null | false | none |
| »»» comments | body | string¦null | false | none |
| »»» unitOfMeasure | body | string¦null | false | none |
| »»» number | body | number¦null | false | none |
| »»» quantity | body | number(decimal)¦null | false | none |
| »»» order | body | integer¦null | false | none |
| »»» item | body | string(mongo-id)¦null | false | none |
| »» end1 | body | string(mongo-id)¦null | false | none |
| »» end2 | body | string(mongo-id)¦null | false | none |
| »» ferrule1 | body | string(mongo-id)¦null | false | none |
| »» ferrule2 | body | string(mongo-id)¦null | false | none |
| »» wrap | body | string(mongo-id)¦null | false | none |
| »» customerOrgId | body | string(mongo-id)¦null | false | none |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | The newly created hose assembly | None |
| 406 | Not Acceptable | Reached subscription limit | None |
| 500 | Internal Server Error | Server error | string |
