/brand/{brandId}/update 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:
Brands
postBrandIdUpdate
Code samples
const inputBody = '{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the brand."
},
"available": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand is available."
},
"hoses": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes hoses."
},
"adaptors": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes adaptors."
},
"wraps": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes wraps."
},
"otherItems": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes other items."
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/brand/{brandId}/update',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /brand/{brandId}/update
Update a brand
Updates a brand
Body parameter
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "The name of the brand."
},
"available": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand is available."
},
"hoses": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes hoses."
},
"adaptors": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes adaptors."
},
"wraps": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes wraps."
},
"otherItems": {
"type": "boolean",
"nullable": true,
"description": "Indicates if the brand includes other items."
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| brandId | path | string(mongo-id) | true | The MongoDB ID of the brand. |
| body | body | object | true | none |
| » name | body | string | true | The name of the brand. |
| » available | body | boolean¦null | false | Indicates if the brand is available. |
| » hoses | body | boolean¦null | false | Indicates if the brand includes hoses. |
| » adaptors | body | boolean¦null | false | Indicates if the brand includes adaptors. |
| » wraps | body | boolean¦null | false | Indicates if the brand includes wraps. |
| » otherItems | body | boolean¦null | false | Indicates if the brand includes other items. |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | the updated brand | None |
| 500 | Internal Server Error | Server error | string |
