If you need more detailed information, we encourage you to refer to the official technical documentation available at the following link:
https://app.dealavo.com/api/v3/docs
You can find the API key (api_key) and account ID (account_id) in the "My Account" tab under the "Public API" section.
Limits
The system imposes a limit on the maximum number of rows that can be returned in a single query, which is 20,000.
Data limitation
The data is provided based on the state of the application immediately after the update. This means that any changes made after the last update, such as adding new labels, will only become visible after the next update.
Order of the data in the report
The results returned by the API are sorted by default according to several criteria to ensure consistency and intuitiveness of the data:
- Update Time: Results are primarily sorted by update time, from the most recent to the oldest.
- Article (Product Name): Secondary sorting is done by the product name from the client’s file, allowing for easy tracking of offers by specific products.
- Offer Price Without Shipping: Tertiary sorting is based on the offer price, enabling identification of the most favorable proposals.
Authentication
Access to the API requires authentication using an API key (api_key) and an account identifier (account_id). All API requests should include this information in the URL query parameters, e.g.:
https://app.dealavo.com/api/v3/updates?account_id=<account_id>&api_key=<api_key>
Endpoints
List of Available Update Dates
Request GET: /api/v3/updates
https://app.dealavo.com/api/v3/updates?account_id=<account_id>&api_key=<api_key>
This endpoint returns a list of dates when data updates occurred. Each date is formatted as YYYY_MM_DD_HH_MM, allowing easy identification of the specific update moment.
Example response:
{ "update_dates": [ "2024_03_13_12_00", "2024_03_13_06_00", "2024_03_12_23_30", "2024_03_12_18_00", "2024_03_12_12_00", "2024_03_12_06_00", "2024_03_11_23_30", "2024_03_11_18_00" ] }
List of Available Columns for the Client
Request GET: /api/v3/columns
https://app.dealavo.com/api/v3/columns?account_id=<account_id>&api_key=<api_key>
This endpoint provides a complete list of columns available to the client within the report data. The returned list includes column names that can be used when making API queries, offering flexibility in customizing reports to individual needs.
Example response:
{ "columns": [ "Id", "Article", "Retailer", "Retailer offer name", "Retailer price", "Availability", "Wholesale price", "Source", "Labels", "Price", "Url", "Crossed out price", "Brand", "Catalogue Price", "Maximum Price", "Minimum Price", "Stock", "EAN", "Producer", "Product code", "Promotion description", "Url", "Price with shipping", "Previous price", "Vat", "Currency", "Original price", "Retailer price with shipping", "Update time" ] }
Reports generation
Request POST: /api/v3/reports
https://app.dealavo.com/api/v3/report?account_id=<account_id>&api_key=<api_key>
{ "columns": "all", "settings": { "csv_delimiter": ";", "nested_data_separator": ",", "page": 1 } }
Allows generating reports with configurable options:
Column Selection
- The user can specify which columns should be included in the report.
- The "Update time" column is always included in the results.
- The order of columns in the returned CSV matches the order specified in the request.
Example of selecting specific columns:
{ "columns": ["Id", "Labels"] }
To get all available columns:
{ "columns": "all" }
Data range
The ability to specify a start date (start_date) and an end date (end_date) for the data included in the report.
start_date: The starting date of the range (inclusive) from which we want to receive data.
end_date: The ending date of the range (inclusive) until which we want to receive data.
Dates should be provided in the format YYYY_MM_DD_HH_MM, e.g., 2024_03_30_13_00.
https://app.dealavo.com/api/v3/report?account_id=<account_id>&api_key=<api_key>
{ "columns": "all", "start_date": "2024_01_01_10_00", "end_date": "2024_01_31_23_00", "settings": { "csv_delimiter": ";", "nested_data_separator": ",", "page": 1 } }
Settings
Configuration of additional report settings.
csv_delimiter
A single character that will be used as the column separator. By default, it is set to ;.
Example with the default separator:
Id;Availability;Update time 8591022201428;Unavailable, in assortment;2024_03_13_11_00 8591022201428;Available, in assortment;2024_03_13_11_00
Example using a comma as the separator and with text containing a comma, enclosed in quotation marks:
Id,Availability,Update time 8591022201428,"Unavailable, in assortment",2024_03_13_11_00
Rules for Quoting Strings:
- Strings Containing the Separator:
If a string contains the separator, it is enclosed in quotation marks.
Example: Unavailable, in assortment → "Unavailable, in assortment"
- Empty Strings:
Empty strings are always enclosed in quotation marks.
Example: nazwa,,opis → nazwa;"";opis
- Other Strings:
Strings that do not contain the separator and are not empty are not enclosed in quotation marks.
Example: nazwa;opis → nazwa;opis
nested_data_separator
The separator used for values in columns that are lists, such as group labels. By default, it is a comma ,.
Example with an alternative separator |:
Id;Labels;Update time 8591022201428;Happy green|promocja|single;2024_03_13_11_00
Available separators are: {",", ";", "|", "\t", " ", "&", ":", "+", "_"}
Pagination
page
Page number for data, defaulting to 1.
In case there are no results for a given page, the system will return an error code 500 along with a message, e.g.:
{ "error": "Exceeded the number of rows. Number of rows: 246312" }
number_of_offers_per_page
Number of rows with offers per page. By default, it is set to 10,000.
The maximum number of rows in a single request is 20,000.
only_available_offers
A flag (true/false) indicating whether the report should include only currently available offers. By default, it is set to false.
datetime_format
An option to change the format of the returned date in the “Update time” column in the report.
The default format is %Y_%m_%d_%H_%M. Details on formatting can be found here.
format
The default report format is CSV; however, we can also return the result in JSON format.
Generating a report in JSON format
Reports in JSON format contain two main elements:
- columns: A list of column names included in the report.
- data: The report data presented as a list of lists, where each list corresponds to a single row of data.
Example JSON report:
{ "columns": [ "Id", "Article", "Retailer", "Retailer offer name" ], "data": [ [ "1182986505", "Animonda GranCarno Original Adult wołowina i jagnięcina 400g", "test_dev_front", "Animonda GranCarno Original Adult wołowina i jagnięcina 400g" ], [ "1182986505", "Animonda GranCarno Original Adult wołowina i jagnięcina 400g", "kingofprice (allegro.pl)", "Animonda GranCarno 400g adult Wołowina Pur" ] ] }
*In the JSON report format, the “Update time” column is not automatically added.
Postman
More ready-made examples can be found in the Postman collection:
https://drive.google.com/file/d/1rqBmUsdQh3O9qYFqnI7MvwqQM9Ta7B8G/view?usp=sharing
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article