Product catalog in JSON format

To add a JSON product catalog to Lessy, prepare an upload file in one of the following types:

Pass the link to the upload file to Lessy via the feedback form.

Recommendations for working with JSON upload files

Using the JSON format, you can create multiple promotion product catalogs that have different validity periods or are valid in different regions.

  • In one upload file, you can pass multiple catalogs that have different validity periods or are valid in different regions.

  • The upload file can contain catalogs that are currently active or will become active in the near future. In this case, our moderators will check the catalog in advance, and it will be displayed in the app after its start date.

  • The upload file might contain an expired catalog. However, this increases the file size and requires more computing resources to process it.

  • To edit an existing catalog or add a new one, follow the recommendations in Editing or adding the product catalog.

    Important

    If you pass an upload file that contains a catalog with the same ID (the id parameter) and different offers before the existing catalog expires, the existing catalog will be overwritten. The Lessy app will display the latest uploaded catalog version.

Requirements for the JSON file

  • The file must have the UTF-8 encoding.
  • If parameter values have quotation marks, escape them using a backslash: \".
  • The file shouldn't contain any syntax errors. You can check the syntax in any JSON validator, such as https://jsonlint.com/.

You can check whether the data format is valid on the Validator page. To get access rights for the page, contact us via the feedback form.

File structure

A JSON upload file contains 3 key elements:

{
  "catalogs": [
    Elements that describe promotion product catalogs.
  ],
  "offers": [
    Elements that describe promotion products.
  ],
  "version": 2
}

Parameter

Type

Description

Required

catalogs

array of objects

List of catalogs with promotion goods.

Yes

offers

array of objects

The list of promotion products contained in the catalogs.

Yes

version

int

Data format version in the upload file.

Acceptable value: 2.

Yes

Contact support