Due to PCI compliant reasons we're going to turn off support for TLS v1.0 on all of our servers.
Please check/update you API implementations to support TLS v1.2 until 29.06.2018

Difference between revisions of "REST API TicketShops"

From XING Events Developer Documentation
Jump to: navigation, search
Line 3: Line 3:
 
'''Object type: '''<tt>ticketShop</tt>
 
'''Object type: '''<tt>ticketShop</tt>
  
This page contains information about all properties and methods regarding the ticket shop, a single sub-object of event. A ticketshop will automatically be created when you create an [[REST_API_Events|event]]. That's why you only have read and update access, but no create access. If you delete the related event, the ticketshop will also be deleted.
+
This page contains information about all properties and methods regarding the ticket category, a single sub-object of event.
  
 
== Properties ==
 
== Properties ==
Line 19: Line 19:
 
| [[REST_API_Formats#Integer|Integer]]<br>  
 
| [[REST_API_Formats#Integer|Integer]]<br>  
 
| <tt>R--</tt><br>  
 
| <tt>R--</tt><br>  
| The internal id of this object.<br>
+
| Internal id of this object.<br>
 
|
 
|
 
|-valign="top"
 
|-valign="top"
| disagio<br>  
+
| name<br>  
 
| [[REST_API_Formats#String|String]]<br>  
 
| [[REST_API_Formats#String|String]]<br>  
 +
| <tt>RWC</tt><br>
 +
| The name of the category.<br>
 +
| '''required'''
 +
|-valign="top"
 +
| price<br>
 +
| [[REST_API_Formats#String|String]]<br>
 +
| <tt>RWC</tt><br>
 +
| The price of the category.<br>
 +
| '''required'''
 +
|-valign="top"
 +
| available<br>
 +
| [[REST_API_Formats#Integer|Integer]]<br>
 +
| <tt>RWC</tt><br>
 +
| The number of available tickets.<br>
 +
| '''required'''
 +
|-valign="top"
 +
| sold<br>
 +
| [[REST_API_Formats#Integer|Integer]]<br>
 
| <tt>R--</tt><br>  
 
| <tt>R--</tt><br>  
| The disagio of the ticket.  
+
| The number of sold tickets.<br>
 +
|
 +
|-valign="top"
 +
| reservedCount<br>
 +
| [[REST_API_Formats#Integer|Integer]]<br>
 +
| <tt>R--</tt><br>
 +
| The number of reserved Tickets.<br>
 +
|
 +
|-valign="top"
 +
| saleStart<br>
 +
| [[REST_API_Formats#Date|Date]]<br>
 +
| <tt>RWC</tt><br>
 +
| The start date of the sale.<br>
 +
|
 +
|-valign="top"
 +
| saleEnd<br>
 +
| [[REST_API_Formats#Date|Date]]<br>
 +
| <tt>RWC</tt><br>
 +
| The end date of the sale.  
 
|  
 
|  
 
|-valign="top"
 
|-valign="top"
| ticketBaseFee<br>  
+
| minSell<br>  
| [[REST_API_Formats#Money|Money]]
+
| [[REST_API_Formats#Integer|Integer]]
| <tt>R--</tt><br>  
+
| <tt>RWC</tt><br>  
| The base fee of the ticket shop.
+
| The minimum tickets that must be bought of the category (per buy process).
 
|  
 
|  
 
|-valign="top"
 
|-valign="top"
| productDisagio<br>  
+
| maxSell<br>  
 
| [[REST_API_Formats#Integer|Integer]]
 
| [[REST_API_Formats#Integer|Integer]]
| <tt>R--</tt><br>  
+
| <tt>RWC</tt><br>  
| The disagio for products sold through this ticket shop.
+
| The maximum of tickets that can be bought of the category (per buy process).
 
|  
 
|  
 
|-valign="top"
 
|-valign="top"
| feeInclusive
+
| defaultValue
| [[REST_API_Formats#Boolean|Boolean]]
+
| [[REST_API_Formats#Integer|Integer]]
| <tt>RW-</tt><br>  
+
| <tt>RWC</tt><br>  
| Wether the fee will be included in the ticket price or not.
+
| The default value of the amount-dropdown for this category.
| Default: <tt>false</tt>
+
|
 
|-valign="top"
 
|-valign="top"
| shipmentFeeInclusive
+
| minSellRequired
 
| [[REST_API_Formats#Boolean|Boolean]]
 
| [[REST_API_Formats#Boolean|Boolean]]
| <tt>RW-</tt><br>  
+
| <tt>RWC</tt><br>  
| Wether the shipment fee will be included in the ticket price or not.
+
| Does the user have to buy the minimum selling limit?
 
| Default: <tt>false</tt>
 
| Default: <tt>false</tt>
 +
|
 
|-valign="top"
 
|-valign="top"
| commercial
+
| comment
| [[REST_API_Formats#Boolean|Boolean]]
+
| [[REST_API_Formats#String|String]]
| <tt>RW-</tt><br>  
+
| <tt>RWC</tt><br>  
| Wether the event is a commercial event. Only commercial events have <tt>salesTax</tt>.
+
| Comment that will be shown on the ticket.
| Default: <tt>true</tt>
+
|
 
|-valign="top"
 
|-valign="top"
| salesTax
+
| ticketDescription
| [[REST_API_Formats#Integer|Integer]]
+
| [[REST_API_Formats#String|String]]
| <tt>RW-</tt><br>  
+
| <tt>RWC</tt><br>  
| For commercial events, the sales tax. 1% = 100, 19% = 1900.
+
| Description of the ticket category.
| Default: depends on country
+
|
|-valign="top"
 
| availableLimit
 
| [[REST_API_Formats#Integer|Integer]]
 
| <tt>RW-</tt><br>
 
| The global number of available tickets across all ticket categories.
 
| Default: <tt>null</tt>
 
 
|-valign="top"
 
|-valign="top"
| showAvailableTickets
+
| active
 
| [[REST_API_Formats#Boolean|Boolean]]
 
| [[REST_API_Formats#Boolean|Boolean]]
| <tt>RW-</tt><br>  
+
| <tt>RWC</tt><br>  
| Wether the number of available tickets will be shown in the ticket shop or not.
+
| Wether the ticket category is active (tickets can be bought) or not.
 
| Default: <tt>true</tt>
 
| Default: <tt>true</tt>
 +
|
 
|-valign="top"
 
|-valign="top"
| currency
+
| displayPrice
| [[REST_API_Formats#Currency|Currency]]
 
| <tt>RW-</tt><br>
 
| The currency of the ticket shop.
 
| Default: <tt>EUR</tt>
 
|-valign="top"
 
| cancelationPossible
 
 
| [[REST_API_Formats#Boolean|Boolean]]
 
| [[REST_API_Formats#Boolean|Boolean]]
| <tt>RW-</tt><br>  
+
| <tt>RWC</tt><br>  
| Do you want to allow the cancelation of ticket pruchases?
+
| Should the price Option be displayed (registration event only)?
 
| Default: <tt>false</tt>
 
| Default: <tt>false</tt>
|-valign="top"
 
| numTicketsSold
 
| [[REST_API_Formats#Integer|Integer]]
 
| <tt>R--</tt><br>
 
| The global number of sold tickets for this ticket shop.
 
 
|
 
|
 
|-valign="top"
 
|-valign="top"
| totalIncome
+
| displayQuantity
| [[REST_API_Formats#Money|Money]]
+
| [[REST_API_Formats#Boolean|Boolean]]
| <tt>R--</tt><br>  
+
| <tt>RWC</tt><br>  
| The total amount of income generated with this ticket shop.
+
| Should the quantity option be displayed (registration event only)?
 +
| Default: <tt>false</tt>
 
|
 
|
 
|-valign="top"
 
|-valign="top"
| totalFees
+
| priceEditable
| [[REST_API_Formats#Money|Money]]
 
| <tt>R--</tt><br>
 
| The total amount of fees generated with this ticket shop.
 
|
 
|-valign="top"
 
| collectUserData
 
 
| [[REST_API_Formats#Boolean|Boolean]]
 
| [[REST_API_Formats#Boolean|Boolean]]
| <tt>RW-</tt><br>
 
| Should user data be collected in the ticketshop?
 
| Default: <tt>false</tt>
 
|-valign="top"
 
| maxPossibleNumberOfParticipants
 
| [[REST_API_Formats#Integer|Integer]]
 
 
| <tt>R--</tt><br>  
 
| <tt>R--</tt><br>  
| The maximum number of participants for this event.
+
| Whether the price of the category is editable, or not<br>(returns <tt>true</tt> if the associated event is in demo mode or if no tickets where sold already).
|
 
 
|}
 
|}
  
 
==Methods==
 
==Methods==
  
===Read===
+
===Create===
 
{| cellspacing="0" cellpadding="2" border="0" style="width: 745px;"
 
{| cellspacing="0" cellpadding="2" border="0" style="width: 745px;"
 
|-valign="top"
 
|-valign="top"
 
| width="100px" | '''Call'''
 
| width="100px" | '''Call'''
| <tt>'''GET''' /api/event/<id>/ticketShop</tt>
+
| <tt>'''POST''' /api/ticketCategory/create</tt>
 
|-valign="top"
 
|-valign="top"
 
| '''Description'''
 
| '''Description'''
| This request will return the ticket shop object of the event with the specified internal id. The response contains all properties marked with '''R'''.
+
| This request will create an ticket category and will return the internal id. The internal id can be used for read or update requests.
 
|-valign="top"
 
|-valign="top"
 
| '''Response'''
 
| '''Response'''
| <tt>{"ticketShop":{...}, "success":true}</tt>.
+
| <tt>{"id":<internal id>, "success":true}</tt>.
 
|-valign="top"
 
|-valign="top"
 
| '''Errors'''
 
| '''Errors'''
| See [[REST API ErrorCodes#General_Errorcodes|General Errorcodes]].
+
| <tt>[[REST API ErrorCodes#Name_missing|com.amiando.TicketCategory.NameMissing]]</tt><br><tt>[[REST API ErrorCodes#Price_missing|com.amiando.TicketCategory.PriceMissing]]</tt><br><tt>[[REST API ErrorCodes#Price_too_low|com.amiando.TicketCategory.PriceTooLow]]</tt><br><tt>[[REST API ErrorCodes#No_tickets_available|com.amiando.TicketCategory.NoTicketsAvailable]]</tt><br><tt>[[REST API ErrorCodes#Invalid_max_sell|com.amiando.TicketCategory.InvalidMaxSell]]</tt><br><tt>[[REST API ErrorCodes#Max_sell_lower_than_min_sell|com.amiando.TicketCategory.MaxSellLowerThanMinSell]]</tt><br><tt>[[REST API ErrorCodes#Sale_end_before_sale_start|com.amiando.TicketCategory.SaleEndBeforeSaleStart]]</tt><br><tt>[[REST API ErrorCodes#Comment_too_long|com.amiando.TicketCategory.CommentTooLong]]</tt><br><tt>[[REST API ErrorCodes#Cant_edit_price|com.amiando.api.rest.CantEditPrice]]</tt><br>See [[REST API ErrorCodes#General_errorcodes|General Errorcodes]].
 
|}
 
|}
  
Line 141: Line 150:
 
|-valign="top"
 
|-valign="top"
 
| width="100px" | '''Call'''
 
| width="100px" | '''Call'''
| <tt>'''POST''' /api/event/<id>/ticketShop</tt>
+
| <tt>'''POST''' /api/ticketCategory/<id></tt>
 +
|-valign="top"
 +
| '''Description'''
 +
| This request will update the properties of the ticket category with the internal id <id>. Only properties which are provided as parameters will be updated. 
 +
|-valign="top"
 +
| '''Response'''
 +
| <tt>{"success":true}</tt>.
 +
|-valign="top"
 +
| '''Errors'''
 +
| <tt>[[REST API ErrorCodes#Name_missing|com.amiando.TicketCategory.NameMissing]]</tt><br><tt>[[REST API ErrorCodes#Price_missing|com.amiando.TicketCategory.PriceMissing]]</tt><br><tt>[[REST API ErrorCodes#Price_too_low|com.amiando.TicketCategory.PriceTooLow]]</tt><br><tt>[[REST API ErrorCodes#No_tickets_available|com.amiando.TicketCategory.NoTicketsAvailable]]</tt><br><tt>[[REST API ErrorCodes#Invalid_max_sell|com.amiando.TicketCategory.InvalidMaxSell]]</tt><br><tt>[[REST API ErrorCodes#Max_sell_lower_than_min_sell|com.amiando.TicketCategory.MaxSellLowerThanMinSell]]</tt><br><tt>[[REST API ErrorCodes#Sale_end_before_sale_start|com.amiando.TicketCategory.SaleEndBeforeSaleStart]]</tt><br><tt>[[REST API ErrorCodes#Comment_too_long|com.amiando.TicketCategory.CommentTooLong]]</tt><br><tt>[[REST API ErrorCodes#Cant_edit_price|com.amiando.api.rest.CantEditPrice]]</tt><br>See [[REST API ErrorCodes#General_errorcodes|General Errorcodes]].
 +
|}
 +
 
 +
===Enumeration===
 +
{| cellspacing="0" cellpadding="2" border="0" style="width: 745px;"
 +
|-valign="top"
 +
| width="100px" | '''Call'''
 +
| <tt>'''GET''' /api/event/<id>/ticketCategories</tt>
 
|-valign="top"
 
|-valign="top"
| '''Parameters'''
+
|
| All properties marked with '''W'''.
+
| See [[REST_API_Events#Enumerate_ticket_category_ids|Enumerate ticket category ids]]
 +
|}
 +
 
 +
===Read===
 +
{| cellspacing="0" cellpadding="2" border="0" style="width: 745px;"
 +
|-valign="top"
 +
| width="100px" | '''Call'''
 +
| <tt>'''GET''' /api/ticketCategory/<id></tt>
 
|-valign="top"
 
|-valign="top"
 
| '''Description'''
 
| '''Description'''
| This request will update the properties of the ticket shop of the event with the internal id <id>. Only properties which are provided as parameters will be updated.
+
| This request will return the ticket shop object of the event with the specified internal id. The response contains all properties marked with R.  
 
|-valign="top"
 
|-valign="top"
 
| '''Response'''
 
| '''Response'''
| <tt>{"success":true}</tt>.
+
| <tt>{"ticketCategory":{...}, "success":true}</tt>.
 
|-valign="top"
 
|-valign="top"
 
| '''Errors'''
 
| '''Errors'''
| <tt>[[REST_API_ErrorCodes#Can.27t_change_currency|com.amiando.ticketShop.cantChangeCurrency]]</tt><br>See [[REST API ErrorCodes#General_Errorcodes|General Errorcodes]].
+
| See [[REST API ErrorCodes#General_Errorcodes|General Errorcodes]].
 
|}
 
|}
 +
  
 
[[Category:objectType]]
 
[[Category:objectType]]
  
 
{{Template:RESTNavigation}}
 
{{Template:RESTNavigation}}

Revision as of 09:18, 16 December 2010

Object type: ticketShop

This page contains information about all properties and methods regarding the ticket category, a single sub-object of event.

Properties

Attributes: R - accessible in read requests W - accessible in write (update) requests C - accessible in create requests

Property
Type
Attributes Description

id
Integer
R--
Internal id of this object.
name
String
RWC
The name of the category.
required
price
String
RWC
The price of the category.
required
available
Integer
RWC
The number of available tickets.
required
sold
Integer
R--
The number of sold tickets.
reservedCount
Integer
R--
The number of reserved Tickets.
saleStart
Date
RWC
The start date of the sale.
saleEnd
Date
RWC
The end date of the sale.
minSell
Integer RWC
The minimum tickets that must be bought of the category (per buy process).
maxSell
Integer RWC
The maximum of tickets that can be bought of the category (per buy process).
defaultValue Integer RWC
The default value of the amount-dropdown for this category.
minSellRequired Boolean RWC
Does the user have to buy the minimum selling limit? Default: false
comment String RWC
Comment that will be shown on the ticket.
ticketDescription String RWC
Description of the ticket category.
active Boolean RWC
Wether the ticket category is active (tickets can be bought) or not. Default: true
displayPrice Boolean RWC
Should the price Option be displayed (registration event only)? Default: false
displayQuantity Boolean RWC
Should the quantity option be displayed (registration event only)? Default: false
priceEditable Boolean R--
Whether the price of the category is editable, or not
(returns true if the associated event is in demo mode or if no tickets where sold already).

Methods

Create

Call POST /api/ticketCategory/create
Description This request will create an ticket category and will return the internal id. The internal id can be used for read or update requests.
Response {"id":<internal id>, "success":true}.
Errors com.amiando.TicketCategory.NameMissing
com.amiando.TicketCategory.PriceMissing
com.amiando.TicketCategory.PriceTooLow
com.amiando.TicketCategory.NoTicketsAvailable
com.amiando.TicketCategory.InvalidMaxSell
com.amiando.TicketCategory.MaxSellLowerThanMinSell
com.amiando.TicketCategory.SaleEndBeforeSaleStart
com.amiando.TicketCategory.CommentTooLong
com.amiando.api.rest.CantEditPrice
See General Errorcodes.

Update

Call POST /api/ticketCategory/<id>
Description This request will update the properties of the ticket category with the internal id <id>. Only properties which are provided as parameters will be updated.
Response {"success":true}.
Errors com.amiando.TicketCategory.NameMissing
com.amiando.TicketCategory.PriceMissing
com.amiando.TicketCategory.PriceTooLow
com.amiando.TicketCategory.NoTicketsAvailable
com.amiando.TicketCategory.InvalidMaxSell
com.amiando.TicketCategory.MaxSellLowerThanMinSell
com.amiando.TicketCategory.SaleEndBeforeSaleStart
com.amiando.TicketCategory.CommentTooLong
com.amiando.api.rest.CantEditPrice
See General Errorcodes.

Enumeration

Call GET /api/event/<id>/ticketCategories
See Enumerate ticket category ids

Read

Call GET /api/ticketCategory/<id>
Description This request will return the ticket shop object of the event with the specified internal id. The response contains all properties marked with R.
Response {"ticketCategory":{...}, "success":true}.
Errors See General Errorcodes.
REST API Contents
Getting Started Get your API key Overview Formats Errors
Data Types Event Participant Payment Ticket
Ticket Categories ProductDefinition Products CodeDefinition
TicketShop Addresses Ticket Types Payment Types
BankAccount UserDataDefinition UserData User
ApiKey
Data Synchronization Sync Interface