Download OpenAPI specification:Download
App backend API for Djungle projects
User Firebase Authentication, see https://firebase.google.com/docs/auth
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | bearer |
{- "payload": {
- "cap": 15021
}
}
{- "user_state": {
- "homepage_image_path": "media/image_asset/image.png",
- "notifications_unread": 2,
- "avatar_url": "media/avatar/image.png",
- "news_count": 1,
- "level": 1,
- "points": 0,
- "level_points": 0,
- "level_points_threshold": -1,
- "coupon_count": 1,
- "checkin_count": 2,
- "checkin_enabled": true,
- "scan_enabled": true,
- "code_enabled": false,
- "objectives_to_complete": 1,
- "products_to_vote": 2,
- "events_on_map": 0,
- "version": 1,
- "blocked": false,
- "daily_quiz_available": false
}
}
{- "loyalty_invitation_code": "abcde"
}
{- "invites_list": [
- {
- "first_name": "William",
- "nickname": "willy",
- "avatar": null
}, - {
- "first_name": "Alexander",
- "nickname": "alez",
- "avatar": "avatar-1"
}, - {
- "first_name": null,
- "nickname": "elmisi",
- "avatar": null
}
]
}
{- "campaigns": [
- {
- "id": "event-123",
- "slug": "event-123",
- "name": "Corsa campestre",
- "title": "Corsa campestre",
- "description": "Corsa campestre lungo l'argine del naviglio, fino a piazza Reinoso Peichper",
- "reward_text": "string",
- "address": "Via Napoli, 32 - Milano",
- "campaign_level": "string",
- "campaign_type": "string",
- "start_datetime": "2019-08-24T14:15:22Z",
- "expire_datetime": "2019-08-24T14:15:22Z",
- "map_flag": "string",
- "campaign_list_icon": "string",
- "campaign_page_image": "string",
- "checkin_point": 0,
- "coupon": "string",
- "minimum_scan": 0,
- "scan_multiplier": 0,
- "scan_point": 0,
- "places": "string",
- "priority": "string",
- "num_checkin": 12,
- "num_interested": 0,
- "visibility": "public",
- "context": {
- "amount": 10,
- "currency": "EUR",
- "payed": false
}
}
]
}
Partecipate to a campaign (event)
required | object |
{- "payload": {
- "encrypted_impersonate": "mPDD3P5a+FV0WfOzk+2IslrvLgWDCdxxkHhqo/FekhAxOYSSYR3V8WrWjsuYmkEhIskSQDVmlv01r+p+8llwCVcMdF/442fB92CwnT1F3yA=",
- "campaign_slug": "green-festival-2020"
}
}
Send scanned code
required | object |
{- "payload": {
- "encrypted_string": "E4sjwjzKRqv1TIuwaWifuy4xVqtmv8MpWKhDBdSc4imHbgJ7ujlBBFq4RBW6HGzzZIrJ7sAXT9kzMANj9gk6uPzI/Km1BAMA"
}
}
Send answers to a survey
required | object |
{- "payload": {
- "objective_uuid": "ffffa324-3ec9-4688-b260-40fe5e5780bb",
- "question_and_answers": [
- {
- "question_id": 10,
- "answer_ids": [
- 101,
- 102
], - "open_answer": null
}, - {
- "question_id": 20,
- "answer_ids": [
- 151
], - "open_answer": "mi piacciono i lama"
}
]
}
}
{- "objectives": [
- {
- "uuid": "2219fdda-fc83-4e7c-ae0a-89de995ed83d",
- "type": "survey",
- "name": "Test",
- "description": "Rispondi alle domande",
- "button": null,
- "context": {
- "style": {
- "title": "test"
}
}, - "optional": false
}
]
}
Send answer to mission with code (i.e. anagram, email validation ,etc)
required | object |
{- "payload": {
- "objective_uuid": "ec0c7321-8f61-4c5b-8267-79236b95dace",
- "code": "the-answer"
}
}
Send data for store data objective
required | object |
{- "payload": {
- "objective_uuid": "xxx",
- "data": {
- "city": "Cesano Boscone",
- "province": "MI",
- "address": "Via delle Acacie, 23",
- "cap": 20090
}
}
}
Set a subject property
required | object |
{- "payload": {
- "encrypted_impersonate": "mPDD3P5a+FV0WfOzk+2IslrvLgWDCdxxkHhqo/FekhAxOYSSYR3V8WrWjsuYmkEhIskSQDVmlv01r+p+8llwCVcMdF/442fB92CwnT1F3yA=",
- "name": "associated-district-request",
- "value": "smart-city-laguna"
}
}
{- "districts": [
- {
- "slug": "mirafiori-sud",
- "name": "Mirafiori Sud"
}
]
}
{- "payload": {
- "email": "email.to.validate@mysite.com",
- "objective_uuid": "ffffa324-3ec9-4688-b260-40fe5e5780bb"
}
}
Send answer to mission with code (i.e. anagram, email validation ,etc)
required | object |
{- "payload": {
- "objective_uuid": "ec0c7321-8f61-4c5b-8267-79236b95dace",
- "code": "the-answer"
}
}
Get survey details
objective_uuid required | string Example: objective_uuid=fffdb32a-a8a2-4031-9949-90c1c07f1948 Survey objective unique identifier |
{- "survey-objective": {
- "objective_uuid": "ffffa324-3ec9-4688-b260-40fe5e5780bb",
- "title": "Parlaci di te",
- "view_type": "survey",
- "questions": [
- {
- "id": 10,
- "question": "Ti piace la pizza?",
- "type": "single_choice",
- "answers": [
- {
- "id": 100,
- "answer": "Si"
}, - {
- "id": 101,
- "answer": "No"
}, - {
- "id": 102,
- "answer": "Forse"
}
]
}, - {
- "id": 11,
- "question": "Ti piace ballare?",
- "type": "single_choice",
- "answers": [
- {
- "id": 300,
- "answer": "Si"
}, - {
- "id": 301,
- "answer": "No"
}
]
}
]
}
}
Send answers to a survey
required | object |
{- "payload": {
- "objective_uuid": "ffffa324-3ec9-4688-b260-40fe5e5780bb",
- "question_and_answers": [
- {
- "question_id": 10,
- "answer_ids": [
- 101,
- 102
], - "open_answer": null
}, - {
- "question_id": 20,
- "answer_ids": [
- 151
], - "open_answer": "mi piacciono i lama"
}
]
}
}
Get products to vote from catalogue (already voted products are not recalled)
{- "products_list": [
- {
- "id": "string",
- "vote": "string",
- "name": "string",
- "description": "string",
- "image": "string",
- "price": "string",
- "product_page_link": "string"
}
]
}
Get product details
id required | string Example: id=25 product id to vote |
{- "products_list": {
- "id": "string",
- "vote": "string",
- "name": "string",
- "description": "string",
- "image": "string",
- "price": "string",
- "product_page_link": "string"
}
}
{- "payload": {
- "product_id": "string",
- "vote": "string"
}
}
{- "payload": { },
- "example": null
}
{- "privacy_settings": [
- {
- "enabled": true,
- "slug": "enable_profile_tracking",
- "description": "Presto separato consenso opzionale al trattamento dei dati personali per tutte le Finalità di Marketing come illustrato al Paragrafo C dell’Informativa Privacy."
}
]
}
Configure privacy settings
required | object |
{- "payload": {
- "privacy_settings": {
- "enable_promotion": false,
- "enable_geolocation": false,
- "enable_profile_tracking": true,
- "enable_push_notification": true,
- "enable_push_promotion": true
}
}
}
{- "djungle_user_special_coupons": [
- {
- "id": "fde7889c-50d7-4b1b-b65d-4c678c6eb0d5",
- "slug": "coupon-2",
- "name": "cartoleria",
- "mark": "mark-2",
- "description": "Sconto su tutta la cartoleria",
- "url": "string",
- "special": "string",
- "expiration": "2019-08-24T14:15:22Z",
- "expired": false,
- "starting": "2019-08-24T14:15:22Z",
- "started": false,
- "type": "qrcode",
- "promocode": "string",
- "qrcode": "mUNJRkNey+zwexW5aBE8Em45W+TnzX5zx3hVx4S60UrDoRE0ahnjCqmG9qxvOU2/xgF2jaxLgPK+M2PMkS5d/0UGMmU+5vTT+dnTlpqXRaA=",
- "is_chained_coupon": true,
- "chain_position": 0,
- "chain_length": 0,
- "next_in_chain_id": "string",
- "burned_time": "2019-08-24T14:15:22Z",
- "owner": {
- "first_name": "string",
- "last_name": "string"
}, - "context": {
- "value": "20%",
- "text_color": "#FFCC01",
- "background_color": "#FFCC01",
- "amount": 0,
- "percent": 20
}, - "is_burnable": true
}
]
}
Get coupon list burned by me
language | string Enum: "IT" "EN" Examples:
|
{- "coupons": [
- {
- "id": "fde7889c-50d7-4b1b-b65d-4c678c6eb0d5",
- "slug": "coupon-2",
- "name": "cartoleria",
- "mark": "mark-2",
- "description": "Sconto su tutta la cartoleria",
- "url": "string",
- "special": "string",
- "expiration": "2019-08-24T14:15:22Z",
- "expired": false,
- "starting": "2019-08-24T14:15:22Z",
- "started": false,
- "type": "qrcode",
- "promocode": "string",
- "qrcode": "mUNJRkNey+zwexW5aBE8Em45W+TnzX5zx3hVx4S60UrDoRE0ahnjCqmG9qxvOU2/xgF2jaxLgPK+M2PMkS5d/0UGMmU+5vTT+dnTlpqXRaA=",
- "is_chained_coupon": true,
- "chain_position": 0,
- "chain_length": 0,
- "next_in_chain_id": "string",
- "burned_time": "2019-08-24T14:15:22Z",
- "owner": {
- "first_name": "string",
- "last_name": "string"
}, - "context": {
- "value": "20%",
- "text_color": "#FFCC01",
- "background_color": "#FFCC01",
- "amount": 0,
- "percent": 20
}, - "is_burnable": true
}
]
}
Burn a coupon by QR code
required | object |
{- "payload": {
- "qrcode": "efWUq46CMQejtmVRVqbvj2kXvZtMJ9WjzFl4ePCfaelc3GB9NjmPmwZrUK0KEemdnq00MER456NXcVFyHpd9fGDqHf4eJluhFSHEAZ5LhPk="
}
}
Send scanned code
required | object |
{- "payload": {
- "encrypted_string": "E4sjwjzKRqv1TIuwaWifuy4xVqtmv8MpWKhDBdSc4imHbgJ7ujlBBFq4RBW6HGzzZIrJ7sAXT9kzMANj9gk6uPzI/Km1BAMA"
}
}
Push notification detail
id | integer Example: id=1 Id of the notification to retrieve |
bulk_id | integer Example: bulk_id=1 Id of the bulk_id last notification to retrieve |
{- "push_notification": {
- "id": 3,
- "slug": "level-up-message",
- "title": "Ciao!",
- "message": "Sei al livello 1",
- "created_at": "13/02/2020",
- "read": false,
- "context": {
- "level": 1,
- "title": "",
- "message": "Sei al livello 1",
- "nickname": null
}, - "button_page": "home",
- "button_text": "Continua"
}
}
Push notification list
start | integer Index of the first notification to retrieve, default is 0 |
limit | integer Example: limit=10 Number of notification to retrieve, default is 10 |
{- "push_notifications": [
- {
- "id": 3,
- "slug": "level-up-message",
- "title": "Ciao!",
- "message": "Sei al livello 1",
- "created_at": "13/02/2020",
- "read": false,
- "context": {
- "level": 1,
- "title": "",
- "message": "Sei al livello 1",
- "nickname": null
}, - "button_page": "home",
- "button_text": "Continua"
}
]
}
App session started, usually after login or after app focus
required | object (Device) |
{- "payload": {
- "device_key": "32155E68-243D-4999-B4CF-031FF816F1DE",
- "os": "iOS",
- "os_version": "13.2.2",
- "manufacturer": "Apple",
- "model": "iPhone11,6",
- "registration_id": "cAo7F8cQ-kImg4l0_Gw ... ZV8:ggggggQxIRPqaQQ-kkkkTfrM0p",
- "active_for_push_notifications": true,
- "app_version": "3.0.1"
}
}
Send answer to mission with code (i.e. anagram, email validation ,etc)
required | object |
{- "payload": {
- "objective_uuid": "ec0c7321-8f61-4c5b-8267-79236b95dace",
- "code": "the-answer"
}
}
Create business profile
object (Business) |
{- "payload": {
- "vat": "100002309812",
- "name": "Cartoleria Rossi",
- "city": "Torino",
- "address": "Corso Dante, 35",
- "country": "Italy"
}
}
Update business information
object (Business) |
{- "payload": {
- "vat": "100002309812",
- "name": "Cartoleria Rossi",
- "city": "Torino",
- "address": "Corso Dante, 35",
- "country": "Italy"
}
}
{- "business": {
- "vat": "100002309812",
- "name": "Cartoleria Rossi",
- "city": "Torino",
- "address": "Corso Dante, 35",
- "country": "Italy"
}
}
Send data for store data objective
required | object |
{- "payload": {
- "objective_uuid": "xxx",
- "data": {
- "city": "Cesano Boscone",
- "province": "MI",
- "address": "Via delle Acacie, 23",
- "cap": 20090
}
}
}
{- "news": [
- {
- "news_id": "san-valentino-2020",
- "text_content": "Il 14 febbraio entra nei nostri negozi, scatta un selfie e condividi l'amore",
- "title": "Sorprese di San Valentino",
- "deep_link": null,
- "type": "home",
- "publish_date": "2020-05-14 10:22:34",
- "start_date": "2020-05-20 09:00:00",
- "read": true
}
]
}
{- "payload": {
- "news_id": "string"
}
}
Create user profile
object (Profile) |
{- "payload": {
- "first_name": "Mario",
- "last_name": "Rossi",
- "email": "mario@cartoleriarossi.it",
- "nickname": "reds",
- "mobile_number": "+395557771234",
- "birthday": "1990-10-11",
- "avatar": "avatar1",
- "address": "Via Roma, 15 - Torino (TO)"
}
}
Update user profile property. Please note that:
YYYY-MM-DD
format required | object |
{- "payload": {
- "property_name": "birthday",
- "value": "1990-10-11"
}
}
{- "loyalty_user_profile": {
- "nickname": "reds",
- "first_name": "Mario",
- "last_name": "Rossi",
- "mobile_number": "+393775556789",
- "birthday": "02/08/1990",
- "email": "m.rossi@site.com",
- "city": "Torino"
}
}
{- "cities": [
- "_",
- "Alessandria",
- "Milano",
- "Padova",
- "Torino"
]
}
App session started, usually after login or after app focus
required | object (Device) |
{- "payload": {
- "device_key": "32155E68-243D-4999-B4CF-031FF816F1DE",
- "os": "iOS",
- "os_version": "13.2.2",
- "manufacturer": "Apple",
- "model": "iPhone11,6",
- "registration_id": "cAo7F8cQ-kImg4l0_Gw ... ZV8:ggggggQxIRPqaQQ-kkkkTfrM0p",
- "active_for_push_notifications": true,
- "app_version": "3.0.1"
}
}
Send points earned to conclude the daily quiz
required | object |
{- "payload": {
- "quiz_id": "ec0c7321-8f61-4c5b-8267-79236b95dace",
- "points": 67,
- "verification_code": "224f638a99fd3f1ed14f9cdc8a9ede8310bdd43a",
- "wrong_answers": [
- 1,
- 2,
- 34
]
}
}
{- "daily_quiz": {
- "id": "32155E68-243D-4999-B4CF-031FF816F1DE",
- "date": "2021-03-23",
- "questions": [
- {
- "id": "1,",
- "text": "What is the color of the Napoleon white horse?",
- "correct_answer": "White",
- "distractors": [
- "Black",
- "Brown"
], - "explanation": "You can see the Bonaparte white horse in the famous painting Napoleon at the Saint-Bernard Pass by Jacques-Louis David",
- "difficulty": 1
}
], - "seconds_for_question": 10
}
}
Return status for app
version required | string Example: version=2099 App version number |
platform required | string Enum: "ios" "android" Example: platform=ios App version number |
application | string Enum: "planet" "planet_manager" "planet_experiments" "tiger_engine" Example: application=planet_manager Application id |
{- "app_version_status": "FORCE_UPDATE"
}