keepa.models.backend.Deal#

pydantic model keepa.models.backend.Deal#

Backend Deal model generated from the Keepa Java schema.

Fields:
field asin: str | None = None#

The ASIN of the product

field avg: list[list[int | None] | None] | None = None#

Contains the weighted averages in the respective date range and price type.

Note: The day interval (index 0) is actually the average of the last 48 hours, not 24 hours. This is due to the way our deals work.

First dimension uses Product.CsvType, second dimension DealInterval

field categories: list[int | None] | None = None#

Array of Amazon category node ids Category.catId this product is listed in. Can be empty.

Example: [569604]

field creationDate: int | None = None#

States the time this deal was found, in Keepa Time minutes.

Use KeepaTime.keepaMinuteToUnixInMillis(int) (long) to get an uncompressed timestamp (Unix epoch time).

field current: list[int | None] | None = None#

Contains the prices / ranks of the product of the time we last updated it. Uses the Price Type indexing. The price is an integer of the respective Amazon locale’s smallest currency unit (e.g. euro cents or yen). If no offer was available in the given interval (e.g. out of stock) the price has the value -1. Shipping and Handling costs are not included. Amazon is considered to be part of the marketplace, so if Amazon has the overall lowest new price, the marketplace new price in the corresponding time interval will be identical to the Amazon price (except if there is only one marketplace offer).

Uses Product.CsvType indexing

field currentSince: list[int | None] | None = None#

The timestamp indicating the starting point from which the current value has been in effect, in Keepa Time minutes.

Uses Product.CsvType indexing.

Use KeepaTime.keepaMinuteToUnixInMillis(int) (long) to get an uncompressed timestamp (Unix epoch time).

field delta: list[list[int | None] | None] | None = None#

Contains the absolute difference between the current value and the average value of the respective date range interval. The value 0 means it did not change or could not be calculated. First dimension uses the Date Range indexing, second the Price Type indexing.

First dimension uses Product.CsvType, second dimension DealInterval

field deltaLast: list[int | None] | None = None#

Contains the absolute difference of the current and the previous price / rank. The value 0 means it did not change or could not be calculated.

Uses Product.CsvType indexing

field deltaPercent: list[list[int | None] | None] | None = None#

Same as delta, but given in percent instead of absolute values.

First dimension uses Product.CsvType, second dimension DealInterval

field image: list[int | None] | None = None#

The name of the main product image of the product. Make sure you own the rights to use the image.

Each entry represents the integer of a US-ASCII (ISO646-US) coded character. Easiest way to convert it to a String in Javascript would be var imageName = String.fromCharCode.apply(“”, productObject.image);.

Example: [54,49,107,51,76,97,121,55,74,85,76,46,106,112,103], which equals “61k3Lay7JUL.jpg”.

Full Amazon image path: https://m.media-amazon.com/images/I/image name

field lastUpdate: int | None = None#

States the last time we have updated the information for this deal, in Keepa Time minutes.

Use KeepaTime.keepaMinuteToUnixInMillis(int) (long) to get an uncompressed timestamp (Unix epoch time).

field lightningEnd: int | None = None#

States the time this lightning deal is scheduled to end, in Keepa Time minutes. Only applicable to lightning deals. 0 otherwise.

Use KeepaTime.keepaMinuteToUnixInMillis(int) (long) to get an uncompressed timestamp (Unix epoch time).

field minRating: int | None = None#

Limit to products with a minimum rating (A rating is an integer from 0 to 50 (e.g. 45 = 4.5 stars)). If -1 the filter is inactive. Example: 20 (= min. rating of 2 stars)

field parentAsin: str | None = None#

The parent ASIN of the product

field rootCat: int | None = None#

Category node id Category.catId of the product’s root category. 0 or 9223372036854775807 if no root category known.

field title: str | None = None#

Title of the product. Caution: may contain HTML markup in rare cases.

field warehouseCondition: int | None = None#

The OfferCondition condition of the cheapest warehouse deal of this product. Integer value:

0 - Unknown: We were unable to determine the condition or this is not a warehouse deal in our data

2 - Used - Like New

3 - Used - Very Good

4 - Used - Good

5 - Used - Acceptable

field warehouseConditionComment: str | None = None#

The offer comment of the cheapest warehouse deal of this product. null if no warehouse deal found in our data.