To support changes to item availability, Deliverect can receive an inventory file.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests⦠| |||
Purpose
The method to transfer an Inventory CSV file allows the following;
- Defining product ranging per Location / Location_Group
- Defining pricing strategy per Location / Location_Group and Channel
- Updating stock count per Location
- Updating stock status (
IN_STOCK/OUT_OF_STOCK)
Method
To process Inventory updates, a two step process is required to first request a signed URL via Google Cloud Services (GCS) to then submit a CSV file of Inventory data via PUT request.
1.Request a Signed URL
Sending a request to this endpoint with a callbackUrl will return a signedUrl from GCS with specific headers.
2.Submit .csv file via PUT Request
Once a signedUrl is retrieved, the Inventory update process is as follows;
- Your Inventory .csv file should be submitted via a PUT request to the
signedUrlwith all the headers provided - Deliverect will then process the CSV asynchronously and callback to the provided
callbackUrlwhen the CSV file has been fully processed.
Please ensure that all the headers returned from the signed URL request are included within the PUT request
Example PUT Request
curl -X PUT 'https://storage.googleapis.com/cicd-signed-url/inventory.csv?x-goog-signature=13d**5b3&x-goog-algorithm=GOOG4-RSA-SHA256&x-goog-credential=signed-url-poc%40test-demo-410111.iam.gserviceaccount.com%2F20240223%2Fasia-south1%2Fstorage%2Fgoog4_request&x-goog-date=20240223T080312Z&x-goog-expires=86400&x-goog-signedheaders=content-type%3Bhost'\\
-H "Content-Type: text/csv" \\
-H "X-goog-meta-callback: https://example.com/inventoryCallback"
--upload-file inventory.csv \\
Callback Response
{
"file_id": "a420*******************************725b",
"status": "success"
}{
"file_id": "d0f7*******************************d278",
"status": "error",
"errors":
[
"No products found in the file. Please check the file and try again."
]
}Glossary
| Parameter | Description |
|---|---|
callbackUrl | An optional URL where we'll send a completion event when Inventory CSV is fully imported |
signedUrl | Once the signed URL is created, it is valid for 15 minutes. This means that you have up to 15 minutes to initiate an upload via POST of the CSV to this endpoint. For more information please read: https://cloud.google.com/storage/docs/access-control/signed-urls |
fileId | Included in the callbackUrl as a unique identifier to the inventory upload request |
Inventory Format
Two formats of importing inventory are available; by Location of by Location Group which allow item pricing and availability to be set.
Channel Specific Pricing/Availability
Within either format, each channel can be set with a unique price or availability status (ranging), by adding column headers as follows (see also CSV examples below)
Channel Specific Price
channel.(channel name as set on Deliverect).Price
Channel Availability Status (ranging)
channel.(channel name as set on Deliverect).Status
Import Glossary
| Column Header | Description | Type |
|---|---|---|
| Location * | A single retail store referenced by it's name e.g. 'Central Station Store' | String |
| Location Group | As alternative to a single retail store, location groups can reference a tag assigned as in guide here) | String |
| PLU * | Unique identifier of a product | String |
| Channel | The ordering platform can be specified to assign unique pricing, status or stock status | String |
| Aisle | A reference to the store planogram where the specific item is located | String |
| Price | The price set at the level of specificity of Location or Location Group or Channel (where empty, the "Base Price" imported via Items file will be used) e.g. if the item's price is 1ā¬, input 1 | Float |
| Status | A status of ACTIVE/INACTIVE can manage long term stock availability of items | Enum |
| Stock | Current stock quantity of an item | Integer |
| Stock Status | Marking IN_STOCK / OUT_OF_STOCK controls online item availability | String |
| In-store Price | An alternative price referenced by some channels | Integer |
| Tax Rate | Unique taxation rate, if different from Items import data | Integer |
| Conversion Rate | The multiplier for āPriceā and āPrice Unitā which allows ordering platforms to determine the price and weight of one āSell Unitā, (relevant only when items are priced by weight and sold by the unit) | Integer |
| Minimum Quantity | Minimum quantity to be ordered (see Bundles in Item Import) | Integer |
| Maximum Quantity | Maximum quantity to be ordered (see Bundles in Item Import | Integer |
| Deposit | An alternative deposit price can be set from the Items Import | Integer |
Please note that all the fields marked with * are required.
Location Example File
Location Group Example File
NB: If specifying pricing and ranging for a group of locations by tag e.g. 'CITY', 'FRANCHISE' etc, each individual store's 'Stock' and 'Stock Status' won't be accounted for so should be sent separately per location.
Each file transferred can include complete or partial updates to inventory in one or more locations or location groups.