post https://api.staging.deliverect.io/catalog/accounts//inventoryUploadUrl
To support changes to item availability, Deliverect can receive an inventory file.
This API allows performing the following actions
- Defining which items belong to each location or location_group
PLU * , Location or Location_Group * - Defining stock count - Optional
Stock - Marking products out of Stock
Stock Status, Status
As an alternative method, the Marking products out of stock by PLU API can be used instead. - Defining different prices per location/aggregator.
Request a Signed URL
Sending a request to this endpoint with a callbackUrl
will return a signedUrl
and specific headers.
Parameter | Description |
---|---|
callbackUrl | The URL where we'll send a completion event when CSV 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 |
Submit .csv with PUT Request
The Inventory upload process is then two step;
- Your Inventory .csv file should be submitted via a PUT request to the
signedUrl
with the headers provided - Deliverect will then process the CSV asynchronously and callback to the provided URL when the CSV file has been fully processed.
curl -X PUT \
-H "Content-Type: text/csv" \
-H "X-goog-meta-callback: https://example.com/inventoryCallback"
--upload-file inventory.csv \
'https://storage.googleapis.com/cicd-signed-url/inventory.csv?x-goog-signature=13d72c0e3147d2127c65a3ddd7853835139d0f28208298d3f5298ac31ea12d1977ea65b4a40deb5aa86db0ab698dbb4cc7950b620835636d10b5367ea4f6af68c82c1e2287488e13247853ab51312159a9a299a57fcf482c402975de376d2455d04bd2a0c24293da9e24c8e16de10f2b914a6e140baff024563911ccb7c7482c05766c48169bb1ee81d044560949d04670b3c6e03b7462964251944e75f0380535a13b1889c8b5b78b7fb29f292854b6c63b373ba903bb4addd87ec1ecc2af98d7ab787da5bf57625ca3066658a3aa7a05b6dce7640730b248cc579c4a1a1db8b905a883efa6a14bcf3732f7ed3e1af254f051e624ffc770bc12ebcc5a15f5b3&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'
Inventory .csv Formats
The inventory file can specify the following;
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 |
Location Inventory Examples
Depending on the use case and requirements for e.g. price specificity per channel, one of the following formats can be used
ⓘ Upload Behaviour
Each file transferred can include complete or partial updates to products in one or more location or location groups.
Each file transferred can include complete or partial updates to products in one or more location or location groups.