Inventory Update (Retail)

To support changes to item availability, Deliverect can receive an inventory file.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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 signedUrl with all the headers provided
  • Deliverect will then process the CSV asynchronously and callback to the provided callbackUrl when the CSV file has been fully processed.
ā“˜ Headers Required

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

ParameterDescription
callbackUrlAn optional URL where we'll send a completion event when Inventory CSV is 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

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 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
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
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
In-store PriceAn alternative price referenced by some channelsInteger
Tax RateUnique taxation rate, if different from Items import dataInteger
Conversion RateThe 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 QuantityMinimum quantity to be ordered (see Bundles in Item Import)Integer
Maximum QuantityMaximum quantity to be ordered (see Bundles in Item ImportInteger
DepositAn alternative deposit price can be set from the Items ImportInteger
ā“˜ Required Data

Please note that all the fields marked with * are required.

Location Example File

ā–¶ Download Example CSV

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.

ā–¶ Download Example CSV

ā“˜ Upload Behaviour
Each file transferred can include complete or partial updates to inventory in one or more locations or location groups.
Path Params
string
required
Body Params
string

Will be used to notify you when the inventory file has been processed.

Headers
string
required
Defaults to retail
Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json