/hoses/sizes 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
getHosesSizes
Code samples
const inputBody = '{
"type": "object",
"required": [
"params"
],
"properties": {
"params": {
"type": "object",
"required": [
"brand"
],
"properties": {
"brand": {
"type": "string",
"description": "The brand of the hose to filter sizes by.",
"example": "Parker"
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hoses/sizes',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hoses/sizes
Gets the sizes of hoses available for a given brand
Retrieves a sorted list of distinct nominal hose sizes for the specified brand and organization.
Body parameter
{
"type": "object",
"required": ["params"],
"properties": {
"params": {
"type": "object",
"required": ["brand"],
"properties": {
"brand": {
"type": "string",
"description": "The brand of the hose to filter sizes by.",
"example": "Parker"
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » params | body | object | true | none |
| »» brand | body | string | true | The brand of the hose to filter sizes by. |
Example responses
200 Response
{
"type": "array",
"items": {
"type": "string"
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A sorted array of nominal hose sizes | Inline |
| 401 | Unauthorized | Unauthorized – invalid or inaccessible brand | Inline |
| 500 | Internal Server Error | Server error | Inline |
Response Schema
Status Code 401
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
| » details | string¦null | false | none | none |
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » message | string | false | none | none |
| » details | string¦null | false | none | none |
