/wraps/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:
Wraps
postWrapsCreate
Code samples
const inputBody = '{
"type": "object",
"required": [
"partNumber",
"brand",
"wrapType",
"innerDiamInch"
],
"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."
},
"wrapType": {
"type": "string",
"description": "The wrap type of the part, must be a non-empty string."
},
"innerDiamInch": {
"type": "number",
"format": "decimal",
"description": "The inner diameter in inches, must be a non-empty decimal."
},
"imageName": {
"type": "string",
"description": "The image name associated with the part.",
"nullable": true
},
"description": {
"type": "string",
"description": "The description of the part.",
"nullable": true
},
"colour": {
"type": "string",
"description": "The color of the part.",
"nullable": true
},
"series": {
"type": "string",
"description": "The series of the part.",
"nullable": true
},
"spec": {
"type": "string",
"description": "The specification of the part.",
"nullable": true
},
"material": {
"type": "string",
"description": "The material of the part.",
"nullable": true
},
"temperatureRange": {
"type": "string",
"description": "The temperature range of the part.",
"nullable": true
},
"generalApplications": {
"type": "string",
"description": "The general applications of the part.",
"nullable": true
},
"itemCode": {
"type": "string",
"description": "The item code of the part.",
"nullable": true
},
"outerDiamInch": {
"type": "number",
"format": "decimal",
"description": "The outer diameter in inches.",
"nullable": true
},
"wallThicknessInch": {
"type": "number",
"format": "decimal",
"description": "The wall thickness in inches.",
"nullable": true
},
"pitchInch": {
"type": "number",
"format": "decimal",
"description": "The pitch in inches.",
"nullable": true
},
"WeightLbs": {
"type": "number",
"format": "decimal",
"description": "The weight in pounds.",
"nullable": true
},
"itemId": {
"type": "string",
"format": "mongo-id",
"description": "The MongoDB ID of the item, optional and can be nullable.",
"nullable": true
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/wraps/create',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /wraps/create
Create a wrap
Creates a wrap for the organization.
Body parameter
{
"type": "object",
"required": ["partNumber", "brand", "wrapType", "innerDiamInch"],
"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."
},
"wrapType": {
"type": "string",
"description": "The wrap type of the part, must be a non-empty string."
},
"innerDiamInch": {
"type": "number",
"format": "decimal",
"description": "The inner diameter in inches, must be a non-empty decimal."
},
"imageName": {
"type": "string",
"description": "The image name associated with the part.",
"nullable": true
},
"description": {
"type": "string",
"description": "The description of the part.",
"nullable": true
},
"colour": {
"type": "string",
"description": "The color of the part.",
"nullable": true
},
"series": {
"type": "string",
"description": "The series of the part.",
"nullable": true
},
"spec": {
"type": "string",
"description": "The specification of the part.",
"nullable": true
},
"material": {
"type": "string",
"description": "The material of the part.",
"nullable": true
},
"temperatureRange": {
"type": "string",
"description": "The temperature range of the part.",
"nullable": true
},
"generalApplications": {
"type": "string",
"description": "The general applications of the part.",
"nullable": true
},
"itemCode": {
"type": "string",
"description": "The item code of the part.",
"nullable": true
},
"outerDiamInch": {
"type": "number",
"format": "decimal",
"description": "The outer diameter in inches.",
"nullable": true
},
"wallThicknessInch": {
"type": "number",
"format": "decimal",
"description": "The wall thickness in inches.",
"nullable": true
},
"pitchInch": {
"type": "number",
"format": "decimal",
"description": "The pitch in inches.",
"nullable": true
},
"WeightLbs": {
"type": "number",
"format": "decimal",
"description": "The weight in pounds.",
"nullable": true
},
"itemId": {
"type": "string",
"format": "mongo-id",
"description": "The MongoDB ID of the item, 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. |
| » wrapType | body | string | true | The wrap type of the part, must be a non-empty string. |
| » innerDiamInch | body | number(decimal) | true | The inner diameter in inches, must be a non-empty decimal. |
| » imageName | body | string¦null | false | The image name associated with the part. |
| » description | body | string¦null | false | The description of the part. |
| » colour | body | string¦null | false | The color of the part. |
| » series | body | string¦null | false | The series of the part. |
| » spec | body | string¦null | false | The specification of the part. |
| » material | body | string¦null | false | The material of the part. |
| » temperatureRange | body | string¦null | false | The temperature range of the part. |
| » generalApplications | body | string¦null | false | The general applications of the part. |
| » itemCode | body | string¦null | false | The item code of the part. |
| » outerDiamInch | body | number(decimal)¦null | false | The outer diameter in inches. |
| » wallThicknessInch | body | number(decimal)¦null | false | The wall thickness in inches. |
| » pitchInch | body | number(decimal)¦null | false | The pitch in inches. |
| » WeightLbs | body | number(decimal)¦null | false | The weight in pounds. |
| » itemId | body | string(mongo-id)¦null | false | The MongoDB ID of the item, optional and can be nullable. |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | the newly created item | None |
| 500 | Internal Server Error | none | string |
