{"_id":"553e27376ab7691900ee706d","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"url":""},"body":"Townscript provides read only API for retrieving the information about the registered attendees for the event. We send the data in [JSON](http://www.json.org/) format.","link_external":false,"parentDoc":null,"type":"basic","version":"553e27366ab7691900ee706a","updates":["603506e2dbdbfd006c994fc3"],"__v":12,"category":"553e27376ab7691900ee706b","createdAt":"2015-04-27T12:10:31.694Z","link_url":"","order":0,"project":"553e27366ab7691900ee7067","sync_unique":"","hidden":false,"slug":"getting-started","user":"553e25e78feab90d0059d7a9","excerpt":"","githubsync":"","title":"Getting Started","metadata":{"title":"","description":"","image":[]},"isReference":false,"next":{"description":"","pages":[]},"childrenPages":[]}

Getting Started


Townscript provides read only API for retrieving the information about the registered attendees for the event. We send the data in [JSON](http://www.json.org/) format.
Townscript provides read only API for retrieving the information about the registered attendees for the event. We send the data in [JSON](http://www.json.org/) format.
{"_id":"553e32fa51a3b7190003c0f4","link_external":false,"link_url":"","order":1,"user":"553e25e78feab90d0059d7a9","__v":7,"category":"553e27376ab7691900ee706b","hidden":false,"api":{"auth":"required","params":[{"_id":"5a00598f9b3101001cee9a6d","ref":"","in":"body","required":true,"desc":"You registered email ID on Townscript","default":"","type":"string","name":"emailId"},{"_id":"5a00598f9b3101001cee9a6c","ref":"","in":"body","required":true,"desc":"Your password for email ID","default":"","type":"string","name":"password"}],"results":{"codes":[{"code":"{\n    \"result\": \"Success\",\n    \"data\": \"eyJhbGciOiJIUzUxMiJ9.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.oNteaou8Dv5R7cIs9yjr4qy_1kmAeA\"\n}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"url":"/api/user/loginwithtownscript","examples":{"codes":[{"language":"java","code":""}]},"method":"post","settings":""},"body":"Simply, you need a Townscript API token to access it. \n\nYou will get the token by accessing data key of JSON. \n\n**This Token will be valid for 90 days**","slug":"what-do-you-need-to-access-our-api","sync_unique":"","type":"post","excerpt":"","githubsync":"","parentDoc":null,"project":"553e27366ab7691900ee7067","createdAt":"2015-04-27T13:00:42.139Z","title":"How to access API?","updates":["6035072ce554de00255843f3"],"version":"553e27366ab7691900ee706a","isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

postHow to access API?


Body Params

emailId:
required
string
You registered email ID on Townscript
password:
required
string
Your password for email ID
Simply, you need a Townscript API token to access it. You will get the token by accessing data key of JSON. **This Token will be valid for 90 days**

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Simply, you need a Townscript API token to access it. You will get the token by accessing data key of JSON. **This Token will be valid for 90 days**
{"_id":"553e352c8feab90d0059d7ea","project":"553e27366ab7691900ee7067","title":"Attendees data","version":"553e27366ab7691900ee706a","hidden":false,"link_external":false,"order":2,"link_url":"","sync_unique":"","category":"553e27376ab7691900ee706b","editedParams":true,"githubsync":"","isReference":false,"__v":5,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"result\":\"Success\",\n  \"data\":[\n            {\n              \"userName\":\"attendee1\",\n              \"userEmailId\":\"[email protected]\",\n              \"ticketName\":\"ticket-1\",\n              \"ticketPrice\":\"1000\",\n              \"ticketCurrency\":\"INR\",\n              \"discountType\":\"CODE\",\n              \"discountAmount\":\"50\"\n            },\n            {\n              \"userName\":\"attendee2\",\n              \"userEmailId\":\"[email protected]\",\n              \"ticketName\":\"ticket-2\",\n              \"ticketPrice\":\"600\",\n              \"ticketCurrency\":\"INR\",\n              \"discountType\":\"CODE\",\n              \"discountAmount\":\"70\"\n            }\n         ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/api/registration/getRegisteredUsers","auth":"required","examples":{"codes":[{"language":"java","code":"public static void main(String[] args) throws Exception {\n\t\tHttpURLConnection urlConnection =null;\n\n\t\ttry{\n\n\t\t\tURL url1 = new URL(\"https://www.townscript.com/api/registration/getRegisteredUsers?eventCode=eventcode\");\n\t\t\tString protocol = url1.getProtocol();\n\t\t\tString host =url1.getHost();\n\t\t\tint port = url1.getPort();\n\t\t\tif((port == -1) && (host.contains(\":\"))) {\n\t\t\t\tStringTokenizer st2 = new StringTokenizer(host,\":\");\n\t\t\t\thost = st2.nextElement().toString();\n\t\t\t\tport = Integer.parseInt(st2.nextElement().toString());\n\t\t\t}\n\t\t\tString path = url1.getFile();\n\n\t\t\tURL url = new URL(protocol,host,port,path);\n\n\t\t\turlConnection = (HttpURLConnection)url.openConnection();\n\n\t\t\turlConnection.setConnectTimeout(35000);\n\t\t\turlConnection.setReadTimeout(35000);\n\t\t\turlConnection.setInstanceFollowRedirects(true);\n\n\t\t\turlConnection.setRequestProperty(\"Authorization\",\"YOUR_TOKEN\");\n\t\t\t\n\t\t\tInputStream is = urlConnection.getInputStream();\n\t\t\tInputStreamReader isr = new InputStreamReader(is);\n\n\t\t\tint numCharsRead;\n\t\t\tchar[] charArray = new char[1024];\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\twhile ((numCharsRead = isr.read(charArray)) > 0) {\n\t\t\t\tsb.append(charArray, 0, numCharsRead);\n\t\t\t}\n\t\t\tString result = sb.toString();\n\t\t\tJSONParser parser =  new JSONParser();\n\t\t\tJSONObject obj = (JSONObject)parser.parse(result);\n\t\t\t\n\t\t\tSystem.out.println(\"result: \" + obj.get(\"result\"));\n\t\t\tSystem.out.println(\"data: \" + obj.get(\"data\"));\n\t\t\t\n\t\t\tJSONArray arr = (JSONArray) parser.parse(\"\"+obj.get(\"data\"));\n\t\t\tSystem.out.println(\"attendees size: \" + arr.size());\n\n\t\t} catch(SocketTimeoutException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(e);\n\t\t} \n\t\tfinally {\n\t\t\turlConnection.disconnect();\n\t\t}","name":""}]},"method":"get","params":[{"_id":"553e370051a3b7190003c10a","ref":"","in":"query","required":true,"desc":"Event code is unique short name for an event. It is a required query parameter. If your event link is http://www.townscript.com/example then event code will be example.","default":"","type":"string","name":"eventCode"},{"_id":"5a005b903d47d20024df8970","ref":"","in":"header","required":true,"desc":"You should be passing Token which was retrieved in above API.","default":"","type":"string","name":"Authorization"},{"_id":"5e20211c1af68b0012b79e64","ref":"","in":"query","required":false,"desc":"Date of registration from which you want the data. (Date format ex:\"2019-12-09T23:59:59.000+0530\")","default":"","type":"string","name":"startDate"},{"_id":"5e20211c1af68b0012b79e63","ref":"","in":"query","required":false,"desc":"Date of registration up to which you want the data. (Date format ex:\"2019-12-09T23:59:59.000+0530\")","default":"","type":"string","name":"endDate"}]},"slug":"getting-attendees-data","next":{"pages":[],"description":""},"parentDoc":null,"type":"get","updates":[],"body":"**Note:** All request must be made using [HTTPS](http://en.wikipedia.org/wiki/HTTPS) protocol.","createdAt":"2015-04-27T13:10:04.309Z","editedParams2":true,"excerpt":"","user":"553e25e78feab90d0059d7a9","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getAttendees data


Query Params

eventCode:
required
string
Event code is unique short name for an event. It is a required query parameter. If your event link is http://www.townscript.com/example then event code will be example.
startDate:
string
Date of registration from which you want the data. (Date format ex:"2019-12-09T23:59:59.000+0530")
endDate:
string
Date of registration up to which you want the data. (Date format ex:"2019-12-09T23:59:59.000+0530")

Headers

Authorization:
required
string
You should be passing Token which was retrieved in above API.
**Note:** All request must be made using [HTTPS](http://en.wikipedia.org/wiki/HTTPS) protocol.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



**Note:** All request must be made using [HTTPS](http://en.wikipedia.org/wiki/HTTPS) protocol.
{"_id":"572367417b36300e00926cf5","githubsync":"","link_url":"","next":{"description":"","pages":[]},"order":3,"sync_unique":"","body":"","editedParams":true,"excerpt":"","updates":[],"project":"553e27366ab7691900ee7067","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"result\": \"Success\",\n  \"data\": \"{\\\"id\\\":5309,\\\"name\\\":\\\"Townscript Hackathon\\\",\\\"venueLocation\\\":\\\"Koregaon Park\\\",\\\"startTime\\\":\\\"2015-12-14T18:49:00.000+0530\\\",\\\"city\\\":\\\"Pune\\\",\\\"pinCode\\\":0,\\\"shortName\\\":\\\"townscript-hackathon\\\",\\\"description\\\":\\\"\\<div>Townscript Hackathon</div>\\\",\\\"eventCreatorId\\\":3080,\\\"absoluteBannerImageUrl\\\":\\\"//s3-ap-southeast-1.amazonaws.com/common-resources/city-banners/large/pune.jpg\\\",\\\"absoluteMobileImageUrl\\\":\\\"//s3-ap-southeast-1.amazonaws.com/common-resources/city-banners/mobile/pune.jpg\\\",\\\"organizerName\\\":\\\"Townscript\\\",\\\"isPublic\\\":true,\\\"isRecurrent\\\":false,\\\"endTime\\\":\\\"2016-04-27T23:00:00.000+0530\\\",\\\"eventTypeIndex\\\":0,\\\"latitude\\\":18.536208400000000,\\\"longitude\\\":73.893974800000000,\\\"eventCreationTime\\\":\\\"2015-12-14T17:50:00.000+0530\\\",\\\"soldOutFlag\\\":false,\\\"showOnApp\\\":true,\\\"reportFlag\\\":false,\\\"live\\\":true,\\\"onlineEvent\\\":false}\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/api/eventdata/get","auth":"required","examples":{"codes":[]},"method":"get","params":[{"name":"eventtype","type":"string","default":"","desc":"Event type should always be 0.","required":true,"in":"query","ref":"","_id":"572367417b36300e00926cf7"},{"name":"shortname","type":"string","default":"","desc":"Shortname of the event you want to load.","required":true,"in":"query","ref":"","_id":"572367417b36300e00926cf6"},{"name":"Authorization","type":"string","default":"","desc":"You should be passing Token which was retrieved in above API.","required":true,"in":"header","ref":"","_id":"6214dff8d23cdd00864b0734"}]},"createdAt":"2016-04-29T13:53:05.749Z","parentDoc":null,"slug":"event-data","version":"553e27366ab7691900ee706a","editedParams2":true,"hidden":false,"link_external":false,"title":"Event data","type":"get","user":"553e25e78feab90d0059d7a9","__v":3,"category":"553e27376ab7691900ee706b","isReference":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getEvent data


Query Params

eventtype:
required
string
Event type should always be 0.
shortname:
required
string
Shortname of the event you want to load.

Headers

Authorization:
required
string
You should be passing Token which was retrieved in above API.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"62837596494cca002e1a591f","metadata":{"image":[],"title":"","description":""},"api":{"url":"/api/bookingflow/eventPageData","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{\n    \"result\": \"Success\",\n    \"data\": {\n        \"eventName\": \"Townscript Demo\",\n        \"eventId\": 180236,\n        \"eventLocation\": \"Townscript\",\n        \"eventStartDate\": \"2020-02-08T03:30:00.000+0000\",\n        \"eventEndDate\": \"2020-05-30T04:30:00.000+0000\",\n        \"eventTimeZone\": \"Asia/Calcutta\",\n        \"abbrevTimeZone\": \"IST\",\n        \"normalDisplayTicketList\": [\n            {\n                \"ticket\": {\n                    \"id\": 258049,\n                    \"eventId\": 180236,\n                    \"ticketName\": \"Early bird\",\n                    \"startDate\": 1581046200000,\n                    \"endDate\": 1581132600000,\n                    \"ticketPrice\": 199.00,\n                    \"currency\": \"INR\",\n                    \"totalTickets\": 100,\n                    \"minQuantity\": 5,\n                    \"maxQuantity\": 10,\n                    \"termsAndCondition\": \"Message to attendee\",\n                    \"moreInfo\": null,\n                    \"isWaitingList\": null,\n                    \"ticketStatus\": 0,\n                    \"deductionAmount\": null,\n                    \"paymentChargeOption\": 1,\n                    \"cancelationTillDate\": null,\n                    \"ticketType\": \"NORMAL\",\n                    \"addOn\": false,\n                    \"ticketPosition\": 2,\n                    \"ticketDescription\": \"Ticket includes entry and snacks\",\n                    \"allowGroupRegistration\": true,\n                    \"onlyGroupRegistration\": true,\n                    \"minDonationAmount\": null,\n                    \"ticketCategoryId\": null,\n                    \"userId\": 112,\n                    \"orgTaxCharge\": 12.00,\n                    \"childTicketMap\": [],\n                    \"recurrenceId\": null,\n                    \"recurrenceRuleArray\": null,\n                    \"ticketImageURL\": null,\n                    \"incrementByCount\": 0,\n                    \"disable\": false,\n                    \"mappedWithDtcm\": false,\n                    \"normalNonAddOn\": true,\n                    \"donation\": false,\n                    \"donationNonAddOn\": false,\n                    \"normalAddOn\": false,\n                    \"donationAddOn\": false\n                },\n                \"isoStartDate\": \"2020-02-07T03:30:00.000+0000\",\n                \"isoEndDate\": \"2020-02-08T03:30:00.000+0000\",\n                \"availableCount\": 100,\n                \"categoryName\": null,\n                \"ticketNotAllowedText\": \"SALE ENDED\",\n                \"disableTicketIds\": []\n            },\n            {\n                \"ticket\": {\n                    \"id\": 258057,\n                    \"eventId\": 180236,\n                    \"ticketName\": \"Late Bird\",\n                    \"startDate\": 1581049800000,\n                    \"endDate\": 1581132600000,\n                    \"ticketPrice\": 500.00,\n                    \"currency\": \"INR\",\n                    \"totalTickets\": 100,\n                    \"minQuantity\": 1,\n                    \"maxQuantity\": 10,\n                    \"termsAndCondition\": null,\n                    \"moreInfo\": null,\n                    \"isWaitingList\": null,\n                    \"ticketStatus\": 0,\n                    \"deductionAmount\": null,\n                    \"paymentChargeOption\": 1,\n                    \"cancelationTillDate\": null,\n                    \"ticketType\": \"NORMAL\",\n                    \"addOn\": false,\n                    \"ticketPosition\": 1,\n                    \"ticketDescription\": null,\n                    \"allowGroupRegistration\": true,\n                    \"onlyGroupRegistration\": true,\n                    \"minDonationAmount\": null,\n                    \"ticketCategoryId\": 4000,\n                    \"userId\": 112,\n                    \"orgTaxCharge\": 12.00,\n                    \"childTicketMap\": [\n                        {\n                            \"mapId\": 85358,\n                            \"ticketId\": 258057,\n                            \"childTicketId\": 258061,\n                            \"userId\": null\n                        }\n                    ],\n                    \"recurrenceId\": null,\n                    \"recurrenceRuleArray\": null,\n                    \"ticketImageURL\": null,\n                    \"incrementByCount\": 0,\n                    \"disable\": false,\n                    \"mappedWithDtcm\": false,\n                    \"normalNonAddOn\": true,\n                    \"donation\": false,\n                    \"donationNonAddOn\": false,\n                    \"normalAddOn\": false,\n                    \"donationAddOn\": false\n                },\n                \"isoStartDate\": \"2020-02-07T04:30:00.000+0000\",\n                \"isoEndDate\": \"2020-02-08T03:30:00.000+0000\",\n                \"availableCount\": 100,\n                \"categoryName\": \"Student\",\n                \"ticketNotAllowedText\": \"SALE ENDED\",\n                \"disableTicketIds\": []\n            }\n        ]\n      // other key:values\n    }\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[{"name":"eventCode","type":"string","default":"","desc":"Event code is unique short name for an event. It is a required query parameter. If your event link is http://www.townscript.com/example then event code will be example.","required":true,"in":"query","ref":"","_id":"628376defc580a004b2b7a4a"},{"name":"Authorization","type":"string","default":"","desc":"You should be passing Token which was retrieved in above API.","required":true,"in":"header","ref":"","_id":"628376defc580a004b2b7a4b"}],"examples":{"codes":[]},"method":"get"},"next":{"description":"","pages":[]},"title":"Get Event data with ticket available count","type":"get","slug":"get-event-data-with-ticket-availability","excerpt":"","body":"In order to get the information of tickets from the response object, you can use the following example: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// resp is the response object got from the API call\\nconst data = resp['data']; // actual data\\nconst tickets = data['normalDisplayTicketList']; // array of tickets which are set to allow for bookings\\n\\n// loop through tickets\\nconst ticketsLen = tickets.length;\\nfor (var i = 0; i < ticketsLen; i++) {\\n  \\n  const ticketFullInfo = tickets[i]; // will hold the ticket info with available count\\n  \\n  const ticket = ticketFullInfo['ticket']; // Static info of ticket like - name, total count, sales start/end dates, price etc\\n  \\n  const ticketName = ticket['ticketName']; // Ticket name\\n  const ticketPrice = ticket['ticketPrice']; // Ticket price\\n  const totalTicketCount = ticket['totalTickets']; // Total tickets can be purchased \\n  \\n  const availableTicketCount = ticketFullInfo['availableCount']; // Number of tickets which are currently available\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-05-17T10:14:46.286Z","user":"553e25e78feab90d0059d7a9","category":"553e27376ab7691900ee706b","version":"553e27366ab7691900ee706a","project":"553e27366ab7691900ee7067","__v":9,"parentDoc":null,"childrenPages":[]}

getGet Event data with ticket available count


Query Params

eventCode:
required
string
Event code is unique short name for an event. It is a required query parameter. If your event link is http://www.townscript.com/example then event code will be example.

Headers

Authorization:
required
string
You should be passing Token which was retrieved in above API.
In order to get the information of tickets from the response object, you can use the following example: [block:code] { "codes": [ { "code": "// resp is the response object got from the API call\nconst data = resp['data']; // actual data\nconst tickets = data['normalDisplayTicketList']; // array of tickets which are set to allow for bookings\n\n// loop through tickets\nconst ticketsLen = tickets.length;\nfor (var i = 0; i < ticketsLen; i++) {\n \n const ticketFullInfo = tickets[i]; // will hold the ticket info with available count\n \n const ticket = ticketFullInfo['ticket']; // Static info of ticket like - name, total count, sales start/end dates, price etc\n \n const ticketName = ticket['ticketName']; // Ticket name\n const ticketPrice = ticket['ticketPrice']; // Ticket price\n const totalTicketCount = ticket['totalTickets']; // Total tickets can be purchased \n \n const availableTicketCount = ticketFullInfo['availableCount']; // Number of tickets which are currently available\n}", "language": "javascript" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



In order to get the information of tickets from the response object, you can use the following example: [block:code] { "codes": [ { "code": "// resp is the response object got from the API call\nconst data = resp['data']; // actual data\nconst tickets = data['normalDisplayTicketList']; // array of tickets which are set to allow for bookings\n\n// loop through tickets\nconst ticketsLen = tickets.length;\nfor (var i = 0; i < ticketsLen; i++) {\n \n const ticketFullInfo = tickets[i]; // will hold the ticket info with available count\n \n const ticket = ticketFullInfo['ticket']; // Static info of ticket like - name, total count, sales start/end dates, price etc\n \n const ticketName = ticket['ticketName']; // Ticket name\n const ticketPrice = ticket['ticketPrice']; // Ticket price\n const totalTicketCount = ticket['totalTickets']; // Total tickets can be purchased \n \n const availableTicketCount = ticketFullInfo['availableCount']; // Number of tickets which are currently available\n}", "language": "javascript" } ] } [/block]
{"_id":"58f6fe303de9890f0059044e","__v":3,"body":"","parentDoc":null,"title":"Get All Upcoming Events","user":"553e25e78feab90d0059d7a9","link_url":"","order":5,"slug":"get-all-upcoming-events","type":"get","updates":["624588526b5d970253130590"],"excerpt":"This API will load all upcoming events for a given user","githubsync":"","link_external":false,"next":{"description":"","pages":[]},"sync_unique":"","isReference":false,"project":"553e27366ab7691900ee7067","version":"553e27366ab7691900ee706a","api":{"settings":"","url":"/api/eventdata/getallupcomingeventsforuser","auth":"required","examples":{"codes":[]},"method":"get","params":[{"_id":"58f700616b06d00f00e249b8","ref":"","in":"query","required":true,"desc":"This is required user id for you which will be given by us.","default":"","type":"int","name":"userid"},{"_id":"5a005be3c69c2b0024a48c40","ref":"","in":"header","required":true,"desc":"You should be passing Token which was retrieved in above API.","default":"","type":"string","name":"Authorization"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n  \"result\": \"Success\",\n  \"data\": \"[{\\\"id\\\":999999,\\\"name\\\":\\\"Lorem Ipsum 1\\\",\\\"startTime\\\":\\\"2017-04-22T09:00:00.000+0530\\\",\\\"city\\\":\\\"Bangalore\\\",\\\"shortName\\\":\\\"lorem-ipsum-1\\\",\\\"endTime\\\":\\\"2017-04-23T17:30:00.000+0530\\\",\\\"s3ImageName\\\":\\\"lorem-ipsum.png\\\",\\\"s3MobileImageName\\\":\\\"lorem-ipsum-mobile.png\\\",\\\"live\\\":true,\\\"draft\\\":false,\\\"minimumTicketPrice\\\":26000,\\\"minimumTicketPriceCurrency\\\":\\\"INR\\\",\\\"eventTopic\\\":\\\"TESTING\\\",\\\"absoluteBannerImageUrl\\\":\\\"//s3-ap-southeast-1.amazonaws.com/townscript/images/lorem-ipsum.png\\\",\\\"absoluteMobileImageUrl\\\":\\\"//s3-ap-southeast-1.amazonaws.com/townscript/images/mobile-cover-uploaded/lorem-ipsum-mobile.png\\\",\\\"soldOutFlag\\\":false},{\\\"id\\\":333333,\\\"name\\\":\\\"Lorem Ipsum 2\\\",\\\"startTime\\\":\\\"2017-04-29T09:00:00.000+0530\\\",\\\"city\\\":\\\"Chennai\\\",\\\"shortName\\\":\\\"lorem-ipsum-2\\\",\\\"endTime\\\":\\\"2017-04-30T05:30:00.000+0530\\\",\\\"s3ImageName\\\":\\\"lorem-ipsum.png\\\",\\\"s3MobileImageName\\\":\\lorem-ipsum-mobile.png\\\",\\\"live\\\":true,\\\"draft\\\":false,\\\"eventTopic\\\":\\\"TESTING\\\",\\\"absoluteBannerImageUrl\\\":\\\"//s3-ap-southeast-1.amazonaws.com/townscript/images/lorem-ipsum.png\\\",\\\"absoluteMobileImageUrl\\\":\\\"//s3-ap-southeast-1.amazonaws.com/townscript/images/mobile-cover-uploaded/lorem-ipsum-mobile.png\\\",\\\"soldOutFlag\\\":true}]\"\n}"},{"status":400,"language":"json","code":"{}","name":""}]}},"category":"553e27376ab7691900ee706b","createdAt":"2017-04-19T06:05:36.493Z","hidden":false,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getGet All Upcoming Events

This API will load all upcoming events for a given user

Query Params

userid:
required
integer
This is required user id for you which will be given by us.

Headers

Authorization:
required
string
You should be passing Token which was retrieved in above API.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



{"_id":"553e3dcc8feab90d0059d81d","body":"If request parameters are valid then following JSON will be returned as an output :\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\":\\\"Success\\\",\\n\\t\\\"data\\\":[\\n  \\t\\t\\t\\t\\t{\\n              \\\"userName\\\":\\\"attendee1\\\",\\n              \\\"userEmailId\\\":\\\"[email protected]\\\",\\n              \\\"ticketName\\\":\\\"ticket-1\\\",\\n              \\\"ticketPrice\\\":\\\"1000\\\",\\n              \\\"ticketCurrency\\\":\\\"INR\\\",\\n              \\\"discountType\\\":\\\"CODE\\\",\\n              \\\"discountAmount\\\":\\\"50\\\"\\n            },\\n\\t\\t\\t\\t\\t\\t{\\n              \\\"userName\\\":\\\"attendee2\\\",\\n              \\\"userEmailId\\\":\\\"[email protected]\\\",\\n              \\\"ticketName\\\":\\\"ticket-2\\\",\\n              \\\"ticketPrice\\\":\\\"600\\\",\\n              \\\"ticketCurrency\\\":\\\"INR\\\",\\n              \\\"discountType\\\":\\\"CODE\\\",\\n              \\\"discountAmount\\\":\\\"70\\\"\\n            }\\n\\t\\t\\t\\t ]\\n}\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","order":6,"user":"553e25e78feab90d0059d7a9","category":"553e27376ab7691900ee706b","link_external":false,"link_url":"","slug":"reading-the-json-attendee-data","sync_unique":"","version":"553e27366ab7691900ee706a","createdAt":"2015-04-27T13:46:52.724Z","title":"Attendee data format","updates":[],"parentDoc":null,"project":"553e27366ab7691900ee7067","__v":3,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"url":""},"excerpt":"","githubsync":"","hidden":false,"type":"basic","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Attendee data format


If request parameters are valid then following JSON will be returned as an output : [block:code] { "codes": [ { "code": "{\n \"result\":\"Success\",\n\t\"data\":[\n \t\t\t\t\t{\n \"userName\":\"attendee1\",\n \"userEmailId\":\"[email protected]\",\n \"ticketName\":\"ticket-1\",\n \"ticketPrice\":\"1000\",\n \"ticketCurrency\":\"INR\",\n \"discountType\":\"CODE\",\n \"discountAmount\":\"50\"\n },\n\t\t\t\t\t\t{\n \"userName\":\"attendee2\",\n \"userEmailId\":\"[email protected]\",\n \"ticketName\":\"ticket-2\",\n \"ticketPrice\":\"600\",\n \"ticketCurrency\":\"INR\",\n \"discountType\":\"CODE\",\n \"discountAmount\":\"70\"\n }\n\t\t\t\t ]\n}\n", "language": "json" } ] } [/block]
If request parameters are valid then following JSON will be returned as an output : [block:code] { "codes": [ { "code": "{\n \"result\":\"Success\",\n\t\"data\":[\n \t\t\t\t\t{\n \"userName\":\"attendee1\",\n \"userEmailId\":\"[email protected]\",\n \"ticketName\":\"ticket-1\",\n \"ticketPrice\":\"1000\",\n \"ticketCurrency\":\"INR\",\n \"discountType\":\"CODE\",\n \"discountAmount\":\"50\"\n },\n\t\t\t\t\t\t{\n \"userName\":\"attendee2\",\n \"userEmailId\":\"[email protected]\",\n \"ticketName\":\"ticket-2\",\n \"ticketPrice\":\"600\",\n \"ticketCurrency\":\"INR\",\n \"discountType\":\"CODE\",\n \"discountAmount\":\"70\"\n }\n\t\t\t\t ]\n}\n", "language": "json" } ] } [/block]
{"_id":"553e3f9151a3b7190003c12a","order":7,"project":"553e27366ab7691900ee7067","slug":"error-message-list","__v":4,"category":"553e27376ab7691900ee706b","createdAt":"2015-04-27T13:54:25.961Z","excerpt":"","githubsync":"","api":{"auth":"required","params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"url":""},"hidden":false,"link_external":false,"link_url":"","title":"Error message list","type":"basic","version":"553e27366ab7691900ee706a","body":"If request parameters are invalid then following JSON will be returned as an output :\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\":\\\"Error\\\",\\n\\t\\\"data\\\":\\\"<email-id> doesn't have any API key registration\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis error scenario occurs when email in request header is invalid.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\":\\\"Error\\\",\\n\\t\\\"data\\\":\\\"Request Signature is invalid\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis error scenario occurs when secure_key in request header is invalid.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\":\\\"Error\\\",\\n\\t\\\"data\\\":\\\"No data found for the event - <event code>\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis error scenario occurs when eventCode in query parameter is invalid.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\":\\\"Error\\\",\\n\\t\\\"data\\\":\\\"This request doesn't have security signature\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis error scenario occurs when you forgot to add secure_key in request header.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\":\\\"Error\\\",\\n\\t\\\"data\\\":\\\"This request doesn't have registered Email Info\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis error scenario occurs when you forgot to add email in request header.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"result\\\":\\\"Error\\\",\\n\\t\\\"data\\\":\\\"Security credentials doesn't match, check your API key or email.\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis error scenario occurs when email and secure_key does not match.","parentDoc":null,"sync_unique":"","updates":[],"user":"553e25e78feab90d0059d7a9","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Error message list


If request parameters are invalid then following JSON will be returned as an output : [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"<email-id> doesn't have any API key registration\"\n}", "language": "json" } ] } [/block] This error scenario occurs when email in request header is invalid. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"Request Signature is invalid\"\n}", "language": "json" } ] } [/block] This error scenario occurs when secure_key in request header is invalid. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"No data found for the event - <event code>\"\n}", "language": "json" } ] } [/block] This error scenario occurs when eventCode in query parameter is invalid. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"This request doesn't have security signature\"\n}", "language": "json" } ] } [/block] This error scenario occurs when you forgot to add secure_key in request header. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"This request doesn't have registered Email Info\"\n}", "language": "json" } ] } [/block] This error scenario occurs when you forgot to add email in request header. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"Security credentials doesn't match, check your API key or email.\"\n}", "language": "json" } ] } [/block] This error scenario occurs when email and secure_key does not match.
If request parameters are invalid then following JSON will be returned as an output : [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"<email-id> doesn't have any API key registration\"\n}", "language": "json" } ] } [/block] This error scenario occurs when email in request header is invalid. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"Request Signature is invalid\"\n}", "language": "json" } ] } [/block] This error scenario occurs when secure_key in request header is invalid. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"No data found for the event - <event code>\"\n}", "language": "json" } ] } [/block] This error scenario occurs when eventCode in query parameter is invalid. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"This request doesn't have security signature\"\n}", "language": "json" } ] } [/block] This error scenario occurs when you forgot to add secure_key in request header. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"This request doesn't have registered Email Info\"\n}", "language": "json" } ] } [/block] This error scenario occurs when you forgot to add email in request header. [block:code] { "codes": [ { "code": "{\n \"result\":\"Error\",\n\t\"data\":\"Security credentials doesn't match, check your API key or email.\"\n}", "language": "json" } ] } [/block] This error scenario occurs when email and secure_key does not match.
{"_id":"553e3f0b6ab7691900ee70da","body":"A webhook is an API concept that’s growing in popularity. As more and more of what we do on the web can be described by events, webhooks are becoming even more applicable. They’re incredibly useful and a resource-light way to implement event reactions.\n\nSo, what exactly is a webhook? A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer.","project":"553e27366ab7691900ee7067","user":"553e25e78feab90d0059d7a9","version":"553e27366ab7691900ee706a","createdAt":"2015-04-27T13:52:11.328Z","excerpt":"","hidden":false,"type":"basic","updates":[],"category":"553e27376ab7691900ee706b","order":8,"parentDoc":null,"slug":"we-also-accept-webhook-url","sync_unique":"","__v":1,"api":{"auth":"required","params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"url":""},"githubsync":"","link_external":false,"link_url":"","title":"Webhook","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Webhook


A webhook is an API concept that’s growing in popularity. As more and more of what we do on the web can be described by events, webhooks are becoming even more applicable. They’re incredibly useful and a resource-light way to implement event reactions. So, what exactly is a webhook? A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer.
A webhook is an API concept that’s growing in popularity. As more and more of what we do on the web can be described by events, webhooks are becoming even more applicable. They’re incredibly useful and a resource-light way to implement event reactions. So, what exactly is a webhook? A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer.
{"_id":"553e45da51a3b7190003c150","project":"553e27366ab7691900ee7067","user":"553e25e78feab90d0059d7a9","version":"553e27366ab7691900ee706a","api":{"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"hidden":false,"isReference":false,"link_url":"","slug":"get-notified-on-your-server-regarding-new-registra","updates":[],"category":"553e27376ab7691900ee706b","createdAt":"2015-04-27T14:21:14.814Z","excerpt":"Get notified on your server regarding new registration","githubsync":"","next":{"description":"","pages":[]},"order":9,"type":"basic","__v":7,"body":"We will post successfully registered attendee data in [JSON](http://www.json.org) format on given URL by user.\n\nYou can add your server listener URL on [Townscript dashboard] (http://www.townscript.com/dashboard) > Select Event  > Settings > Settings for your website > Get Registration Notification on your website\n\nWe will send the data in following format using post parameter “data”:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"userEmailId\\\":\\\"[email protected]\\\",\\n  \\\"userName\\\":\\\"John Doe\\\",\\n  \\\"currency\\\":\\\"INR\\\",                       // Transaction Currency\\n  \\\"ticketName\\\":\\\"Ticket Name\\\",\\n  \\\"eventName\\\":\\\"Townscript: Best Event Ticketing Platform\\\",\\n  \\\"eventCode\\\":\\\"townscript-best\\\",\\n  \\\"ticketPrice\\\":600,\\n  \\\"discountCode\\\": \\\"EARLY100\\\",\\t\\t\\t\\t\\t\\t\\t// NA, if no discount was applied\\n  \\\"discountAmount\\\":100,\\n  \\\"customQuestion1\\\":\\\"customValue1\\\",\\t\\t\\t\\t// deprecated, use answerList key\\n  \\\"customQuestion20\\\":\\\"customValue20\\\",     // deprecated, use answerList key\\n  \\\"answerList\\\":[\\n    {\\n    \\t\\\"uniqueQuestionId\\\": 111,\\n      \\\"question\\\": \\\"Country\\\",\\n      \\\"answer\\\": \\\"India\\\"\\n    },\\n    {\\n    \\t\\\"uniqueQuestionId\\\": 222,\\n      \\\"question\\\": \\\"Have you been at Taj Mahal?\\\",\\n      \\\"answer\\\": \\\"Yes\\\"\\n    }\\n  ],\\n  \\\"uniqueOrderId\\\":\\\"9347234294742974\\\",\\n  \\\"registrationTimestamp\\\":\\\"2014-08-22 06:41:27\\\"\\n}\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nJSON data when single registration happens.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[{\\n  \\\"userEmailId\\\":\\\"[email protected]\\\",\\n  \\\"userName\\\":\\\"John Doe1\\\",\\n  \\\"currency\\\":\\\"INR\\\",                      // Transaction Currency\\n  \\\"ticketName\\\":\\\"Ticket Name\\\",\\n  \\\"eventName\\\":\\\"Townscript: Best Event Ticketing Platform\\\",\\n  \\\"eventCode\\\":\\\"townscript-best\\\",\\n  \\\"ticketPrice\\\":600,\\n  \\\"discountCode\\\": \\\"EARLY100\\\",\\t\\t\\t\\t\\t\\t // NA, if no discount was applied\\n  \\\"discountAmount\\\":100,\\n  \\\"customQuestion1\\\":\\\"customValue1\\\",      // deprecated, use answerList key\\n  \\\"customQuestion20\\\":\\\"customValue20\\\",    // deprecated, use answerList key\\n  \\\"answerList\\\":[\\n    {\\n    \\t\\\"uniqueQuestionId\\\": 111,\\n      \\\"question\\\": \\\"Country\\\",\\n      \\\"answer\\\": \\\"India\\\"\\n    },\\n    {\\n    \\t\\\"uniqueQuestionId\\\": 222,\\n      \\\"question\\\": \\\"Have you been at Taj Mahal?\\\",\\n      \\\"answer\\\": \\\"Yes\\\"\\n    }\\n  ],\\n  \\\"uniqueOrderId\\\":\\\"9347234294742974\\\",\\n  \\\"registrationTimestamp\\\":\\\"2014-08-22 06:41:27\\\"\\n},\\n {\\n   \\\"userEmailId\\\":\\\"[email protected]\\\",\\n   \\\"userName\\\":\\\"John Doe2\\\",\\n   \\\"currency\\\":\\\"INR\\\",                     // Transaction Currency\\n   \\\"ticketName\\\":\\\"Ticket Name\\\",\\n   \\\"eventName\\\":\\\"Townscript: Best Event Ticketing Platform\\\",\\n   \\\"eventCode\\\":\\\"townscript-best\\\",\\n   \\\"ticketPrice\\\":600,\\n   \\\"discountCode\\\": \\\"EARLY100\\\",\\t\\t\\t\\t\\t // NA, if no discount was applied\\n   \\\"discountAmount\\\":100,\\n   \\\"customQuestion1\\\":\\\"customValue1\\\",     // deprecated, use answerList key\\n   \\\"customQuestion20\\\":\\\"customValue20\\\",   // deprecated, use answerList key\\n   \\\"answerList\\\":[\\n    {\\n    \\t\\\"uniqueQuestionId\\\": 111,\\n      \\\"question\\\": \\\"Country\\\",\\n      \\\"answer\\\": \\\"United States of America\\\"\\n    },\\n    {\\n    \\t\\\"uniqueQuestionId\\\": 222,\\n      \\\"question\\\": \\\"Have you been at Taj Mahal?\\\",\\n      \\\"answer\\\": \\\"No\\\"\\n    }\\n  ],\\n   \\\"uniqueOrderId\\\":\\\"9347234294742974\\\",\\n   \\\"registrationTimestamp\\\":\\\"2014-08-22 06:41:27\\\"\\n }]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nIf multiple attendees are registered then we will post the data in JSON array.","link_external":false,"parentDoc":null,"sync_unique":"","title":"Server notification API","metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Server notification API

Get notified on your server regarding new registration

We will post successfully registered attendee data in [JSON](http://www.json.org) format on given URL by user. You can add your server listener URL on [Townscript dashboard] (http://www.townscript.com/dashboard) > Select Event > Settings > Settings for your website > Get Registration Notification on your website We will send the data in following format using post parameter “data”: [block:code] { "codes": [ { "code": "{\n \"userEmailId\":\"[email protected]\",\n \"userName\":\"John Doe\",\n \"currency\":\"INR\", // Transaction Currency\n \"ticketName\":\"Ticket Name\",\n \"eventName\":\"Townscript: Best Event Ticketing Platform\",\n \"eventCode\":\"townscript-best\",\n \"ticketPrice\":600,\n \"discountCode\": \"EARLY100\",\t\t\t\t\t\t\t// NA, if no discount was applied\n \"discountAmount\":100,\n \"customQuestion1\":\"customValue1\",\t\t\t\t// deprecated, use answerList key\n \"customQuestion20\":\"customValue20\", // deprecated, use answerList key\n \"answerList\":[\n {\n \t\"uniqueQuestionId\": 111,\n \"question\": \"Country\",\n \"answer\": \"India\"\n },\n {\n \t\"uniqueQuestionId\": 222,\n \"question\": \"Have you been at Taj Mahal?\",\n \"answer\": \"Yes\"\n }\n ],\n \"uniqueOrderId\":\"9347234294742974\",\n \"registrationTimestamp\":\"2014-08-22 06:41:27\"\n}\n", "language": "json" } ] } [/block] JSON data when single registration happens. [block:code] { "codes": [ { "code": "[{\n \"userEmailId\":\"[email protected]\",\n \"userName\":\"John Doe1\",\n \"currency\":\"INR\", // Transaction Currency\n \"ticketName\":\"Ticket Name\",\n \"eventName\":\"Townscript: Best Event Ticketing Platform\",\n \"eventCode\":\"townscript-best\",\n \"ticketPrice\":600,\n \"discountCode\": \"EARLY100\",\t\t\t\t\t\t // NA, if no discount was applied\n \"discountAmount\":100,\n \"customQuestion1\":\"customValue1\", // deprecated, use answerList key\n \"customQuestion20\":\"customValue20\", // deprecated, use answerList key\n \"answerList\":[\n {\n \t\"uniqueQuestionId\": 111,\n \"question\": \"Country\",\n \"answer\": \"India\"\n },\n {\n \t\"uniqueQuestionId\": 222,\n \"question\": \"Have you been at Taj Mahal?\",\n \"answer\": \"Yes\"\n }\n ],\n \"uniqueOrderId\":\"9347234294742974\",\n \"registrationTimestamp\":\"2014-08-22 06:41:27\"\n},\n {\n \"userEmailId\":\"[email protected]\",\n \"userName\":\"John Doe2\",\n \"currency\":\"INR\", // Transaction Currency\n \"ticketName\":\"Ticket Name\",\n \"eventName\":\"Townscript: Best Event Ticketing Platform\",\n \"eventCode\":\"townscript-best\",\n \"ticketPrice\":600,\n \"discountCode\": \"EARLY100\",\t\t\t\t\t // NA, if no discount was applied\n \"discountAmount\":100,\n \"customQuestion1\":\"customValue1\", // deprecated, use answerList key\n \"customQuestion20\":\"customValue20\", // deprecated, use answerList key\n \"answerList\":[\n {\n \t\"uniqueQuestionId\": 111,\n \"question\": \"Country\",\n \"answer\": \"United States of America\"\n },\n {\n \t\"uniqueQuestionId\": 222,\n \"question\": \"Have you been at Taj Mahal?\",\n \"answer\": \"No\"\n }\n ],\n \"uniqueOrderId\":\"9347234294742974\",\n \"registrationTimestamp\":\"2014-08-22 06:41:27\"\n }]", "language": "json" } ] } [/block] If multiple attendees are registered then we will post the data in JSON array.
We will post successfully registered attendee data in [JSON](http://www.json.org) format on given URL by user. You can add your server listener URL on [Townscript dashboard] (http://www.townscript.com/dashboard) > Select Event > Settings > Settings for your website > Get Registration Notification on your website We will send the data in following format using post parameter “data”: [block:code] { "codes": [ { "code": "{\n \"userEmailId\":\"[email protected]\",\n \"userName\":\"John Doe\",\n \"currency\":\"INR\", // Transaction Currency\n \"ticketName\":\"Ticket Name\",\n \"eventName\":\"Townscript: Best Event Ticketing Platform\",\n \"eventCode\":\"townscript-best\",\n \"ticketPrice\":600,\n \"discountCode\": \"EARLY100\",\t\t\t\t\t\t\t// NA, if no discount was applied\n \"discountAmount\":100,\n \"customQuestion1\":\"customValue1\",\t\t\t\t// deprecated, use answerList key\n \"customQuestion20\":\"customValue20\", // deprecated, use answerList key\n \"answerList\":[\n {\n \t\"uniqueQuestionId\": 111,\n \"question\": \"Country\",\n \"answer\": \"India\"\n },\n {\n \t\"uniqueQuestionId\": 222,\n \"question\": \"Have you been at Taj Mahal?\",\n \"answer\": \"Yes\"\n }\n ],\n \"uniqueOrderId\":\"9347234294742974\",\n \"registrationTimestamp\":\"2014-08-22 06:41:27\"\n}\n", "language": "json" } ] } [/block] JSON data when single registration happens. [block:code] { "codes": [ { "code": "[{\n \"userEmailId\":\"[email protected]\",\n \"userName\":\"John Doe1\",\n \"currency\":\"INR\", // Transaction Currency\n \"ticketName\":\"Ticket Name\",\n \"eventName\":\"Townscript: Best Event Ticketing Platform\",\n \"eventCode\":\"townscript-best\",\n \"ticketPrice\":600,\n \"discountCode\": \"EARLY100\",\t\t\t\t\t\t // NA, if no discount was applied\n \"discountAmount\":100,\n \"customQuestion1\":\"customValue1\", // deprecated, use answerList key\n \"customQuestion20\":\"customValue20\", // deprecated, use answerList key\n \"answerList\":[\n {\n \t\"uniqueQuestionId\": 111,\n \"question\": \"Country\",\n \"answer\": \"India\"\n },\n {\n \t\"uniqueQuestionId\": 222,\n \"question\": \"Have you been at Taj Mahal?\",\n \"answer\": \"Yes\"\n }\n ],\n \"uniqueOrderId\":\"9347234294742974\",\n \"registrationTimestamp\":\"2014-08-22 06:41:27\"\n},\n {\n \"userEmailId\":\"[email protected]com\",\n \"userName\":\"John Doe2\",\n \"currency\":\"INR\", // Transaction Currency\n \"ticketName\":\"Ticket Name\",\n \"eventName\":\"Townscript: Best Event Ticketing Platform\",\n \"eventCode\":\"townscript-best\",\n \"ticketPrice\":600,\n \"discountCode\": \"EARLY100\",\t\t\t\t\t // NA, if no discount was applied\n \"discountAmount\":100,\n \"customQuestion1\":\"customValue1\", // deprecated, use answerList key\n \"customQuestion20\":\"customValue20\", // deprecated, use answerList key\n \"answerList\":[\n {\n \t\"uniqueQuestionId\": 111,\n \"question\": \"Country\",\n \"answer\": \"United States of America\"\n },\n {\n \t\"uniqueQuestionId\": 222,\n \"question\": \"Have you been at Taj Mahal?\",\n \"answer\": \"No\"\n }\n ],\n \"uniqueOrderId\":\"9347234294742974\",\n \"registrationTimestamp\":\"2014-08-22 06:41:27\"\n }]", "language": "json" } ] } [/block] If multiple attendees are registered then we will post the data in JSON array.
{"_id":"562487584b2ddc0d00165ad6","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"link_url":"","parentDoc":null,"slug":"pre-fill-data","type":"basic","updates":[],"user":"553e25e78feab90d0059d7a9","__v":23,"category":"553e27376ab7691900ee706b","excerpt":"If you want your users to have pre-filled Data on Townscript's forms.","project":"553e27366ab7691900ee7067","version":"553e27366ab7691900ee706a","hidden":false,"order":10,"title":"Pre-fill Data","githubsync":"","createdAt":"2015-10-19T06:02:00.380Z","link_external":false,"sync_unique":"","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"For users registering using Townscript.com\"\n}\n[/block]\nBelow is the format for sending the Pre-filled data to Townscript booking page - \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://www.townscript.com/v2/e/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nHere **<event-code>, <ticket-name>, <ticket-quantity>, <attendee-name>, <attendee-emailId>, <discount-code>, <answer-for-custom-question>** are the parameters, which should be replaced by actual values.\n\n**TICKET SELECTION**\n**td-<ticket-name>=<ticket-quantity>**\n**td-** prefix should be added with exact ticket name and selection quantity should be passed in place of **<ticket-quantity> **\n\n**ATTENDEE BASIC DETAILS**\n**emailId=<attendee-email>**  <attendee-email> should be replaced by desired email\n**name=<attendee-name>** \nOR\nIf collecting name as First Name , Last Name please use \n**firstname=<attendee-firstname>**\n**lastname=<attendee-lastname>**\n\n**FORM QUESTIONS**\n**`cq<custom-question-number>` can be Custom Question of type **Text, Contact No.,  Text Area, Date, Select, Radio, Multiple Choice Checkbox**.\nex: **cq6** for Custom Question 6th as per sequence in the booking flow.\n\n**Answer for Custom Question formats:**\nDate String format should be **DD-MM-YYYY**\nMultiple Choice checkbox Answers should exact selections with **\",\"** separated.\nAll other Answer should be exact the same as how you want with **Case sensitivity**\n\n**NOTE :**\nValidate data for same before hitting our servers.\nParameters are **Case Sensitive**\nData for only **First attendee** can be pre-filled\n\nExample 1 :-\nSelecting 2 tickets **ticket-name-1** and **ticket-name-2** with quantity 5 and 6 respectively.\nName of attendee - John Dave\nEmail of attendee - [email protected]\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nIf Name Split setting used\nFirst Name - John\nLast Name - Dave\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&firstname=John&lastname=Dave&[email protected]\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nExample 2:-\nPrefilling following attendee information \nName: Mary Diesel\nEmail: [email protected]\nAnswer to the first question in attendee view (Contact Info):  11234567890\nAnswer to the second question in attendee view (City):  Mumbai\nAnswer to the third question in attendee view (Date of Birth):  24-09-1992\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://www.townscript.com/v2/e/<event-code>/booking?cq1=11234567890&cq2=Mumbai&cq3=24-09-1992&name=Mary Diesel&[email protected]\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"For users registering using Widget on your website.\"\n}\n[/block]\nSending **Attendee's Data** and/or **Ticket Information** and/or **Discount** to be applied pre-filled\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script>\\n    function getPreFilledDataTS(){\\n       // All the fields are optional\\n        return {\\n            name: \\t\\t\\t\\t\\\"<attendee-name>\\\",\\n            emailid: \\t\\t\\t\\\"<attendee-emailId>\\\",\\n            discountcode: \\\"<discount-code>\\\",\\n          \\tcq1:\\t\\t\\t\\t\\t\\\"<answer-for-custom-question-1>\\\",\\n          \\tcq6:\\t\\t\\t\\t\\t\\\"<answer-for-custom-question-6>\\\",\\n            td-ticketname1: <ticket-quantity>,\\n            td-ticketname2: <ticket-quantity>\\n        }\\n    }\\n</script>\\n<button onclick=\\\"popupWithParams('<event-code>',getPreFilledDataTS());\\\" class=\\\"tsbutton\\\">Register Now</button>\\n<noscript id=\\\"tsNoJsMsg\\\">Javascript on your browser is not enabled.</noscript><script src=\\\"https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js\\\" type=\\\"text/javascript\\\"></script>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nHere **<event-code>, <ticket-name>, <ticket-quantity>, <attendee-name>, <attendee-emailId>, <discount-code>** are the parameters, which should be replaced by actual values.\n\nIf you wish to not send some information you can just skip that `key`, `value` set from your JSON.\n\nEx: If you wish not to send any Ticket related Info :\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script>\\n    function getPreFilledDataTS(){\\n        return {\\n            name: \\t\\t\\t\\t\\\"<attendee-name>\\\",\\n            emailid: \\t\\t\\t\\\"<attendee-emailId>\\\",\\n            discountcode: \\\"<discount-code>\\\"\\n        }\\n    }\\n</script>\\n<button onclick=\\\"popupWithParams('<event-code>',getPreFilledDataTS());\\\" class=\\\"tsbutton\\\">Register Now</button>\\n<noscript id=\\\"tsNoJsMsg\\\">Javascript on your browser is not enabled.</noscript><script src=\\\"https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js\\\" type=\\\"text/javascript\\\"></script>\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n**NOTE :**\nParameters are **Case Sensitive**\nData for only **First attendee** can be pre-filled and\n\nCurrent Limitation: Tickets hidden with access code, can not be increased with autofill.\n\n[block:api-header]\n{\n  \"title\": \"For users registering using Townscript Iframe\"\n}\n[/block]\nTo perform pre-filling data in iframe, you need to generate src of iframe or iframe itself dynamically each time.\n\nFollowing is the iframe code for reference -\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<iframe src=\\\"https://www.townscript.com/v2/widget/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>\\\" frameborder=\\\"0\\\" height=\\\"600px\\\" width=\\\"100%\\\"></iframe>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nEg1:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<iframe src=\\\"https://www.townscript.com/v2/widget/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]\\\" frameborder=\\\"0\\\" height=\\\"600px\\\" width=\\\"100%\\\"></iframe>\\n\\n\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]","isReference":false,"next":{"description":"","pages":[]},"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Pre-fill Data

If you want your users to have pre-filled Data on Townscript's forms.

[block:api-header] { "type": "basic", "title": "For users registering using Townscript.com" } [/block] Below is the format for sending the Pre-filled data to Townscript booking page - [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>", "language": "html" } ] } [/block] Here **<event-code>, <ticket-name>, <ticket-quantity>, <attendee-name>, <attendee-emailId>, <discount-code>, <answer-for-custom-question>** are the parameters, which should be replaced by actual values. **TICKET SELECTION** **td-<ticket-name>=<ticket-quantity>** **td-** prefix should be added with exact ticket name and selection quantity should be passed in place of **<ticket-quantity> ** **ATTENDEE BASIC DETAILS** **emailId=<attendee-email>** <attendee-email> should be replaced by desired email **name=<attendee-name>** OR If collecting name as First Name , Last Name please use **firstname=<attendee-firstname>** **lastname=<attendee-lastname>** **FORM QUESTIONS** **`cq<custom-question-number>` can be Custom Question of type **Text, Contact No., Text Area, Date, Select, Radio, Multiple Choice Checkbox**. ex: **cq6** for Custom Question 6th as per sequence in the booking flow. **Answer for Custom Question formats:** Date String format should be **DD-MM-YYYY** Multiple Choice checkbox Answers should exact selections with **","** separated. All other Answer should be exact the same as how you want with **Case sensitivity** **NOTE :** Validate data for same before hitting our servers. Parameters are **Case Sensitive** Data for only **First attendee** can be pre-filled Example 1 :- Selecting 2 tickets **ticket-name-1** and **ticket-name-2** with quantity 5 and 6 respectively. Name of attendee - John Dave Email of attendee - [email protected] [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]", "language": "html" } ] } [/block] If Name Split setting used First Name - John Last Name - Dave [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&firstname=John&lastname=Dave&[email protected]", "language": "html" } ] } [/block] Example 2:- Prefilling following attendee information Name: Mary Diesel Email: [email protected] Answer to the first question in attendee view (Contact Info): 11234567890 Answer to the second question in attendee view (City): Mumbai Answer to the third question in attendee view (Date of Birth): 24-09-1992 [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?cq1=11234567890&cq2=Mumbai&cq3=24-09-1992&name=Mary Diesel&[email protected]", "language": "html" } ] } [/block] [block:api-header] { "type": "basic", "title": "For users registering using Widget on your website." } [/block] Sending **Attendee's Data** and/or **Ticket Information** and/or **Discount** to be applied pre-filled [block:code] { "codes": [ { "code": "<script>\n function getPreFilledDataTS(){\n // All the fields are optional\n return {\n name: \t\t\t\t\"<attendee-name>\",\n emailid: \t\t\t\"<attendee-emailId>\",\n discountcode: \"<discount-code>\",\n \tcq1:\t\t\t\t\t\"<answer-for-custom-question-1>\",\n \tcq6:\t\t\t\t\t\"<answer-for-custom-question-6>\",\n td-ticketname1: <ticket-quantity>,\n td-ticketname2: <ticket-quantity>\n }\n }\n</script>\n<button onclick=\"popupWithParams('<event-code>',getPreFilledDataTS());\" class=\"tsbutton\">Register Now</button>\n<noscript id=\"tsNoJsMsg\">Javascript on your browser is not enabled.</noscript><script src=\"https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js\" type=\"text/javascript\"></script>", "language": "html" } ] } [/block] Here **<event-code>, <ticket-name>, <ticket-quantity>, <attendee-name>, <attendee-emailId>, <discount-code>** are the parameters, which should be replaced by actual values. If you wish to not send some information you can just skip that `key`, `value` set from your JSON. Ex: If you wish not to send any Ticket related Info : [block:code] { "codes": [ { "code": "<script>\n function getPreFilledDataTS(){\n return {\n name: \t\t\t\t\"<attendee-name>\",\n emailid: \t\t\t\"<attendee-emailId>\",\n discountcode: \"<discount-code>\"\n }\n }\n</script>\n<button onclick=\"popupWithParams('<event-code>',getPreFilledDataTS());\" class=\"tsbutton\">Register Now</button>\n<noscript id=\"tsNoJsMsg\">Javascript on your browser is not enabled.</noscript><script src=\"https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js\" type=\"text/javascript\"></script>", "language": "text" } ] } [/block] **NOTE :** Parameters are **Case Sensitive** Data for only **First attendee** can be pre-filled and Current Limitation: Tickets hidden with access code, can not be increased with autofill. [block:api-header] { "title": "For users registering using Townscript Iframe" } [/block] To perform pre-filling data in iframe, you need to generate src of iframe or iframe itself dynamically each time. Following is the iframe code for reference - [block:code] { "codes": [ { "code": "<iframe src=\"https://www.townscript.com/v2/widget/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>\" frameborder=\"0\" height=\"600px\" width=\"100%\"></iframe>", "language": "html" } ] } [/block] Eg1: [block:code] { "codes": [ { "code": "<iframe src=\"https://www.townscript.com/v2/widget/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]\" frameborder=\"0\" height=\"600px\" width=\"100%\"></iframe>\n\n", "language": "html" } ] } [/block]
[block:api-header] { "type": "basic", "title": "For users registering using Townscript.com" } [/block] Below is the format for sending the Pre-filled data to Townscript booking page - [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>", "language": "html" } ] } [/block] Here **<event-code>, <ticket-name>, <ticket-quantity>, <attendee-name>, <attendee-emailId>, <discount-code>, <answer-for-custom-question>** are the parameters, which should be replaced by actual values. **TICKET SELECTION** **td-<ticket-name>=<ticket-quantity>** **td-** prefix should be added with exact ticket name and selection quantity should be passed in place of **<ticket-quantity> ** **ATTENDEE BASIC DETAILS** **emailId=<attendee-email>** <attendee-email> should be replaced by desired email **name=<attendee-name>** OR If collecting name as First Name , Last Name please use **firstname=<attendee-firstname>** **lastname=<attendee-lastname>** **FORM QUESTIONS** **`cq<custom-question-number>` can be Custom Question of type **Text, Contact No., Text Area, Date, Select, Radio, Multiple Choice Checkbox**. ex: **cq6** for Custom Question 6th as per sequence in the booking flow. **Answer for Custom Question formats:** Date String format should be **DD-MM-YYYY** Multiple Choice checkbox Answers should exact selections with **","** separated. All other Answer should be exact the same as how you want with **Case sensitivity** **NOTE :** Validate data for same before hitting our servers. Parameters are **Case Sensitive** Data for only **First attendee** can be pre-filled Example 1 :- Selecting 2 tickets **ticket-name-1** and **ticket-name-2** with quantity 5 and 6 respectively. Name of attendee - John Dave Email of attendee - [email protected] [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]", "language": "html" } ] } [/block] If Name Split setting used First Name - John Last Name - Dave [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&firstname=John&lastname=Dave&[email protected]", "language": "html" } ] } [/block] Example 2:- Prefilling following attendee information Name: Mary Diesel Email: [email protected] Answer to the first question in attendee view (Contact Info): 11234567890 Answer to the second question in attendee view (City): Mumbai Answer to the third question in attendee view (Date of Birth): 24-09-1992 [block:code] { "codes": [ { "code": "https://www.townscript.com/v2/e/<event-code>/booking?cq1=11234567890&cq2=Mumbai&cq3=24-09-1992&name=Mary Diesel&[email protected]", "language": "html" } ] } [/block] [block:api-header] { "type": "basic", "title": "For users registering using Widget on your website." } [/block] Sending **Attendee's Data** and/or **Ticket Information** and/or **Discount** to be applied pre-filled [block:code] { "codes": [ { "code": "<script>\n function getPreFilledDataTS(){\n // All the fields are optional\n return {\n name: \t\t\t\t\"<attendee-name>\",\n emailid: \t\t\t\"<attendee-emailId>\",\n discountcode: \"<discount-code>\",\n \tcq1:\t\t\t\t\t\"<answer-for-custom-question-1>\",\n \tcq6:\t\t\t\t\t\"<answer-for-custom-question-6>\",\n td-ticketname1: <ticket-quantity>,\n td-ticketname2: <ticket-quantity>\n }\n }\n</script>\n<button onclick=\"popupWithParams('<event-code>',getPreFilledDataTS());\" class=\"tsbutton\">Register Now</button>\n<noscript id=\"tsNoJsMsg\">Javascript on your browser is not enabled.</noscript><script src=\"https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js\" type=\"text/javascript\"></script>", "language": "html" } ] } [/block] Here **<event-code>, <ticket-name>, <ticket-quantity>, <attendee-name>, <attendee-emailId>, <discount-code>** are the parameters, which should be replaced by actual values. If you wish to not send some information you can just skip that `key`, `value` set from your JSON. Ex: If you wish not to send any Ticket related Info : [block:code] { "codes": [ { "code": "<script>\n function getPreFilledDataTS(){\n return {\n name: \t\t\t\t\"<attendee-name>\",\n emailid: \t\t\t\"<attendee-emailId>\",\n discountcode: \"<discount-code>\"\n }\n }\n</script>\n<button onclick=\"popupWithParams('<event-code>',getPreFilledDataTS());\" class=\"tsbutton\">Register Now</button>\n<noscript id=\"tsNoJsMsg\">Javascript on your browser is not enabled.</noscript><script src=\"https://www.townscript.com/static/Bookingflow/js/townscript-widget.nocache.js\" type=\"text/javascript\"></script>", "language": "text" } ] } [/block] **NOTE :** Parameters are **Case Sensitive** Data for only **First attendee** can be pre-filled and Current Limitation: Tickets hidden with access code, can not be increased with autofill. [block:api-header] { "title": "For users registering using Townscript Iframe" } [/block] To perform pre-filling data in iframe, you need to generate src of iframe or iframe itself dynamically each time. Following is the iframe code for reference - [block:code] { "codes": [ { "code": "<iframe src=\"https://www.townscript.com/v2/widget/<event-code>/booking?td-<ticket-name>=<ticket-quantity>&name=<attendee-name>&emailid=<attendee-emailid>&discountcode=<discount-code>&cq<custom-question-number>=<answer-for-custom-question>\" frameborder=\"0\" height=\"600px\" width=\"100%\"></iframe>", "language": "html" } ] } [/block] Eg1: [block:code] { "codes": [ { "code": "<iframe src=\"https://www.townscript.com/v2/widget/<event-code>/booking?td-ticket-name-1=5&td-ticket-name-2=6&name=John Dave&[email protected]\" frameborder=\"0\" height=\"600px\" width=\"100%\"></iframe>\n\n", "language": "html" } ] } [/block]