Api session event participant zone add function category

From Tygron Support wiki
Jump to navigation Jump to search

API Endpoint: api/session/event/participant/zone_add_function_category/

Description: Add a FunctionCategory that is allowed to be built within a Zone.

Name Importance Type Description Values
0 REQUIRED (STAKEHOLDER Integer ID) Stakeholder ID
1 REQUIRED (ZONE Integer ID) Zone ID
2 REQUIRED (Enumeration) FunctionCategory AGRICULTURE, BRIDGE, EDUCATION, GARDEN, HEALTHCARE, INDUSTRY, INTERSECTION, LEISURE, LUXE, NATURE, NORMAL, OFFICES, OTHER, PARK, PAVED_AREA, ROAD, SENIOR, SHOPPING, SOCIAL, STUDENT or UNDERGROUND

Response Codes

Response Code: Description
204 No Content
300-600 Codes Overview

Example POST

Curl example POST:

curl 'https://engine.tygron.com/api/session/event/participant/zone_add_function_category/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, 1, "SOCIAL" ]'

JavaScript example POST:

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, 1, "SOCIAL" ]'
};
fetch("https://engine.tygron.com/api/session/event/participant/zone_add_function_category/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));