FotoZap API Documentation

Last updated 2016–08–28

General Information

Media Uploaders

Get Campaign List

Endpoint:

GET https://zap-rest.fotozap.com/campaigns

Query Parameters:

Example Request:

curl -u user@domain:password -A 'cURL Example API Client' https://zap-rest.fotozap.com/campaigns?version=3

Example Responses:

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"
        }
    }
]

Comments:

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.

Upload Media to Campaign

Endpoint:

POST https://zap-rest.fotozap.com/campaigns/{id}/media

Path Parameter:

Query Parameters:

At least one barcode, email, or mobile number is required.

Form Data Parameter:

Allowed File Types:

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:

Example Request:

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'

Example Response:

eba45209-3627-4fd3-ac04-1cd68849826b

Comments:

A successful upload will yield a UUID which identifies the uploaded media object in the FotoZap system. Possible errors for an authorized request are: