{
"type": "object",
"required": ["offer_id", "shop_id", "name", "type", "value", "region"],
"properties": {
"offer_id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the offer"
},
"shop_id": {
"type": "string",
"format": "uuid",
"description": "ID of the shop offering the discount (must reference an existing shop)"
},
"name": {
"type": "string",
"description": "Name of the offer"
},
"type": {
"type": "string",
"description": "Type of offer (e.g., 'percentage', 'fixed')"
},
"value": {
"type": "number",
"format": "float",
"description": "Value of the offer (must be a positive number)"
},
"region": {
"type": "string",
"description": "Geographic region where the offer is valid (2-letter country code, ISO 3166-1 alpha-2)"
},
"allowed_from": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Start date and time of the offer"
},
"allowed_to": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "End date and time of the offer"
},
"allowed_branches": {
"type": "string",
"nullable": true,
"description": "Comma-separated list of branch IDs where the offer is valid"
},
"allowed_days": {
"type": "string",
"nullable": true,
"description": "Comma-separated list of days when the offer is valid"
},
"created": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Timestamp when the record was created"
},
"updated": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Timestamp when the record was last updated"
},
"is_deleted": {
"type": "boolean",
"nullable": true,
"description": "Flag indicating if the record is marked as deleted"
},
"is_enabled": {
"type": "boolean",
"nullable": true,
"description": "Flag indicating if the offer is currently enabled"
}
}
}