Knowledge Base

Paweł Kijko
Written by Paweł Kijko

JSON file

Information about the JSON file structure.


JSON offers file format

JSON file with offers data has the following format:

   {
       "update": string,
       "articles": {
           <article_id_1>: ArticleInfo,
           <article_id_2>: ArticleInfo,
           ...
       }
   }

Under 'update' key lies the date of last prices update for your account, in "YYYY-MM-DD" format (UTC time zone).

<article_id_1>, <article_id_2>, etc. keys, are internal identifiers of your articles in Dealavo system.

"ArticleInfo" object format

   {
       "id": int,
       "name": string,
       "offers" : [OfferInfo],
       "url": string,
       "ean": string,
       "producer": string,
       "product_code": string,
       "custom_1": string,
       "custom_2": string,
       "custom_3": string,
       "client_id": string,
       "dynamicPrice": [PriceInfo],
       "wholesale_price": float
   }

Meaning of keys:

  • "id" - Internal identifier of your article in Dealavo system
  • "name" - Name of your article
  • "offers" - List of shop offers selling your article
  • "url" - URL for your article
  • "ean" - EAN code of your article
  • "producer" - Name of producer of your article
  • "product_code" - Product code of your article
  • "custom_1" - Content of "Custom 1" column in Dealavo application (unavailable, unless you provided this information in an input file)
  • "custom_2" - Content of "Custom 2" column in Dealavo application (unavailable, unless you provided this information in an input file)
  • "custom_3" - Content of "Custom 3" column in Dealavo application (unavailable, unless you provided this information in an input file)
  • "client_id" - Content of "Id" column in Dealavo application
  • "dynamicPrice" - list of recommended prices (unavailable, unless you are using Dynamic Prices module)
  • "wholesale_price" - Wholesale price of your article

Mandatory keys are marked with bold font. The rest of parameters is only put if Dealavo can access a relevant information.

"OfferInfo" object format

   {
       "price": float,
       "offerName": string,
       "offerId": int,
       "source": int,
       "name": string,
       "shopUrl": string,
       "shopId": int,
       "rank: int,"availability": int,
       "seed": bool
   }

Mandatory keys are marked with bold font.

Meaning of keys:

  • "price" - offer price,
  • "offerName" - offer name,
  • "offerId" - internal identifier of an offer in Dealavo system,
  • "source" - offer source
  • 1 - Ceneo.pl
  • 2, 5, 7 - e-shop webpages
  • 3, 4 - your data input file
  • 6 - Allegro.pl
  • 8 - Amazon
  • 9 - other aggregators like marketplaces or price comparisons e.g. Google Shopping, Heureka, Idealo
  • "name" - name of a shop offering an article
  • "shopUrl" - url of a shop offering an article
  • "shopId" - internal identifier of a shop in Dealavo system
  • "rank" - rank of an offer in the ranking of competing offers
  • "availability" - information about an offer availability
  • 1 - available
  • 2 - not available
  • 3 - unknown
  • "seed" - bool flag indicating if it is your offer (only if you are an e-shop owner, this field is not visible for producers)

"dynamicPrice" object format

   {
       "channel": int,
       "price": float,
       "rule_id": int,
       "rule_name": string
   }

Meaning of keys:

  • "channel" - sales channel,
  • 1 - Ceneo.pl
  • 3 - e-shop
  • 6 - Allegro.pl
  • 8_2 - Amazon.de
  • 9_51 - Google Shopping PL
  • "price" - recommended price
  • "rule_id" - price rule id
  • "rule_name" - price rule name

Examples

