{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/productindex-ai/json-schema/productindex-ai-offer-edit-request-schema.json",
  "title": "OfferEditRequest",
  "description": "All fields besides offer_id are optional; only fields present in the body are updated.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/productindex-ai-openapi.json#/components/schemas/OfferEditRequest",
  "type": "object",
  "required": [
    "offer_id"
  ],
  "properties": {
    "offer_id": {
      "type": "string"
    },
    "headline": {
      "type": "string",
      "maxLength": 60
    },
    "detail": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200
    },
    "destination_url": {
      "type": "string",
      "format": "uri"
    },
    "price_usd": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "list_price_usd": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "starts_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "promo_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "offer_types": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "percentage_off",
          "fixed_amount_off",
          "free_shipping",
          "bogo",
          "bundle",
          "free_gift"
        ]
      }
    }
  }
}