{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "product_id": {
      "type": "string",
      "pattern": "^bp_[0-9]{10}$",
      "description": "Exact grouped BestPrice product id returned by search_products, in bp_<id> form."
    },
    "postal_code": {
      "description": "Greek delivery postcode (five digits, 10000 to 85999) used to calculate shipping and total cost. Required for lowest_total_cost; optional for lowest_item_price and merchant_rating.",
      "type": "string",
      "pattern": "^(?:[1-7][0-9]{4}|8[0-5][0-9]{3})$"
    },
    "objective": {
      "description": "How to rank offers. When omitted: lowest_total_cost if postal_code is given, otherwise lowest_item_price. lowest_total_cost includes known shipping and requires postal_code.",
      "type": "string",
      "enum": [
        "lowest_total_cost",
        "lowest_item_price",
        "merchant_rating"
      ]
    },
    "in_stock_only": {
      "default": false,
      "description": "false (default): every buyable offer, both immediately available and those that ship later with a delivery estimate (availability unknown stays marked unknown). true: only offers immediately available from stock. Out-of-stock offers are never returned.",
      "type": "boolean"
    },
    "minimum_merchant_rating": {
      "default": 0,
      "description": "Optional minimum merchant rating on a 0 to 5 scale.",
      "type": "number",
      "minimum": 0,
      "maximum": 5
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of current merchant offers to return, from 1 to 10.",
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    }
  },
  "required": [
    "product_id"
  ],
  "additionalProperties": false
}
