Schema Structure
This category uses the standard QR code category structure.Components Used
This category uses the following components:- Banner Images
- Button
- Company Branding
- Custom Form
- Custom Script
- Description Box
- File
- Map
- Page Layout
- Page Settings
- Social Profile
- Social Sharing Buttons
- Style/Card
- Style/Text
- Video
Schema
Copy
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Coupon category schema",
"description": "Used to validate data of coupon category",
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"data"
],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"page_layout",
"banner_images",
"company_branding",
"description_box",
"button",
"coupon_details",
"social_sharing_buttons",
"map",
"custom_script",
"file",
"custom_form",
"video",
"page_settings",
"social_media_profiles"
]
},
"data": {
"type": "object"
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "page_layout"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/page_layout.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "banner_images"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/banner_images.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "company_branding"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/company_branding.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "description_box"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/description_box.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "button"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/button.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "coupon_details"
}
}
},
"then": {
"properties": {
"data": {
"type": "object",
"required": [
"couponCode"
],
"additionalProperties": false,
"properties": {
"couponCode": {
"type": "string",
"minLength": 4
},
"offerTitle": {
"type": "string"
},
"offerDetails": {
"type": "string"
},
"scanLimit": {
"type": "number"
},
"startDate": {
"type": "string"
},
"endDate": {
"type": "string"
},
"timeZone": {
"type": "string"
},
"formatting": {
"type": "object",
"additionalProperties": false,
"properties": {
"textStyle": {
"$ref": "components/style/text.json"
},
"cardStyle": {
"$ref": "components/style/card.json"
}
}
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "social_sharing_buttons"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/social_sharing_buttons.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "map"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/map.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "custom_script"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/custom_script.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "file"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/file.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "custom_form"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/custom_form.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "video"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/video.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "page_settings"
}
}
},
"then": {
"properties": {
"data": {
"$ref": "components/page_settings.json"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "social_media_profiles"
}
}
},
"then": {
"properties": {
"data": {
"type": "object",
"required": [
"profiles"
],
"additionalProperties": false,
"properties": {
"profiles": {
"$ref": "components/social_profile.json"
},
"headerText": {
"type": "string"
}
}
}
}
}
}
]
}
}