/organization/wraps 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
organizationWraps
Code samples
const headers = {
Accept: "application/json",
Authorization: {
type: "string",
},
};
fetch("https://goldleaf.app/api/v1/organization/wraps", {
method: "GET",
headers: headers,
})
.then(function (res) {
return res.json();
})
.then(function (body) {
console.log(body);
});
GET /organization/wraps
Retrieve a list of organization 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 wraps by wrap type |
| colour | query | string | false | Filter wraps by colour |
| search.partNumber | query | string | false | Search wraps by part number |
| search.orgPartNumber | query | string | false | Search wraps by organization part number |
| search.brand | query | string | false | Search wraps by brand |
| search.wrapType | query | string | false | Search wraps by wrap type |
| search.colour | query | string | false | Search wraps by colour |
| hoseId | query | string | false | Filter wraps by hose ID (MongoDB ObjectId) |
| customerId | query | string | false | Filter wraps by customer ID (MongoDB ObjectId) |
| hideUnavailable | query | boolean | false | Hide unavailable wraps (boolean) |
| hideUnavailableBrands | query | boolean | false | Hide unavailable brands (boolean) |
| includeCustom | query | boolean | false | Include custom wraps (boolean) |
| page | query | integer | false | Page number for pagination |
| limit | query | integer | false | Number of items per page for pagination |
Example responses
200 Response
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": false
},
"pagination": {
"type": "object",
"properties": {
"total": {
"type": "integer"
},
"page": {
"type": "integer"
},
"limit": {
"type": "integer"
}
}
}
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A list of organization wraps | Inline |
| 400 | Bad Request | Invalid query parameters | None |
| 401 | Unauthorized | Unauthorized | None |
Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » data | array | false | none | none |
| »» anonymous | any | false | none | none |
| » pagination | object | false | none | none |
| »» total | integer | false | none | none |
| »» page | integer | false | none | none |
| »» limit | integer | false | none | none |
