/crimpfittings/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:
CrimpFittings
postCrimpFittingCreate
Code samples
const inputBody = '{
"type": "object",
"required": [
"partNumber",
"brand",
"hoseSize",
"dashSize",
"series"
],
"properties": {
"partNumber": {
"type": "string",
"description": "Part number of the crimp fitting."
},
"brand": {
"type": "string",
"description": "Brand name (must match existing brand)."
},
"hoseSize": {
"type": "string",
"description": "Hose size (dash)."
},
"dashSize": {
"type": "string",
"description": "Dash size of the fitting end connection."
},
"series": {
"type": "string",
"description": "Fitting series."
},
"nominalHoseSize": {
"type": "string",
"nullable": true,
"description": "Nominal dash size (e.g., for 100R5 or 100R14 hoses)."
},
"threadSize": {
"type": "string",
"nullable": true,
"description": "Thread size."
},
"shape": {
"type": "string",
"nullable": true,
"description": "Shape (e.g., \"90\", \"45\")."
},
"style": {
"type": "string",
"nullable": true,
"description": "Style of fitting (e.g., JIC)."
},
"gender": {
"type": "string",
"nullable": true,
"enum": [
"male",
"female"
],
"description": "Gender of the fitting."
},
"swivel": {
"type": "string",
"nullable": true,
"enum": [
"swivel"
],
"description": "Whether the fitting is a swivel."
},
"forged": {
"type": "string",
"nullable": true,
"enum": [
"forged"
],
"description": "Whether the fitting is forged."
},
"bulkhead": {
"type": "string",
"nullable": true,
"enum": [
"bulkhead"
],
"description": "Whether the fitting is a bulkhead."
},
"sealType": {
"type": "string",
"nullable": true,
"description": "Type of seal."
},
"description": {
"type": "string",
"nullable": true,
"description": "Description of the fitting."
},
"material": {
"type": "string",
"nullable": true,
"description": "Material of the fitting."
},
"spec": {
"type": "string",
"nullable": true,
"description": "Specification."
},
"endType": {
"type": "string",
"nullable": true,
"description": "End type."
},
"nutType": {
"type": "string",
"nullable": true,
"description": "Nut type."
},
"imageName": {
"type": "string",
"nullable": true,
"description": "Image name for the part."
},
"application": {
"type": "string",
"nullable": true,
"description": "Application."
},
"hoseInnerDiamInch": {
"type": "string",
"nullable": true,
"description": "Hose inner diameter (inches)."
},
"flangeDiamInch": {
"type": "string",
"nullable": true,
"description": "Flange diameter (inches)."
},
"maxPressurePsi": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Max pressure in PSI."
},
"cutAllowanceInch": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Cut allowance (inches)."
},
"cutAllowancemm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Cut allowance (millimeters)."
},
"hexSizemm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Hex size (mm)."
},
"hexSizeNutmm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Nut hex size (mm)."
},
"weightLbs": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Weight (lbs)."
},
"coneAngle": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Cone angle (degrees)."
},
"dropLengthInch": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Drop length (inches)."
},
"dropLengthmm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Drop length (millimeters)."
},
"seatAngle": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Seat angle (degrees)."
},
"tubeOuterDiammm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Outer diameter of tube (mm)."
},
"flangeThickness": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Flange thickness."
},
"banjoInnerDiammm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Banjo inner diameter (mm)."
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/crimpfittings/create',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /crimpfittings/create
Create a crimp fitting
Creates a new crimp fitting. Validates input and ensures the user has proper roles.
Body parameter
{
"type": "object",
"required": ["partNumber", "brand", "hoseSize", "dashSize", "series"],
"properties": {
"partNumber": {
"type": "string",
"description": "Part number of the crimp fitting."
},
"brand": {
"type": "string",
"description": "Brand name (must match existing brand)."
},
"hoseSize": {
"type": "string",
"description": "Hose size (dash)."
},
"dashSize": {
"type": "string",
"description": "Dash size of the fitting end connection."
},
"series": {
"type": "string",
"description": "Fitting series."
},
"nominalHoseSize": {
"type": "string",
"nullable": true,
"description": "Nominal dash size (e.g., for 100R5 or 100R14 hoses)."
},
"threadSize": {
"type": "string",
"nullable": true,
"description": "Thread size."
},
"shape": {
"type": "string",
"nullable": true,
"description": "Shape (e.g., \"90\", \"45\")."
},
"style": {
"type": "string",
"nullable": true,
"description": "Style of fitting (e.g., JIC)."
},
"gender": {
"type": "string",
"nullable": true,
"enum": ["male", "female"],
"description": "Gender of the fitting."
},
"swivel": {
"type": "string",
"nullable": true,
"enum": ["swivel"],
"description": "Whether the fitting is a swivel."
},
"forged": {
"type": "string",
"nullable": true,
"enum": ["forged"],
"description": "Whether the fitting is forged."
},
"bulkhead": {
"type": "string",
"nullable": true,
"enum": ["bulkhead"],
"description": "Whether the fitting is a bulkhead."
},
"sealType": {
"type": "string",
"nullable": true,
"description": "Type of seal."
},
"description": {
"type": "string",
"nullable": true,
"description": "Description of the fitting."
},
"material": {
"type": "string",
"nullable": true,
"description": "Material of the fitting."
},
"spec": {
"type": "string",
"nullable": true,
"description": "Specification."
},
"endType": {
"type": "string",
"nullable": true,
"description": "End type."
},
"nutType": {
"type": "string",
"nullable": true,
"description": "Nut type."
},
"imageName": {
"type": "string",
"nullable": true,
"description": "Image name for the part."
},
"application": {
"type": "string",
"nullable": true,
"description": "Application."
},
"hoseInnerDiamInch": {
"type": "string",
"nullable": true,
"description": "Hose inner diameter (inches)."
},
"flangeDiamInch": {
"type": "string",
"nullable": true,
"description": "Flange diameter (inches)."
},
"maxPressurePsi": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Max pressure in PSI."
},
"cutAllowanceInch": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Cut allowance (inches)."
},
"cutAllowancemm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Cut allowance (millimeters)."
},
"hexSizemm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Hex size (mm)."
},
"hexSizeNutmm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Nut hex size (mm)."
},
"weightLbs": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Weight (lbs)."
},
"coneAngle": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Cone angle (degrees)."
},
"dropLengthInch": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Drop length (inches)."
},
"dropLengthmm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Drop length (millimeters)."
},
"seatAngle": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Seat angle (degrees)."
},
"tubeOuterDiammm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Outer diameter of tube (mm)."
},
"flangeThickness": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Flange thickness."
},
"banjoInnerDiammm": {
"type": "number",
"format": "double",
"nullable": true,
"description": "Banjo inner diameter (mm)."
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| itemId | query | string | false | Optional MongoDB ID of the item. |
| body | body | object | true | none |
| » partNumber | body | string | true | Part number of the crimp fitting. |
| » brand | body | string | true | Brand name (must match existing brand). |
| » hoseSize | body | string | true | Hose size (dash). |
| » dashSize | body | string | true | Dash size of the fitting end connection. |
| » series | body | string | true | Fitting series. |
| » nominalHoseSize | body | string¦null | false | Nominal dash size (e.g., for 100R5 or 100R14 hoses). |
| » threadSize | body | string¦null | false | Thread size. |
| » shape | body | string¦null | false | Shape (e.g., "90", "45"). |
| » style | body | string¦null | false | Style of fitting (e.g., JIC). |
| » gender | body | string¦null | false | Gender of the fitting. |
| » swivel | body | string¦null | false | Whether the fitting is a swivel. |
| » forged | body | string¦null | false | Whether the fitting is forged. |
| » bulkhead | body | string¦null | false | Whether the fitting is a bulkhead. |
| » sealType | body | string¦null | false | Type of seal. |
| » description | body | string¦null | false | Description of the fitting. |
| » material | body | string¦null | false | Material of the fitting. |
| » spec | body | string¦null | false | Specification. |
| » endType | body | string¦null | false | End type. |
| » nutType | body | string¦null | false | Nut type. |
| » imageName | body | string¦null | false | Image name for the part. |
| » application | body | string¦null | false | Application. |
| » hoseInnerDiamInch | body | string¦null | false | Hose inner diameter (inches). |
| » flangeDiamInch | body | string¦null | false | Flange diameter (inches). |
| » maxPressurePsi | body | number(double)¦null | false | Max pressure in PSI. |
| » cutAllowanceInch | body | number(double)¦null | false | Cut allowance (inches). |
| » cutAllowancemm | body | number(double)¦null | false | Cut allowance (millimeters). |
| » hexSizemm | body | number(double)¦null | false | Hex size (mm). |
| » hexSizeNutmm | body | number(double)¦null | false | Nut hex size (mm). |
| » weightLbs | body | number(double)¦null | false | Weight (lbs). |
| » coneAngle | body | number(double)¦null | false | Cone angle (degrees). |
| » dropLengthInch | body | number(double)¦null | false | Drop length (inches). |
| » dropLengthmm | body | number(double)¦null | false | Drop length (millimeters). |
| » seatAngle | body | number(double)¦null | false | Seat angle (degrees). |
| » tubeOuterDiammm | body | number(double)¦null | false | Outer diameter of tube (mm). |
| » flangeThickness | body | number(double)¦null | false | Flange thickness. |
| » banjoInnerDiammm | body | number(double)¦null | false | Banjo inner diameter (mm). |
Enumerated Values
| Parameter | Value |
|---|---|
| » gender | male |
| » gender | female |
| » swivel | swivel |
| » forged | forged |
| » bulkhead | bulkhead |
Example responses
500 Response
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Internal Server Error"
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Newly created hose fitting. | None |
| 500 | Internal Server Error | Server error during lookup. | Inline |
Response Schema
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
