Last updated 2016–08–28
GET https://zap-rest.fotozap.com/campaigns
version: can be 1, 2, or 3curl -u user@domain:password -A 'cURL Example API Client' https://zap-rest.fotozap.com/campaigns?version=3
Version 1
[
{
"title": "Spring Sales Event",
"id": 123
},
{
"title": "Mother's Day Special Event",
"id": 456
}
]
Version 2
[
{
"id": 123,
"title": "Spring Sales Event",
"overlay": {
"position": "southeast",
"targetWidth": 1280,
"url": "https://zap-rest.fotozap.com/rest/campaignoverlay/123",
"etag": "9471e6e94c86faece4c2503f45673cae19289031"
},
"microsite": {
"qrUrl": "HTTP://EVENTS.FOTOZAP.COM/Q/",
"simpleUrl": "fotozap.com"
}
}
]
The response is a list of campaign titles and their numeric IDs, for version 1. Versions 2 and 3 include additional information to provide a richer application experience. The titles are intended to be displayed for a user to choose. The selected campaign’s ID will be used when uploading media.
POST https://zap-rest.fotozap.com/campaigns/{id}/media
id: the numeric campaign ID (required)deviceSerial: a unique identifier for the hardware device or software installation making the request (required)barcodes: a comma delimited list of barcodes to attach to the media object; all list items must have 6 or more characters, non-alphanumeric characters will be ignoredemails: a comma delimited list of email addresses where the processed media will be delivered; all list items must be well-formed email addressesmobiles: a comma delimited list of mobile numbers where the processed media will be delivered; all list items must have 10 or more digits, non-numeric characters will be ignoredattribute[key]: a multi-valued map of key-value pairs. keys may be repeated. keys can only contain upper and lowercase letters, and must be between six and 24 characters long. values can contain any text up to 255 characters. max number of attributes allowed is 10.dateTaken: local time on location when photo/video was captured. UNIX time in milliseconds (number of ms since 1970/01/01 00:00:00). must identify a time between Jan 1 2012 and present.media: a URL from which the upload content can be fetched. the upload content can be passed directly via form data or by reference to a URL here.At least one barcode, email, or mobile number is required.
media: the media object to upload to the campaign. (required, unless a URL is given in the media query parameter)The media can be uploaded directly as a form data parameter, or it can be retrieved from a URL given in a query parameter. In either case the content will be validated.
The following formats are accepted for all campaigns:
main. (Available by request; only for specific campaigns.)curl -u photographer@domain:password -A 'cURL Example API Client' -F media=@picture.jpg \
'https://zap-rest.fotozap.com/campaigns/2/media?emails=customer@abc.def&deviceSerial=cURLex12345&attribute[Layout]=photostrip'
eba45209-3627-4fd3-ac04-1cd68849826b
A successful upload will yield a UUID which identifies the uploaded media object in the FotoZap system. Possible errors for an authorized request are: