Inventory Update

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.

ParameterDescription
callbackUrlThe URL where we'll send a completion event when CSV fully imported
signedUrlOnce 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
fileIdIncluded 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 signedUrlwith 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 HeaderDescriptionType
Location * A single retail store referenced by it's name e.g. 'Central Station Store'String
Location GroupAs alternative to a single retail store, location groups can reference a tag assigned as in guide here)String
PLU * Unique identifier of a productString
ChannelThe ordering platform can be specified to assign unique pricing, status or stock statusString
AisleA reference to the store planogram where the specific item is locatedString
PriceThe 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
StatusA status of ACTIVE/INACTIVE can manage long term stock availability of itemsEnum
StockCurrent stock quantity of an itemInteger
Stock StatusMarking IN_STOCK / OUT_OF_STOCK controls online item availabilityString

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.

1.Single Location File

▶ Download Example CSV

2.Location Group File

▶ Download Example CSV

3.Channel Specific File

▶ Download Example CSV
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!