Reads QR codes that have a URL in them, and expects a JSON response formatted like this example:
{
data: {
ImageKey: {
type: "picture",
data: "base64 encoded image string",
subdata: "jpeg"
},
HeaderKey: {
type: "text",
data: "Some Person",
subdata: "Some Subdued Text"
},
AvatarKey: {
type: "picture"
data: "base64 encoded image string",
subdata: "png"
},
ActionKey: {
type: "action",
subtype: "call",
data: "Call Person",
subdata: "1234567890"
},
TextKey: {
type: "text",
data: "Person Name",
subdata: "Person Date of Birth"
},
TitleKey: {
type: "text",
data: "List Title"
}
},
display: [
{
cardType: "glance",
image: "ImageKey",
header: "HeaderKey",
avatar: "AvatarKey",
footerActions: [
"ActionKey"
],
footerTexts: [
"TextKey"
]
},
{
cardType: "list",
title: "TitleKey",
data: [
"LiteralString",
"LiteralString2"
]
}
]
}
Data Objects (eg, those in data
) have this general format:
{
type (required)
subtype
data (required)
subdata
}
-
type
is one ofpicture
,text
,action
, orlist
. -
subtype
currently only applies toaction
, and it can beemail
orcall
. The contact information is stored insubdata
. -
data
andsubdata
are arbitrary strings.subdata
only currently applies totext
,action
, andpicture
. Fortext
it is some subdued text shown beneath. Forpicture
it is the image type (ie,png
, orjpeg
).action
is described above.
Card Objects (eg, those in display
) vary in format based on the card type. Currently, there are two card types: glance
and list
.
glance
follows this format:
{
cardType (required)
image
header
avatar
footerActions
footerTexts
}
cardType
is"glance"
.image
is a key to a Data Object (with the typepicture
).header
is a key to a Data Object (with the typetext
).avatar
is a key to a Data Object (with the typepicture
).footerActions
is an array of keys to Data Objects (with the typeaction
).footerTexts
is an array of keys to Data Objects (with the typetext
).
list
follows this format:
{
cardType (required)
title
data
}
cardType
is"list"
.title
is an arbitrary string.data
is a key to a Data Object (with the typelist
).