To support large product ranges common to the retail sector, Deliverect can receive an Item file for upload.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Purpose
To process a complete update of all item data, a two step process is required to first request a signed URL via Google Cloud Services (GCS) and then to submit a CSV file with all item data via PUT request
Method
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 Item upload process is as follows;
- Your Item .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 are included within the PUT request
Example PUT Request
curl --location --request PUT 'https://storage.googleapis.com/cicd-signed-url/items.csv?x-goog-signature=13d3&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%3Bx-goog-meta-callback%3Bx-goog-meta-user' \
--header 'Content-Type: text/csv' \
--header 'Host: storage.googleapis.com' \
--header 'x-goog-meta-callback: https://example.com/itemsCallback' \
--header 'x-goog-meta-user: your-user-id' \
--header 'x-goog-content-sha256: UNSIGNED-PAYLOAD' \
--data-binary '@items.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."
]
}Parameters
| Parameter | Description |
|---|---|
callbackUrl | An optional URL where we'll send a completion event when items 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 item upload request |
Item CSV Format
A single Item CSV is expected with below showing a complete example. This file can include the additional columns allowing Bundles and Translateable elements to be specified, which are shown in specific sample files below;
Item Groups
The CSV supports two types of item grouping for Deals (selection of bundled products) and Modifier Groups (list of modifier options)
| Group Type | Purpose |
|---|---|
| Bundles | Create fixed-price offers such as meal deals or combo meals that group multiple products together. Products included in a deal are typically priced at zero within the bundle, with the overall price defined by the deal itself. |
| Modifier Groups | Allow customers to customise products by selecting from a set of modifiers, such as flavour or colour selection |
Product Types
Item groups are configured using values in the Product Type column.
| Product Type | Description | Required Columns |
|---|---|---|
DEAL | The parent bundle product that defines the overall offer and price. | - A unique PLU- A Base Price (the fixed bundle price)- A comma-separated list of DEALSECTION PLUs in Sub Items |
DEALSECTION | A selection group within a deal, such as "Choose your starter". | - A unique PLU- A comma-separated list of product PLUs in Sub Items (products must already exist in the CSV) |
PRODUCT | A standard product item. | This is the default item type and only needs to be specified when linking products to a deal. |
MODIFIER | A selectable customisation option for a product. | Typically represents a choice or add-on rather than a physical item. |
MODIFIER_GROUP | A collection of related modifiers presented as a selection group. | Used to organise and control modifier selections. |
Selection Rules
Rules can be applied to both DEALSECTION and MODIFIER_GROUP records to control how customers make selections.
| Column Name | Purpose |
|---|---|
| Minimum Selection | The minimum number of options that must be selected from the group. |
| Maximum Selection | The maximum number of options that can be selected from the group. |
| Minimum Quantity | The minimum quantity allowed for any individual option within the group. |
| Maximum Quantity | The maximum quantity allowed for any individual option within the group. |
These rules can be combined to enforce required selections, limit customer choices, and control the quantity of individual items or modifiers that can be added.
Translations
The translatable elements for products are "Name" & "Description" and should be added as seperate columns with an ISO-639-1 language code appended e.g. Name.fr / Description.fr language codes supported listed in the link below;
CSV Data - Glossary
Please note that all the fields marked with * are required.
| Column Header | Description | Format |
|---|---|---|
Category 1* | Up to three levels of categorisation Category name must be unique across the whole Item file i.e. same exact name cannot be used in Category 1 and Category 2 | String |
Category 2* | Certain aggregators might require a second category to be defined. | String |
Category 3 | String | |
Name* | Legal name of item | String |
PLU* | Unique identifier for a product | String |
Base Price* | The cost of the item defined by an integer . e.g. €5.50 euros is expressed without currency as 5.50 | Float |
GTINs* | Comma separated list of unique identifier (equivalent to EAN) | List of Strings |
Tax Rate* | Percentage sales tax rate for item e.g. 21 corresponds to 21% | Integer |
Product type | "product", "deal", "dealsection" , "modifier","modifier_group"Modifier/Modifier groups * Modifiers and modifier groups are required to add options within a regular product Deal/Deal sections * Deal and deal section are required to insert bundles/ meal deals | String |
Sub Items | PLU of the subItems Modifier/Modifier groups At "product" level it represents the PLUs of the modifier groups. At "modifier group" level it represents the item PLUs of the "modifier". * Required to insert modifiers/ modifier groups Deal/Deal sections At "deal" level it represents the PLUs of the deal sections. At "dealsection" level it represents the item PLUs which should be a regular "product" type. * Required to insert bundles/ meal deals | String |
Minimum selection | Minimum number of products which can be selected on a deal. *Required when "dealsections" are provided. | Integer |
Maximum selection | Maximum number of products which can be selected on a deal. *Required when "dealsections" are provided. | Integer |
Maximum Quantity | It defines how many times can the same subItem be chosen.A value of '2' for example, means that each item in a group can be selected at most 2 times. | Integer |
Description | Product description | String |
Manufacturer Name | Food business operator name | String |
Manufacturer Address | Food business operator address | String |
Manufacturer Brand | Food business operator brand name | String |
Weight | Mandatory if "Weight Unit" column is filled in | Integer |
Weight Unit | Case sensitive - mandatory if "Weight" column is filled in | g, kg, mg, lb, oz |
Volume | Mandatory if "Volume Unit" column is filled in | Integer |
Volume Unit | Case sensitive - mandatory if "Volume" column is filled in | L, mL, gal, pt, oz |
Dimension Unit | Measure for product dimension | m, cm, mm, in, ft, yd |
Width | Float with 2 decimal digits e.g. 2.50 | Float |
Height | Float with 2 decimal digits e.g. 12.50 | Float |
Length | Float with 2 decimal digits e.g. 5.50 | Float |
Sell Unit | The measurement of the item as purchased e.g. A 500g pack of rice) → Sell Unit: g | un, g, kg, pd, oz |
Price Unit | The standard measurement of the item e.g. Cheese at $2.50 per 100 g | un, g, kg, pd, oz |
Net Quantity Unit | "volume unit" , "weight unit" or "ea". "ea" refers to "each unit". | L, mL, gal, pt, oz, g, kg, mg, lb, oz or ea |
Net Quantity | Float with 2 decimal digits | Float |
Energy | Without decimals | Integer |
Energy Unit | Case sensitive | kJ, kcal |
Product Traits | Includes allergens and other product tags, the list of accepted traits and their ENUM value here | Enum List |
Image Links | Cloud hosted image URL separated by a comma (if multiple). See section here for more details | String |
Program Eligibility | Accepted values : SNAP, HSA, FSA | List of Strings |