Skip to main content
Documentation for the Dynamicvcard category.

Schema Structure

This category uses the standard QR code category structure.

Components Used

This category uses the following components:

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "array",
  "additionalProperties": false,
  "examples": [],
  "items": {
    "type": "object",
    "required": [
      "type",
      "data"
    ],
    "additionalProperties": false,
    "properties": {
      "type": {
        "type": "string",
        "enum": [
          "description_box",
          "profile_info",
          "contact_details",
          "social_media_profiles",
          "map",
          "custom_script",
          "file",
          "custom_form",
          "video",
          "page_settings"
        ]
      },
      "data": {
        "type": "object"
      }
    },
    "allOf": [
      {
        "if": {
          "properties": {
            "type": {
              "const": "description_box"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "$ref": "components/description_box.json"
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "profile_info"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "name"
              ],
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 100
                },
                "title": {
                  "type": "string",
                  "maxLength": 100
                },
                "company": {
                  "type": "string",
                  "maxLength": 100
                },
                "image": {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "contact_details"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [],
              "additionalProperties": false,
              "properties": {
                "emails": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "email"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email",
                        "minLength": 5,
                        "pattern": "^\\S+@\\S+\\.\\S+$"
                      },
                      "label": {
                        "type": "string"
                      }
                    }
                  }
                },
                "phoneNumbers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "phoneNumber"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "phoneNumber": {
                        "type": "string",
                        "pattern": "^(\\d{1,20})$|^((\\+\\d{1,3}([- ])?\\(?\\d\\)?([- ])?\\d{1,5})|(\\(?\\d{2,6}\\)?))([- ])?(\\d{3,4})([- ])?(\\d{4})([- ])?((x|ext|;)([- ])?\\d{1,5})?$"
                      },
                      "label": {
                        "type": "string"
                      }
                    }
                  }
                },
                "website": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "url"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "(http://www\\.|https://www\\.|http://|https://)?[a-z0-9]+([\\-.][a-z0-9]+)*\\.[a-z]{2,10}(:[0-9]{1,5})?(/.*)?$"
                      },
                      "label": {
                        "type": "string"
                      }
                    }
                  }
                },
                "addresses": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [],
                    "additionalProperties": false,
                    "properties": {
                      "street": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "city": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "state": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "country": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "postalCode": {
                        "type": "string",
                        "maxLength": 12
                      },
                      "addressLabel": {
                        "type": "string",
                        "maxLength": 50
                      },
                      "hasMapLocation": {
                        "type": "boolean"
                      },
                      "location": {
                        "$ref": "components/_base_map.json#properties/location"
                      }
                    }
                  }
                },
                "faxes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "faxNumber"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "faxNumber": {
                        "type": "string",
                        "pattern": "^((\\+\\d{1,3}([- ])?\\(?\\d\\)?([- ])?\\d{1,5})|(\\(?\\d{2,6}\\)?))([- ])?(\\d{3,4})([- ])?(\\d{4})(( x| ext)\\d{1,5})?$"
                      },
                      "label": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "if": {
          "properties": {
            "type": {
              "const": "social_media_profiles"
            }
          }
        },
        "then": {
          "properties": {
            "data": {
              "type": "object",
              "required": [
                "profiles"
              ],
              "additionalProperties": false,
              "properties": {
                "profiles": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "data",
                      "field",
                      "key"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "data": {
                        "type": "string"
                      },
                      "field": {
                        "type": "string",
                        "enum": [
                          "url",
                          "handle",
                          "id",
                          "tel"
                        ]
                      },
                      "key": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "tracking": {
                        "type": "object",
                        "required": [
                          "id",
                          "tag"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^E[a-zA-Z0-9_]{5}$"
                          },
                          "tag": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      {
        "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"
            }
          }
        }
      }
    ]
  }
}