/hose/{hoseId}/crimpspecs 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:
Hoses
getHoseIdCrimpSpecs
Code samples
const headers = {
Accept: "application/json",
};
fetch("https://goldleaf.app/api/v1/hose/{hoseId}/crimpspecs", {
method: "GET",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
GET /hose/{hoseId}/crimpspecs
Get crimp specs for a specific hose
Retrieves all crimp specifications (standard and custom) for a hose using its MongoDB ID. Custom specs are defined by the organization and merged with standard specs.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseId | path | string(mongo-id) | true | The MongoDB ObjectId of the hose |
Example responses
400 Response
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Invalid hoseId"
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of crimp specifications for the hose | None |
| 400 | Bad Request | Invalid hoseId provided | Inline |
| 500 | Internal Server Error | Server error | string |
Response Schema
Status Code 400
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
postHoseIdCrimpSpecs
Code samples
const inputBody = '{
"type": "object",
"required": [
"params"
],
"properties": {
"params": {
"type": "object",
"required": [
"crimpSpecs"
],
"properties": {
"crimpSpecs": {
"type": "array",
"description": "A list of crimp spec objects to store for the hose",
"items": {
"type": "object",
"required": [
"couplingSeries",
"couplingSeriesBrand"
],
"properties": {
"couplingSeries": {
"type": "string",
"example": "43"
},
"couplingSeriesBrand": {
"type": "string",
"example": "Parker"
},
"ferrulePartNumber": {
"type": "string",
"nullable": true
},
"ferruleBrand": {
"type": "string",
"nullable": true
},
"unit": {
"type": "string",
"nullable": true
},
"comments": {
"type": "string",
"nullable": true
},
"dieSize": {
"type": "string",
"nullable": true
},
"spacerRing": {
"type": "string",
"nullable": true
},
"insertLength": {
"type": "number",
"format": "float",
"nullable": true
},
"crimpDiam": {
"type": "number",
"format": "float",
"nullable": true
},
"tolerance": {
"type": "number",
"format": "float",
"nullable": true
},
"tolerancePlus": {
"type": "number",
"format": "float",
"nullable": true
},
"toleranceMinus": {
"type": "number",
"format": "float",
"nullable": true
},
"crimpStretchPerEnd": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveExternal": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveExternalTolerance": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveInternal": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveInternalTolerance": {
"type": "number",
"format": "float",
"nullable": true
},
"interlock": {
"type": "boolean",
"nullable": true
}
}
}
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hose/{hoseId}/crimpspecs',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hose/{hoseId}/crimpspecs
Update crimp specifications for a hose
Updates or creates custom crimp specifications for a hose under the requesting organization. If the provided specs are identical to the standard ones, no custom spec is created. Only accessible to users with the "admin" role.
Body parameter
{
"type": "object",
"required": ["params"],
"properties": {
"params": {
"type": "object",
"required": ["crimpSpecs"],
"properties": {
"crimpSpecs": {
"type": "array",
"description": "A list of crimp spec objects to store for the hose",
"items": {
"type": "object",
"required": ["couplingSeries", "couplingSeriesBrand"],
"properties": {
"couplingSeries": {
"type": "string",
"example": "43"
},
"couplingSeriesBrand": {
"type": "string",
"example": "Parker"
},
"ferrulePartNumber": {
"type": "string",
"nullable": true
},
"ferruleBrand": {
"type": "string",
"nullable": true
},
"unit": {
"type": "string",
"nullable": true
},
"comments": {
"type": "string",
"nullable": true
},
"dieSize": {
"type": "string",
"nullable": true
},
"spacerRing": {
"type": "string",
"nullable": true
},
"insertLength": {
"type": "number",
"format": "float",
"nullable": true
},
"crimpDiam": {
"type": "number",
"format": "float",
"nullable": true
},
"tolerance": {
"type": "number",
"format": "float",
"nullable": true
},
"tolerancePlus": {
"type": "number",
"format": "float",
"nullable": true
},
"toleranceMinus": {
"type": "number",
"format": "float",
"nullable": true
},
"crimpStretchPerEnd": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveExternal": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveExternalTolerance": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveInternal": {
"type": "number",
"format": "float",
"nullable": true
},
"skiveInternalTolerance": {
"type": "number",
"format": "float",
"nullable": true
},
"interlock": {
"type": "boolean",
"nullable": true
}
}
}
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hoseId | path | string(mongo-id) | true | The MongoDB ObjectId of the hose to update |
| body | body | object | true | none |
| » params | body | object | true | none |
| »» crimpSpecs | body | [object] | true | A list of crimp spec objects to store for the hose |
| »»» couplingSeries | body | string | true | none |
| »»» couplingSeriesBrand | body | string | true | none |
| »»» ferrulePartNumber | body | string¦null | false | none |
| »»» ferruleBrand | body | string¦null | false | none |
| »»» unit | body | string¦null | false | none |
| »»» comments | body | string¦null | false | none |
| »»» dieSize | body | string¦null | false | none |
| »»» spacerRing | body | string¦null | false | none |
| »»» insertLength | body | number(float)¦null | false | none |
| »»» crimpDiam | body | number(float)¦null | false | none |
| »»» tolerance | body | number(float)¦null | false | none |
| »»» tolerancePlus | body | number(float)¦null | false | none |
| »»» toleranceMinus | body | number(float)¦null | false | none |
| »»» crimpStretchPerEnd | body | number(float)¦null | false | none |
| »»» skiveExternal | body | number(float)¦null | false | none |
| »»» skiveExternalTolerance | body | number(float)¦null | false | none |
| »»» skiveInternal | body | number(float)¦null | false | none |
| »»» skiveInternalTolerance | body | number(float)¦null | false | none |
| »»» interlock | body | boolean¦null | false | none |
Example responses
201 Response
{
"type": "object",
"description": "Full hose document including updated crimp specs"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Successfully updated crimp specs and returned the full updated hose document | Inline |
| 401 | Unauthorized | Unauthorized - hose not found or access denied | Inline |
| 500 | Internal Server Error | Server error | string |
Response Schema
Status Code 201
Full hose document including updated crimp specs
| Name | Type | Required | Restrictions | Description |
|---|
Status Code 401
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
