Skip to content

Instantly share code, notes, and snippets.

@d2kagw
Last active September 20, 2023 01:02
Show Gist options
  • Select an option

  • Save d2kagw/9f68f1e509dccb0c7e6ad285a201ce2c to your computer and use it in GitHub Desktop.

Select an option

Save d2kagw/9f68f1e509dccb0c7e6ad285a201ce2c to your computer and use it in GitHub Desktop.
schema_marketing_sms_subscribe.json - Via automated deployment - Visit https://learn.lexer.io for more information.
{
"type": "object",
"properties": {
"records": {
"type": "array",
"items": {
"title": "SMS Subscribe Event",
"type": "object",
"description": "An SMS Subscribe Event object.",
"required": [
"action_at",
"link",
"status"
],
"properties": {
"link": {
"type": "object",
"oneOf": [
{
"title": "Email Link",
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"pattern": "(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",
"example": "[email protected]"
}
}
},
{
"title": "Email sha256 Link",
"type": "object",
"properties": {
"email_sha256": {
"type": "string",
"description": "Ensure that the email address is lowercase before hashing.",
"example": "39c500..."
}
}
},
{
"title": "Email md5 Link",
"type": "object",
"required": [
"email_md5"
],
"properties": {
"email_md5": {
"type": "string",
"description": "Ensure that the email address is lowercase before hashing.",
"example": "39c500..."
}
}
},
{
"title": "Mobile Link",
"type": "object",
"properties": {
"mobile": {
"type": "string",
"description": "Formatted with the international code with no spaces or symbols.",
"example": "61400000000"
}
}
},
{
"title": "Customer ID Link",
"type": "object",
"required": [
"customer_id"
],
"properties": {
"customer_id": {
"type": "string",
"description": "A unique identifier for a customer.",
"example": 123456789
},
"system_name": {
"type": "string",
"description": "An optional name for the system of origin.",
"example": "point_of_sale"
}
}
},
{
"title": "External Link",
"type": "object",
"required": [
"external_id"
],
"properties": {
"external_id": {
"type": "string",
"description": "A unique identifier for a profile.",
"example": 123456789
},
"system_name": {
"type": "string",
"description": "An optional name for the system of origin.",
"example": "point_of_sale"
}
}
},
{
"title": "Legacy Customer Link",
"type": "object",
"required": [
"link_type",
"link_value"
],
"properties": {
"link_type": {
"title": "Link Type",
"type": "string",
"enum": [
"email",
"email_sha256",
"customer_id",
"mobile",
"external_id",
"email_md5"
],
"example": "email"
},
"link_value": {
"title": "Link Value",
"type": "string",
"minLength": 1,
"example": "[email protected]"
},
"id_type": {
"title": "External ID Type",
"type": "string",
"default": "default"
}
}
}
]
},
"action_at": {
"title": "Action At",
"type": "string",
"format": "date-time"
},
"list": {
"title": "List",
"type": "object",
"properties": {
"id": {
"title": "ID",
"type": "string",
"example": "7bff7a..."
},
"name": {
"title": "List Name",
"type": "string",
"example": "All Customers List"
}
}
},
"status": {
"title": "Subscription Status",
"type": "string",
"enum": [
"subscribed",
"unsubscribed",
"list_subscribed",
"list_unsubscribed"
]
}
}
},
"minItems": 1,
"maxItems": 100
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment