/hoseassemblies/parsefeedback 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:
Hose Assembly
postHoseAssembliesParseFeedback
Code samples
const inputBody = '{
"type": "object",
"properties": {
"params": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "Optional ID of an existing parsed hose assembly."
},
"parseText": {
"type": "string",
"description": "Original text input that was parsed."
},
"comments": {
"type": "string",
"description": "User-provided comments."
},
"goodMatch": {
"type": "boolean"
},
"badMatch": {
"type": "boolean"
},
"hose": false,
"end1": false,
"end2": false,
"length": false,
"lengthUnit": false,
"definedByCutLength": false,
"cutLengthEntered": false,
"maxPressurePsi": false,
"brand": false
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/hoseassemblies/parsefeedback',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /hoseassemblies/parsefeedback
Submit feedback on a parsed hose assembly
Submits user feedback on a parsed hose assembly. If an _id is provided, the feedback is applied to an existing record. Otherwise, a new record is created. The feedback includes match accuracy flags and optional correction suggestions.
Body parameter
{
"type": "object",
"properties": {
"params": {
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "Optional ID of an existing parsed hose assembly."
},
"parseText": {
"type": "string",
"description": "Original text input that was parsed."
},
"comments": {
"type": "string",
"description": "User-provided comments."
},
"goodMatch": {
"type": "boolean"
},
"badMatch": {
"type": "boolean"
},
"hose": false,
"end1": false,
"end2": false,
"length": false,
"lengthUnit": false,
"definedByCutLength": false,
"cutLengthEntered": false,
"maxPressurePsi": false,
"brand": false
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » params | body | object | false | none |
| »» _id | body | string | false | Optional ID of an existing parsed hose assembly. |
| »» parseText | body | string | false | Original text input that was parsed. |
| »» comments | body | string | false | User-provided comments. |
| »» goodMatch | body | boolean | false | none |
| »» badMatch | body | boolean | false | none |
| »» hose | body | any | false | none |
| »» end1 | body | any | false | none |
| »» end2 | body | any | false | none |
| »» length | body | any | false | none |
| »» lengthUnit | body | any | false | none |
| »» definedByCutLength | body | any | false | none |
| »» cutLengthEntered | body | any | false | none |
| »» maxPressurePsi | body | any | false | none |
| »» brand | body | any | false | none |
Example responses
500 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Feedback saved successfully | None |
| 400 | Bad Request | Invalid input | None |
| 401 | Unauthorized | Unauthorized | None |
| 500 | Internal Server Error | Server error | string |
