/organization/customwraps 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
getOrganizationCustomWraps
Code samples
const headers = {
Accept: "application/json",
Authorization: {
type: "string",
},
};
fetch("https://goldleaf.app/api/v1/organization/customwraps", {
method: "GET",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
GET /organization/customwraps
Retrieve a list of organization custom wraps with optional filters and pagination
Retrieves a specific wrap by ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer token for authorization |
| wrapType | query | string | false | Filter custom wraps by wrap type |
| colour | query | string | false | Filter custom wraps by colour |
| search.partNumber | query | string | false | Search custom wraps by part number |
| search.brand | query | string | false | Search custom wraps by brand |
| search.size | query | string | false | Search custom wraps by size |
| search.orgPartNumber | query | string | false | Search custom wraps by organization part number |
| search.wrapType | query | string | false | Search custom wraps by wrap type |
| search.colour | query | string | false | Search custom wraps by colour |
| hoseId | query | string | false | Filter custom wraps by hose ID (MongoDB ObjectId) |
| customerId | query | string | false | Filter custom wraps by customer ID (MongoDB ObjectId) |
| hideUnavailable | query | boolean | false | Hide unavailable custom wraps |
| hideUnavailableBrands | query | boolean | false | Hide unavailable brands |
| page | query | integer | false | Page number for pagination |
| limit | query | integer | false | Number of items per page |
Example responses
500 Response
{
"type": "object",
"properties": {
"items": {
"type": "array",
"description": "List of wrap objects",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"image": {
"type": "string",
"nullable": true
}
}
}
},
"total": {
"type": "integer"
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of organization custom wraps | None |
| 500 | Internal Server Error | none | Inline |
Response Schema
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » items | [object] | false | none | List of wrap objects |
| »» name | string | false | none | none |
| »» image | string¦null | false | none | none |
| » total | integer | false | none | none |
