/ferrules/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:
Ferrules
postFerrulesCreate
Code samples
const inputBody = '{
"type": "object",
"required": [
"partNumber",
"brand",
"size"
],
"properties": {
"partNumber": {
"type": "string",
"description": "The part number, must be a non-empty string."
},
"brand": {
"type": "string",
"description": "The brand of the part, must be a non-empty string."
},
"size": {
"type": "string",
"description": "The size of the part, must be a non-empty string.",
"example": "8"
},
"description": {
"type": "string",
"description": "The description of the part, optional and can be nullable.",
"nullable": true
},
"material": {
"type": "string",
"description": "The material of the part, optional and can be nullable.",
"nullable": true
},
"series": {
"type": "string",
"description": "The series of the part, optional and can be nullable.",
"nullable": true
},
"spec": {
"type": "string",
"description": "The specification of the part, optional and can be nullable.",
"nullable": true
},
"imageName": {
"type": "string",
"description": "The image name of the part, optional and can be nullable.",
"nullable": true
},
"weightLbs": {
"type": "number",
"format": "decimal",
"description": "The weight of the part in pounds, optional and can be nullable.",
"nullable": true
},
"diametermm": {
"type": "number",
"format": "decimal",
"description": "The diameter of the part in millimeters, optional and can be nullable.",
"nullable": true
},
"lengthmm": {
"type": "number",
"format": "decimal",
"description": "The length of the part in millimeters, optional and can be nullable.",
"nullable": true
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/ferrules/create',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /ferrules/create
Create a ferrule
Creates a new ferrule for the organization with the given properties.
Body parameter
{
"type": "object",
"required": ["partNumber", "brand", "size"],
"properties": {
"partNumber": {
"type": "string",
"description": "The part number, must be a non-empty string."
},
"brand": {
"type": "string",
"description": "The brand of the part, must be a non-empty string."
},
"size": {
"type": "string",
"description": "The size of the part, must be a non-empty string.",
"example": "8"
},
"description": {
"type": "string",
"description": "The description of the part, optional and can be nullable.",
"nullable": true
},
"material": {
"type": "string",
"description": "The material of the part, optional and can be nullable.",
"nullable": true
},
"series": {
"type": "string",
"description": "The series of the part, optional and can be nullable.",
"nullable": true
},
"spec": {
"type": "string",
"description": "The specification of the part, optional and can be nullable.",
"nullable": true
},
"imageName": {
"type": "string",
"description": "The image name of the part, optional and can be nullable.",
"nullable": true
},
"weightLbs": {
"type": "number",
"format": "decimal",
"description": "The weight of the part in pounds, optional and can be nullable.",
"nullable": true
},
"diametermm": {
"type": "number",
"format": "decimal",
"description": "The diameter of the part in millimeters, optional and can be nullable.",
"nullable": true
},
"lengthmm": {
"type": "number",
"format": "decimal",
"description": "The length of the part in millimeters, optional and can be nullable.",
"nullable": true
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » partNumber | body | string | true | The part number, must be a non-empty string. |
| » brand | body | string | true | The brand of the part, must be a non-empty string. |
| » size | body | string | true | The size of the part, must be a non-empty string. |
| » description | body | string¦null | false | The description of the part, optional and can be nullable. |
| » material | body | string¦null | false | The material of the part, optional and can be nullable. |
| » series | body | string¦null | false | The series of the part, optional and can be nullable. |
| » spec | body | string¦null | false | The specification of the part, optional and can be nullable. |
| » imageName | body | string¦null | false | The image name of the part, optional and can be nullable. |
| » weightLbs | body | number(decimal)¦null | false | The weight of the part in pounds, optional and can be nullable. |
| » diametermm | body | number(decimal)¦null | false | The diameter of the part in millimeters, optional and can be nullable. |
| » lengthmm | body | number(decimal)¦null | false | The length of the part in millimeters, optional and can be nullable. |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | the newly created ferrule | None |
| 500 | Internal Server Error | Server error | string |
