/warehouses/export 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:
Warehouses
postWarehouseExport
Code samples
const inputBody = '{
"type": "object",
"properties": {
"warehouses": {
"type": "array",
"items": {
"type": "string",
"format": "ObjectId"
}
},
"selectAll": {
"type": "boolean"
},
"search": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://goldleaf.app/api/v1/warehouses/export',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /warehouses/export
Export selected warehouses
Exports warehouses to a file. Admin-only access.
Body parameter
{
"type": "object",
"properties": {
"warehouses": {
"type": "array",
"items": {
"type": "string",
"format": "ObjectId"
}
},
"selectAll": {
"type": "boolean"
},
"search": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » warehouses | body | [string] | false | none |
| » selectAll | body | boolean | false | none |
| » search | body | object | false | none |
| »» name | body | string | false | none |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Warehouses exported successfully. | None |
| 400 | Bad Request | Validation error. | None |
| 401 | Unauthorized | Unauthorized. | None |
| 403 | Forbidden | Forbidden. | None |
| 500 | Internal Server Error | Server error. | None |
