/inventory/import 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:
Inventory
postInventoryImport
Code samples
const inputBody = '{
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "Excel file containing inventory data"
}
}
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/inventory/import',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /inventory/import
Bulk import inventory items via Excel file
Allows admin users to upload an Excel file to import or update multiple inventory items in bulk.
Body parameter
type: object
properties:
file:
type: string
format: binary
description: Excel file containing inventory data
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » file | body | string(binary) | false | Excel file containing inventory data |
Example responses
401 Response
{
"type": "string"
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 401 | Unauthorized | Unauthorized – Missing or invalid authentication | string |
| 500 | Internal Server Error | Internal server error | string |