Example JSON file for producer:

   {
       "update": "2015-12-10",
       "articles": {
           "12345": {
               "id": 12345,
               "name": "AwesomeProducer Armchair A5",
               "url": "http://awesome-producer.com/a5",
               "ean": "0123456789012",
               "producer": "AwesomeProducer",
               "product_code": "A5",
               "custom_1": "Your custom info about armchair",
               "client_id" "MY_INTERNAL_ID_1",
               "wholesale_price": 199.99,
               "offers": [
                   {
                       "price": 198.00,
                       "offerName": "AwesomeProducer Armchair A5 Buy now!",
                       "offerId": 23456,
                       "source": 1,
                       "name": "First Shop",
                       "shopUrl": "http://first-shop.com",
                       "shopId": 234, 
                       "rank": 1,
                       "availability": 1
                   },
                   {
                       "price": 201.99,
                       "offerName": "AwesomeProducer Armchair A5 very comfortable",
                       "offerId": 34567,
                       "source": 2,
                       "name": "Second Shop",
                       "shopUrl": "http://second-shop.com",
                       "shopId": 345, 
                       "rank": 2,
                       "availability": 3
                   },
               ]
           },
           "67890": {
               "id": 67890,
               "name": "OtherProducer Spoon S56",
               "url": "http://other-producer.com/s56",
               "ean": "0987654321098",
               "producer": "OtherProducer",
               "product_code": "S56",
               "custom_1": "Your custom info about spoon",
               "client_id": "MY_INTERNAL_ID_2",
               "wholesale_price": 2.99,
               "offers": [
                   {
                       "price": 201.99,
                       "offerName": "OtherProducer Spoon S56 aluminium",
                       "offerId": 45678,
                       "source": 2,
                       "name": "Second Shop",
                       "shopUrl": "http://second-shop.com",
                       "shopId": 345, 
                       "rank": 1,
                       "availability": 3
                   }
               ]
           }
       }
   }

Example JSON file for an e-shop owner, <account_id> = 345

{
       "update": "2015-12-10",
       "articles": {
           "12345": {
               "id": 12345,
               "name": "AwesomeProducer Armchair A5",
               "url": "http://awesome-producer.com/a5",
               "ean": "0123456789012",
               "producer": "AwesomeProducer",
               "product_code": "A5",
               "custom_1": "Your custom info about armchair",
               "client_id" "MY_INTERNAL_ID_1",
               "dynamicPrice": [
                     {
                         "channel": "2", 
                         "price": 198.00, 
                         "rule_id": "1", 
                         "rule_name": "rule1"
                     },
                     {
                         "channel": "1", 
                         "price": 198.00, 
                         "rule_id": "2", 
                         "rule_name": "rule2"
                     },
                     {
                         "channel": "6", 
                         "price": 198.00, 
                         "rule_id": "3", 
                         "rule_name": "rule3"
                     },
                     {
                         "channel": "9_51", 
                         "price": 198.00, 
                         "rule_id": "4", 
                         "rule_name": "rule4"
                     },
                 ]
               "offers": [
                     {
                         "price": 198.00,
                         "offerName": "AwesomeProducer Armchair A5 Buy now!",
                         "offerId": 23456,
                         "source": 1,
                         "name": "First Shop",
                         "shopUrl": "http://first-shop.com",
                         "shopId": 234, 
                         "rank": 1,
                         "availability": 1
                     },
                     {
                         "price": 201.99,
                         "offerName": "AwesomeProducer Armchair A5",
                         "offerId": 12345,
                         "source": 2,
                         "name": "Second Shop",
                         "shopUrl": "http://second-shop.com",
                         "shopId": 345, 
                         "rank": 2,
                         "availability": 3,
                         "seed": true
                     },
                 ]
             },
             "67890": {
                 "id": 67890,
                 "name": "OtherProducer Spoon S56",
                 "url": "http://other-producer.com/s56",
                 "ean": "0987654321098",
                 "producer": "OtherProducer",
                 "product_code": "S56",
                 "custom_1": "Your custom info about spoon",
                 "client_id": "MY_INTERNAL_ID_2",
                 "dynamicPrice": [
                     {
                         "channel": "2", 
                         "price": 198.00, 
                         "rule_id": "1", 
                         "rule_name": "rule1"
                     },
                     {
                         "channel": "1", 
                         "price": 198.00, 
                         "rule_id": "2", 
                         "rule_name": "rule2"
                     },
                     {
                         "channel": "6", 
                         "price": 198.00, 
                         "rule_id": "3", 
                         "rule_name": "rule3"
                     },
                     {
                         "channel": "9_51", 
                         "price": 198.00, 
                         "rule_id": "4", 
                         "rule_name": "rule4"
                     },
                 ]
                 "offers": [
                     {
                         "price": 201.99,
                         "offerName": "OtherProducer Spoon S56",
                         "offerId": 67890,
                         "source": 2,
                         "name": "Second Shop",
                         "shopUrl": "http://second-shop.com",
                         "shopId": 345, 
                         "rank": 1,
                         "availability": 3,
                         "seed": true
                     }
                 ]
             }
         }
     }


Categories:

They trusted us