### Install Ticketmatic Go Library Source: https://apps.ticketmatic.com/docs/api/libraries/go Fetch the Go library using the 'go get' command. This command downloads and installs the library into your Go workspace. ```bash go get github.com/ticketmatic/tm-go ``` -------------------------------- ### Create Ticket Sales Setup Response (JSON) Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/create Example JSON response after successfully creating a ticket sales setup. It includes the assigned ID and all provided configuration details. ```json 1{ 2 "id": 123, 3 "name": "Websales", 4 "code": "d6f72313-bc7a-4dca-a3fc-371057f5f99f", 5 "integrated": false, 6 "widgetparams": { 7 "oncompletion": "orderdetail", 8 "returnurl": "https://www.ticketmatic.com" 9 } 10} ``` -------------------------------- ### Get Ticket Sales Setup (Go) Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/get Fetch a single ticket sales setup using the ticketsalessetups.Get function. This requires importing the necessary Ticketmatic packages and providing a valid client and ID. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/settings/system/ticketsalessetups" 4) 5 6result, err := ticketsalessetups.Get(client, id) ``` -------------------------------- ### Get Ticket Sales Setup (PHP) Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/get Use the Ticketsalessetups::get method to retrieve a single ticket sales setup by its ID. Ensure the Ticketmatic client is properly initialized. ```php 1use Ticketmatic\Endpoints\Settings\System\Ticketsalessetups; 2 3$result = Ticketsalessetups::get($client, $id); ``` -------------------------------- ### Go response example Source: https://apps.ticketmatic.com/docs/api/contacts/getremark Example struct representation returned by the Go SDK. ```go 1result := &ticketmatic.ContactRemark{ 2 Id: 123423, 3 Content: "This customer does not pay on time", 4 Pinned: true, 5} ``` -------------------------------- ### HTTP Request to Get Ticket Sales Setup Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/get This is the raw HTTP GET request to retrieve a specific ticket sales setup. Replace `{accountname}` and `{id}` with your actual account name and the setup ID. ```http 1GET /api/1/{accountname}/settings/system/ticketsalessetups/{id} HTTP/1.1 ``` -------------------------------- ### Create Ticket Sales Setup (Go) Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/create This Go code demonstrates creating a ticket sales setup. It requires importing the necessary Ticketmatic packages. The `Widgetparams` field is a map of strings. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/settings/system/ticketsalessetups" 4) 5 6result, err := ticketsalessetups.Create(client, &ticketmatic.Ticketsalessetup{ 7 Name: "Websales", 8 Code: "d6f72313-bc7a-4dca-a3fc-371057f5f99f", 9 Integrated: false, 10 Widgetparams: map[string]string{ 11 "oncompletion": "orderdetail", 12 "returnurl": "https://www.ticketmatic.com", 13 }, 14}) ``` -------------------------------- ### Go Opt-in Creation and Response Source: https://apps.ticketmatic.com/docs/api/settings/system/optins/create Examples for creating an opt-in and the resulting object structure using the Go SDK. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/settings/system/optins" 4) 5 6result, err := optins.Create(client, &ticketmatic.OptIn{ 7 Typeid: 40002, 8 Name: "Event mails and ticket offers", 9 Availability: []*ticketmatic.OptInAvailability{ 10 &ticketmatic.OptInAvailability{ 11 Saleschannelid: 2, 12 }, 13 }, 14 Caption: "If you would prefer NOT to receive these please tick this box.", 15 Description: "From time to time we will send out information by e-mail about similar events and tickets offers.", 16}) ``` ```go 1result := &ticketmatic.OptIn{ 2 Id: 13895, 3 Typeid: 40002, 4 Name: "Event mails and ticket offers", 5 Availability: []*ticketmatic.OptInAvailability{ 6 &ticketmatic.OptInAvailability{ 7 Saleschannelid: 2, 8 }, 9 }, 10 Caption: "If you would prefer NOT to receive these please tick this box.", 11 Description: "From time to time we will send out information by e-mail about similar events and tickets offers.", 12 Isarchived: false, 13 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2018-04-26 13:45:11")), 14 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2018-04-26 13:45:11")), 15} ``` -------------------------------- ### Get Ticket Fee HTTP Request Source: https://apps.ticketmatic.com/docs/api/settings/pricing/ticketfees/get Example of an HTTP GET request to retrieve a specific ticket fee. ```http 1GET /api/1/{accountname}/settings/pricing/ticketfees/{id} HTTP/1.1 ``` -------------------------------- ### Get Product Categories List (cURL) Source: https://apps.ticketmatic.com/docs/api/settings/productcategories/getlist Example HTTP GET request to retrieve product categories using cURL. ```http 1GET /api/1/{accountname}/settings/productcategories HTTP/1.1 ``` -------------------------------- ### Create Product in Go Source: https://apps.ticketmatic.com/docs/api/settings/products/create Usage of the Go SDK to create a new product instance. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/settings/products" 4) 5 6result, err := products.Create(client, &ticketmatic.Product{ 7 Typeid: 26003, 8 Name: "Classical bundle", 9 Description: "Come see all our classical concert at a reduced price!", 10 Instancevalues: &ticketmatic.ProductInstancevalues{ 11 Default: &ticketmatic.ProductInstanceValue{ 12 Price: 0, 13 Tickettypeprices: []int64{ 14 645, 15 693, 16 }, 17 }, 18 }, 19 Properties: []*ticketmatic.ProductProperty{ 20 }, 21 Saleendts: ticketmatic.NewTime(ticketmatic.MustParseTime("2025-01-01 00:00:00")), 22 Saleschannels: []int64{ 23 1, 24 2, 25 }, 26 Salestartts: ticketmatic.NewTime(ticketmatic.MustParseTime("2017-01-01 00:00:00")), 27}) ``` -------------------------------- ### Get Field Definitions Request (HTTP) Source: https://apps.ticketmatic.com/docs/api/settings/system/fielddefinitions/getlist Example HTTP GET request to retrieve field definitions. This shows the resource URL and method. ```http 1GET /api/1/{accountname}/settings/system/fielddefinitions HTTP/1.1 ``` -------------------------------- ### Create a web sales skin in PHP Source: https://apps.ticketmatic.com/docs/api/settings/communicationanddesign/webskins/create Use the Webskins::create method to initialize a new skin. Ensure the $client object is properly authenticated. ```php 1use Ticketmatic\Endpoints\Settings\Communicationanddesign\Webskins; 2 3$result = Webskins::create($client, array( 4 "name" => "Website theme", 5 "configuration" => array( 6 "title" => "{{tm.page.label | translate}} - {{tm.account.name}}", 7 ), 8 "css" => "@import \"style\";", 9 "html" => "{{CONTENT}}", 10 "translations" => array( 11 "nl" => "...", 12 ), 13)); ``` ```php 1object(\Ticketmatic\Model\WebSalesSkin) (9) { 2 ["id"]=> 3 int(0) 4 ["name"]=> 5 string(13) "Website theme" 6 ["asseturl"]=> 7 string(37) "https://assets.ticketmatic.com/10349/" 8 ["configuration"]=> 9 object(\Ticketmatic\Model\WebSalesSkinConfiguration) (1) { 10 ["title"]=> 11 string(51) "{{tm.page.label | translate}} - {{tm.account.name}}" 12 } 13 ["css"]=> 14 string(16) "@import "style";" 15 ["html"]=> 16 string(37) "{{CONTENT}}" 17 ["translations"]=> 18 array(1) { 19 ["nl"]=> 20 string(3) "..." 21 } 22 ["createdts"]=> 23 object(\DateTime) (3) { 24 ["date"]=> 25 string(26) "2014-09-26 15:24:36.000000" 26 ["timezone_type"]=> 27 int(3) 28 ["timezone"]=> 29 string(3) "UTC" 30 } 31 ["lastupdatets"]=> 32 object(\DateTime) (3) { 33 ["date"]=> 34 string(26) "2014-09-26 15:24:36.000000" 35 ["timezone_type"]=> 36 int(3) 37 ["timezone"]=> 38 string(3) "UTC" 39 } 40} ``` -------------------------------- ### Create a web sales skin in Go Source: https://apps.ticketmatic.com/docs/api/settings/communicationanddesign/webskins/create Use the webskins.Create function to create a skin. The client must be initialized with appropriate credentials. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/settings/communicationanddesign/webskins" 4) 5 6result, err := webskins.Create(client, &ticketmatic.WebSalesSkin{ 7 Name: "Website theme", 8 Configuration: &ticketmatic.WebSalesSkinConfiguration{ 9 Title: "{{tm.page.label | translate}} - {{tm.account.name}}", 10 }, 11 Css: "@import \"style\";", 12 Html: "{{CONTENT}}", 13 Translations: map[string]string{ 14 "nl": "...", 15 }, 16}) ``` ```go 1result := &ticketmatic.WebSalesSkin{ 2 Id: 123, 3 Name: "Website theme", 4 Asseturl: "https://assets.ticketmatic.com/10349/", 5 Configuration: &ticketmatic.WebSalesSkinConfiguration{ 6 Title: "{{tm.page.label | translate}} - {{tm.account.name}}", 7 }, 8 Css: "@import \"style\";", 9 Html: "{{CONTENT}}", 10 Translations: map[string]string{ 11 "nl": "...", 12 }, 13 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 14 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 15} ``` -------------------------------- ### Get Price Types List Request (HTTP) Source: https://apps.ticketmatic.com/docs/api/settings/pricing/pricetypes/getlist Example HTTP GET request to retrieve a list of price types from the Ticketmatic API. ```http 1GET /api/1/{accountname}/settings/pricing/pricetypes HTTP/1.1 ``` -------------------------------- ### HTTP GET Request for Reports Source: https://apps.ticketmatic.com/docs/api/settings/system/reports/getlist This is an example of an HTTP GET request to the Ticketmatic API endpoint for retrieving system reports. The response is in JSON format. ```http 1GET /api/1/{accountname}/settings/system/reports HTTP/1.1 ``` ```json 1HTTP/1.1 200 OK 2Content-Type: application/json 3 4{ 5 "data": [ 6 { 7 "id": 123, 8 "name": "Financial overview", 9 "defaultformat": "pdf", 10 "description": "A financial overview per month for the last 12 months", 11 "emailbcc": "info@mycompany.be;management@mycompany.be", 12 "emailcc": "info@mycompany.be;management@mycompany.be", 13 "emailrecipients": "info@mycompany.be;management@mycompany.be", 14 "emailschedule": false, 15 "emailscheduledayofmonth": 1, 16 "emailscheduledayofweek": 7, 17 "emailschedulehourofday": 8, 18 "emailschedulequery": "select * from op.basket where createdts > CURRENT_TIMESTAMP - INTERVAL '1 DAY'", 19 "reporttypeid": 1, 20 "usagetypeid": 17001, 21 "createdts": "2014-09-26 15:24:36", 22 "lastupdatets": "2014-09-26 15:24:36" 23 } 24 ] 25} ``` -------------------------------- ### ProductQuery Example Source: https://apps.ticketmatic.com/docs/api/types/ProductQuery Demonstrates the structure of a ProductQuery object with various filter parameters. ```json { "typeid": 26001, "filter": "SELECT id FROM tm.product WHERE saleschannels @> '[1]' OR saleschannels @> '[2]'", "includearchived": true, "lastupdatesince": "2014-09-26 15:24:36" } ``` -------------------------------- ### Fetch Product with Go SDK Source: https://apps.ticketmatic.com/docs/api/settings/products/get Example of using the Ticketmatic Go SDK to retrieve a product. ```go import ( "github.com/ticketmatic/tm-go/ticketmatic" "github.com/ticketmatic/tm-go/ticketmatic/settings/products" ) result, err := products.Get(client, id) ``` -------------------------------- ### Get Account Parameter (HTTP Request) Source: https://apps.ticketmatic.com/docs/api/settings/accountparameters/get Example of an HTTP GET request to retrieve an account parameter. The URL includes the account name and the parameter name. ```http 1GET /api/1/{accountname}/settings/accountparameters/{name} HTTP/1.1 ``` -------------------------------- ### API Request Example Source: https://apps.ticketmatic.com/docs/api/events/getlist This is an example of an HTTP GET request to retrieve a list of events for a specific account. Ensure you replace `{accountname}` with the actual account name. ```http 1GET /api/1/{accountname}/events HTTP/1.1 ``` -------------------------------- ### Get Price Types List Response (Go) Source: https://apps.ticketmatic.com/docs/api/settings/pricing/pricetypes/getlist Example response structure for the Get Price Types List call in Go, showing a list of PriceType objects. ```go 1result := pricetypes.&List{ 2 Data: []*ticketmatic.PriceType{ 3 &ticketmatic.PriceType{ 4 Id: 123, 5 Typeid: 2301, 6 Name: "Student", 7 Remark: "Only valid with a student card.", 8 Isarchived: false, 9 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 10 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 11 }, 12 }, 13} ``` -------------------------------- ### Get Price Types List Response (PHP) Source: https://apps.ticketmatic.com/docs/api/settings/pricing/pricetypes/getlist Example response structure for the Get Price Types List call in PHP, showing a list of PriceType objects. ```php 1object(Ticketmatic\Endpoints\Settings\Pricing\PricetypesList) (1) { 2 ["data"]=> 3 array(1) { 4 [0]=> 5 object("Ticketmatic\Model\PriceType") (7) { 6 ["id"]=> 7 int(0) 8 ["typeid"]=> 9 int(0) 10 ["name"]=> 11 string(7) "Student" 12 ["remark"]=> 13 string(31) "Only valid with a student card." 14 ["isarchived"]=> 15 bool(false) 16 ["createdts"]=> 17 object("DateTime") (3) { 18 ["date"]=> 19 string(26) "2014-09-26 15:24:36.000000" 20 ["timezone_type"]=> 21 int(3) 22 ["timezone"]=> 23 string(3) "UTC" 24 } 25 ["lastupdatets"]=> 26 object("DateTime") (3) { 27 ["date"]=> 28 string(26) "2014-09-26 15:24:36.000000" 29 ["timezone_type"]=> 30 int(3) 31 ["timezone"]=> 32 string(3) "UTC" 33 } 34 } 35 } 36} ``` -------------------------------- ### Update Ticket Sales Setup (Go) Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/update This Go snippet demonstrates updating a ticket sales setup. It requires importing the necessary Ticketmatic packages and providing a client, ID, and the setup details. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/settings/system/ticketsalessetups" 4) 5 6result, err := ticketsalessetups.Update(client, id, &ticketmatic.Ticketsalessetup{ 7 Name: "Websales", 8 Code: "d6f72313-bc7a-4dca-a3fc-371057f5f99f", 9 Integrated: false, 10 Widgetparams: map[string]string{ 11 "oncompletion": "orderdetail", 12 "returnurl": "https://www.ticketmatic.com", 13 }, 14}) ``` -------------------------------- ### Create Ticket Sales Setup (PHP) Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/create Use this PHP snippet to create a new ticket sales setup. Ensure the Ticketmatic client is initialized. The widget parameters define behavior upon completion and return URLs. ```php 1use Ticketmatic\Endpoints\Settings\System\Ticketsalessetups; 2 3$result = Ticketsalessetups::create($client, array( 4 "name" => "Websales", 5 "code" => "d6f72313-bc7a-4dca-a3fc-371057f5f99f", 6 "integrated" => false, 7 "widgetparams" => array( 8 "oncompletion" => "orderdetail", 9 "returnurl" => "https://www.ticketmatic.com", 10 ), 11)); ``` -------------------------------- ### WebSalesSkinConfiguration JSON Example Source: https://apps.ticketmatic.com/docs/api/types/WebSalesSkinConfiguration A complete JSON object representing the required configuration fields for a web sales skin. ```json { "favicon": "images/favicon.png", "googleanalyticsid": "UA-36890527-4", "googletagmanagerid": "GTM-XXXXXX", "title": "{{tm.page.label | translate}} - {{tm.account.name}}" } ``` -------------------------------- ### Get Order Fee Definition Request (HTTP) Source: https://apps.ticketmatic.com/docs/api/settings/pricing/orderfeedefinitions/get An example of an HTTP GET request to retrieve a specific order fee definition. Replace {accountname} and {id} with actual values. ```http 1GET /api/1/{accountname}/settings/pricing/orderfeedefinitions/{id} HTTP/1.1 ``` -------------------------------- ### Retrieve ticket sales setups in PHP Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/getlist Use the Ticketsalessetups::getlist method to fetch setups. The parameters array is optional. ```php use Ticketmatic\Endpoints\Settings\System\Ticketsalessetups; $result = Ticketsalessetups::getlist($client, array( "filter" => "SELECT id FROM conf.ticketsalessetup WHERE integrated=true", "lastupdatesince" => "2014-09-26 15:24:36", )); // The parameters array is optional, it can be omitted when empty. $result = Ticketsalessetups::getlist($client); ``` -------------------------------- ### Create Product in PHP Source: https://apps.ticketmatic.com/docs/api/settings/products/create Use this method to create a new product. Ensure the client is properly initialized. The product details include type, name, description, instance values, properties, sale end, sales channels, and sale start times. ```php 1use Ticketmatic\Endpoints\Settings\Products; $result = Products::create($client, array( "typeid" => 26005, "name" => "Option bundle", "description" => "Select the events you want to see and get a reduced price if you buy more than 1 ticket", "instancevalues" => array( "default" => array( "price" => 0, "pricetypes" => array( array( "id" => 10, "from" => 0, ), array( "id" => 11, "from" => 2, ), array( "id" => 12, "from" => 4, ), ), ), ), "properties" => array( ), "saleendts" => "2025-01-01 00:00:00", "saleschannels" => array( 1, 2, ), "salestartts" => "2017-01-01 00:00:00", )); ``` -------------------------------- ### Get Waiting List Request (Go) Source: https://apps.ticketmatic.com/docs/api/sales/waitinglistrequests/get Retrieve a waiting list request using the Go client library. This example shows how to import the necessary packages and call the Get function. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/sales/waitinglistrequests" 4) 5 6result, err := waitinglistrequests.Get(client, id) ``` ```go 1result := &ticketmatic.WaitingListRequest{ 2 Id: 123, 3 Orderid: 1, 4 Contactid: 1, 5 Itemsstatus: 29101, 6 Requeststatus: 29201, 7 Saleschannelid: 1, 8 Sortorder: 1324, 9 Waitinglistrequestitems: []*ticketmatic.WaitingListRequestItem{ 10 &ticketmatic.WaitingListRequestItem{ 11 Eventid: 12345, 12 Tickets: []*ticketmatic.WaitingListRequestItemTicket{ 13 &ticketmatic.WaitingListRequestItemTicket{ 14 Tickettypepriceid: 1, 15 }, 16 &ticketmatic.WaitingListRequestItemTicket{ 17 Tickettypepriceid: 1, 18 }, 19 &ticketmatic.WaitingListRequestItemTicket{ 20 Tickettypepriceid: 2, 21 }, 22 &ticketmatic.WaitingListRequestItemTicket{ 23 Tickettypepriceid: 3, 24 }, 25 }, 26 }, 27 }, 28 Isarchived: false, 29 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 30 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 31} ``` -------------------------------- ### LogicalPlanSeat JSON Example Source: https://apps.ticketmatic.com/docs/api/types/LogicalPlanSeat Provides an example of the JSON structure for a LogicalPlanSeat, including all its fields and their corresponding data types. ```json { "id": "s002001054", "name": "54", "center": [ 312.000000, 834.500000 ], "coord": 1, "priority": 85, "rowname": "A", "seatdescriptionid": 3, "seatrankid": 3, "size": [ 12.000000, 12.000000 ] } ``` -------------------------------- ### Get Single Price Type Request (cURL) Source: https://apps.ticketmatic.com/docs/api/settings/pricing/pricetypes/get Example HTTP GET request to the Ticketmatic API endpoint for fetching a single price type. Replace {accountname} and {id} with actual values. ```http GET /api/1/{accountname}/settings/pricing/pricetypes/{id} HTTP/1.1 ``` -------------------------------- ### Retrieve Product List with Go SDK Source: https://apps.ticketmatic.com/docs/api/settings/products/getlist Demonstrates fetching a list of products using a query object for filtering and time-based constraints, as well as the default call without parameters. ```go import ( "github.com/ticketmatic/tm-go/ticketmatic" "github.com/ticketmatic/tm-go/ticketmatic/settings/products" ) result, err := products.Getlist(client, &ticketmatic.ProductQuery{ Typeid: 26001, Filter: "SELECT id FROM tm.product WHERE saleschannels @> '[1]' OR saleschannels @> '[2]'", Includearchived: true, Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), }) // The query object is optional, it can be omitted when empty. result, err := products.Getlist(client, nil) ``` -------------------------------- ### Create a new price list in Go Source: https://apps.ticketmatic.com/docs/api/settings/pricing/pricelists/create Use the pricelists.Create function to submit a new price list configuration. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/settings/pricing/pricelists" 4) 5 6result, err := pricelists.Create(client, &ticketmatic.PriceList{ 7 Name: "Dance", 8 Hasranks: false, 9 Prices: &ticketmatic.PricelistPrices{ 10 Prices: []*ticketmatic.PricelistPrice{ 11 &ticketmatic.PricelistPrice{ 12 Prices: []float64{ 13 25, 14 }, 15 Pricetypeid: 1, 16 }, 17 &ticketmatic.PricelistPrice{ 18 Conditions: []*ticketmatic.PricelistPriceCondition{ 19 &ticketmatic.PricelistPriceCondition{ 20 Type: "promocode", 21 Value: "UGENT2013", 22 }, 23 }, 24 Prices: []float64{ 25 30, 26 }, 27 Pricetypeid: 2, 28 }, 29 }, 30 Seatrankids: nil, 31 }, 32}) ``` ```go 1result := &ticketmatic.PriceList{ 2 Id: 123, 3 Name: "Dance", 4 Hasranks: false, 5 Prices: &ticketmatic.PricelistPrices{ 6 Prices: []*ticketmatic.PricelistPrice{ 7 &ticketmatic.PricelistPrice{ 8 Prices: []float64{ 9 25, 10 }, 11 Pricetypeid: 1, 12 }, 13 &ticketmatic.PricelistPrice{ 14 Conditions: []*ticketmatic.PricelistPriceCondition{ 15 &ticketmatic.PricelistPriceCondition{ 16 Type: "promocode", 17 Value: "UGENT2013", 18 }, 19 }, 20 Prices: []float64{ 21 30, 22 }, 23 Pricetypeid: 2, 24 }, 25 }, 26 Seatrankids: nil, 27 }, 28 Isarchived: false, 29 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 30 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), 31} ``` -------------------------------- ### Get Ticket Fee HTTP Response Source: https://apps.ticketmatic.com/docs/api/settings/pricing/ticketfees/get Example of a successful HTTP response when retrieving a ticket fee. ```json 1HTTP/1.1 200 OK 2Content-Type: application/json 3 4{ 5 "id": 123, 6 "name": "Fixed reservation fee", 7 "rules": { 8 "default": [ 9 { 10 "saleschannelid": 1, 11 "status": "fixedfee", 12 "value": 1.000000 13 }, 14 { 15 "saleschannelid": 2, 16 "status": "fixedfee", 17 "value": 1.000000 18 } 19 ] 20 }, 21 "isarchived": false, 22 "createdts": "2014-09-26 15:24:36", 23 "lastupdatets": "2014-09-26 15:24:36" 24} ``` -------------------------------- ### Poll Eventstream API Request (HTTP) Source: https://apps.ticketmatic.com/docs/api/eventstream/eventstream Example HTTP GET request to poll the eventstream API. ```http 1GET /api/1/{accountname}/eventstream HTTP/1.1 ``` -------------------------------- ### Layout Configuration Example Source: https://apps.ticketmatic.com/docs/api/types/Layout JSON representation of layout parameters including color and image settings. ```json { "color": "#112233", "maxImage": true } ``` -------------------------------- ### Create an Order using Go SDK Source: https://apps.ticketmatic.com/docs/api/orders/create Use the orders.Create function to initialize a new order with specified events, products, and sales channel ID. ```go 1import ( 2 "github.com/ticketmatic/tm-go/ticketmatic" 3 "github.com/ticketmatic/tm-go/ticketmatic/orders" 4) 5 6result, err := orders.Create(client, &ticketmatic.CreateOrder{ 7 Events: []int64{ 8 324, 9 131, 10 }, 11 Products: []int64{ 12 574, 13 186, 14 }, 15 Saleschannelid: 1, 16}) ``` -------------------------------- ### Get a Single Price List Request (cURL) Source: https://apps.ticketmatic.com/docs/api/settings/pricing/pricelists/get Example cURL command to make a GET request to the Ticketmatic API endpoint for retrieving a specific price list. Replace {accountname} and {id} with actual values. ```http 1GET /api/1/{accountname}/settings/pricing/pricelists/{id} HTTP/1.1 ``` -------------------------------- ### Create Product via HTTP Source: https://apps.ticketmatic.com/docs/api/settings/products/create Raw HTTP request to create a product. ```http 1POST /api/1/{accountname}/settings/products HTTP/1.1 2Content-Type: application/json 3 4{ 5 "typeid": 26003, 6 "name": "Classical bundle", 7 "description": "Come see all our classical concert at a reduced price!", 8 "instancevalues": { 9 "default": { 10 "price": 0.000000, 11 "tickettypeprices": [ 645, 693 ] 12 } 13 }, 14 "properties": [], 15 "saleendts": "2025-01-01 00:00:00", 16 "saleschannels": [ 1, 2 ], 17 "salestartts": "2017-01-01 00:00:00" 18} ``` -------------------------------- ### Get Web Sales Skin Request (cURL) Source: https://apps.ticketmatic.com/docs/api/settings/communicationanddesign/webskins/get Example HTTP GET request to retrieve a single web sales skin using its ID. The URL includes the account name and the specific skin ID. ```http 1GET /api/1/{accountname}/settings/communicationanddesign/webskins/{id} HTTP/1.1 ``` -------------------------------- ### HTTP request and response for ticketsalessetups Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/getlist Standard RESTful GET request to retrieve the list of ticket sales setups. ```http GET /api/1/{accountname}/settings/system/ticketsalessetups HTTP/1.1 ``` ```http HTTP/1.1 200 OK Content-Type: application/json { "data": [ { "id": 123, "name": "Websales", "code": "d6f72313-bc7a-4dca-a3fc-371057f5f99f", "integrated": false, "widgetparams": { "oncompletion": "orderdetail", "returnurl": "https://www.ticketmatic.com" } } ] } ``` -------------------------------- ### TicketsalessetupQuery JSON Example Source: https://apps.ticketmatic.com/docs/api/types/TicketsalessetupQuery Example JSON object demonstrating the filter and lastupdatesince parameters for a ticketsalessetup query. ```json { "filter": "SELECT id FROM conf.ticketsalessetup WHERE integrated=true", "lastupdatesince": "2014-09-26 15:24:36" } ``` -------------------------------- ### GET /api/1/{accountname}/settings/system/ticketsalessetups/{id} Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/get Retrieves the details of a specific ticket sales setup using its ID. ```APIDOC ## GET /api/1/{accountname}/settings/system/ticketsalessetups/{id} ### Description Retrieves the details of a specific ticket sales setup by its unique ID. ### Method GET ### Endpoint https://apps.ticketmatic.com/api/1/{accountname}/settings/system/ticketsalessetups/{id} ### Parameters #### Path Parameters - **accountname** (string) - Required - The name of the account. - **id** (int) - Required - The unique ID of the ticket sales setup. ### Response #### Success Response (200) - **id** (int) - Unique ID - **name** (string) - Name - **code** (string) - Unique code used for the public link to the ticketsalessetup docs - **integrated** (bool) - Whether or not the ticket sales setup is integrated with the website - **widgetparams** (map) - Widget parameters used for all flows in this setup #### Response Example { "id": 123, "name": "Websales", "code": "d6f72313-bc7a-4dca-a3fc-371057f5f99f", "integrated": false, "widgetparams": { "oncompletion": "orderdetail", "returnurl": "https://www.ticketmatic.com" } } ``` -------------------------------- ### Fetch Product Settings via HTTP Source: https://apps.ticketmatic.com/docs/api/settings/products/getlist Retrieves the list of products for a specific account using a GET request. ```http GET /api/1/{accountname}/settings/products HTTP/1.1 ``` -------------------------------- ### Retrieve ticket sales setups in Go Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/getlist Use the ticketsalessetups.Getlist function. The query object can be passed as nil if no filters are required. ```go import ( "github.com/ticketmatic/tm-go/ticketmatic" "github.com/ticketmatic/tm-go/ticketmatic/settings/system/ticketsalessetups" ) result, err := ticketsalessetups.Getlist(client, &ticketmatic.TicketsalessetupQuery{ Filter: "SELECT id FROM conf.ticketsalessetup WHERE integrated=true", Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")), }) // The query object is optional, it can be omitted when empty. result, err := ticketsalessetups.Getlist(client, nil) ``` -------------------------------- ### HTTP Request for Ticket Layout Templates Source: https://apps.ticketmatic.com/docs/api/settings/communicationanddesign/ticketlayouttemplates/getlist Example HTTP GET request to retrieve ticket layout templates. ```http 1GET /api/1/{accountname}/settings/communicationanddesign/ticketlayouttemplates HTTP/1.1 ``` -------------------------------- ### HTTP Request for Diagnostics Time Source: https://apps.ticketmatic.com/docs/api/diagnostics/time Example HTTP GET request to the diagnostics time endpoint. This call is unauthenticated. ```http 1GET /api/1/{accountname}/diagnostics/time HTTP/1.1 ``` -------------------------------- ### Get a list of ticketsalessetups Source: https://apps.ticketmatic.com/docs/api/settings/system/ticketsalessetups/getlist Retrieves a list of ticket sales setups. You can filter the results by update time or by a specific query. ```APIDOC ## GET /api/1/{accountname}/settings/ticketsalessetups ### Description Retrieves a list of ticket sales setups. This endpoint allows filtering by update time or by a custom query. ### Method GET ### Endpoint `/api/1/{accountname}/settings/system/ticketsalessetups` ### Parameters #### Query Parameters - **filter** (string) - Optional - Filter the returned items by specifying a query on the public datamodel that returns the ids. Example value: `"SELECT id FROM conf.ticketsalessetup WHERE integrated=true"` - **lastupdatesince** (timestamp) - Optional - All items that were updated since this timestamp will be returned. Timestamp should be passed in `YYYY-MM-DD hh:mm:ss` format. Example value: `"2014-09-26 15:24:36"` ### Response #### Success Response (200) - **data** (Ticketsalessetup[]) - An array of ticket sales setup objects. - **id** (int) - Unique ID. Example value: `123` - **name** (string) - Name. Example value: `"Websales"` - **code** (string) - Unique code used for the public link to the ticketsalessetup docs. Example value: `"d6f72313-bc7a-4dca-a3fc-371057f5f99f"` - **integrated** (bool) - Whether or not the ticket sales setup is integrated with the website. - **widgetparams** (map) - Widget parameters used for all flows in this setup. Example value: `{ "oncompletion": "orderdetail", "returnurl": "https://www.ticketmatic.com" }` #### Response Example ```json { "data": [ { "id": 123, "name": "Websales", "code": "d6f72313-bc7a-4dca-a3fc-371057f5f99f", "integrated": false, "widgetparams": { "oncompletion": "orderdetail", "returnurl": "https://www.ticketmatic.com" } } ] } ``` ``` -------------------------------- ### Create a product using the Ticketmatic Go SDK Source: https://apps.ticketmatic.com/docs/api/settings/products/create Use the products.Create function to define a new product with specific pricing exceptions and custom properties. ```go import ( "github.com/ticketmatic/tm-go/ticketmatic" "github.com/ticketmatic/tm-go/ticketmatic/settings/products" ) result, err := products.Create(client, &ticketmatic.Product{ Typeid: 26001, Name: "T-shirt", Description: "Show us some love with our latest shirt, available in 3 sizes.", Instancevalues: &ticketmatic.ProductInstancevalues{ Default: &ticketmatic.ProductInstanceValue{ Price: 25, }, Exceptions: []*ticketmatic.ProductInstanceException{ &ticketmatic.ProductInstanceException{ Properties: map[string][]string{ "size": []string{ "S", }, }, Value: &ticketmatic.ProductInstanceValue{ Price: 20, }, }, &ticketmatic.ProductInstanceException{ Properties: map[string][]string{ "size": []string{ "M", }, }, Value: &ticketmatic.ProductInstanceValue{ Price: 25, }, }, &ticketmatic.ProductInstanceException{ Properties: map[string][]string{ "size": []string{ "L", }, }, Value: &ticketmatic.ProductInstanceValue{ Price: 30, }, }, }, }, Properties: []*ticketmatic.ProductProperty{ &ticketmatic.ProductProperty{ Name: "Size", Description: "Size of the T-Shirt", Key: "size", Values: []*ticketmatic.KeyValueItem{ &ticketmatic.KeyValueItem{ Key: "S", Value: "Small", }, &ticketmatic.KeyValueItem{ Key: "M", Value: "Medium", }, &ticketmatic.KeyValueItem{ Key: "L", Value: "Large", }, }, }, }, Saleendts: ticketmatic.NewTime(ticketmatic.MustParseTime("2025-01-01 00:00:00")), Saleschannels: []int64{ 1, 2, }, Salestartts: ticketmatic.NewTime(ticketmatic.MustParseTime("2017-01-01 00:00:00")), }) ``` -------------------------------- ### HTTP Request for Contact Address Types Source: https://apps.ticketmatic.com/docs/api/settings/system/contactaddresstypes/getlist This is an example of an HTTP GET request to retrieve contact address types from the Ticketmatic API. ```http 1GET /api/1/{accountname}/settings/system/contactaddresstypes HTTP/1.1 ``` -------------------------------- ### POST /api/1/{accountname}/settings/products Source: https://apps.ticketmatic.com/docs/api/settings/products Creates a new product in the system. ```APIDOC ## POST /api/1/{accountname}/settings/products ### Description Creates a new product. ### Method POST ### Endpoint /api/1/{accountname}/settings/products ### Parameters #### Path Parameters - **accountname** (string) - Required - The name of the account. ``` -------------------------------- ### Get Price Types List Response (HTTP) Source: https://apps.ticketmatic.com/docs/api/settings/pricing/pricetypes/getlist Example HTTP response for retrieving a list of price types, returned in JSON format. ```json 1HTTP/1.1 200 OK 2Content-Type: application/json 3 4{ 5 "data": [ 6 { 7 "id": 123, 8 "typeid": 2301, 9 "name": "Student", 10 "remark": "Only valid with a student card.", 11 "isarchived": false, 12 "createdts": "2014-09-26 15:24:36", 13 "lastupdatets": "2014-09-26 15:24:36" 14 } 15 ] 16} ``` -------------------------------- ### ProductCategoryQuery JSON Example Source: https://apps.ticketmatic.com/docs/api/types/ProductCategoryQuery Example JSON object demonstrating the structure of a ProductCategoryQuery request. ```json { "filter": "SELECT id FROM tm.productcategory WHERE nameen LIKE \"%e\"", "includearchived": true, "lastupdatesince": "2014-09-26 15:24:36" } ``` -------------------------------- ### Get Field Definitions Response (JSON) Source: https://apps.ticketmatic.com/docs/api/settings/system/fielddefinitions/getlist Example JSON response when retrieving field definitions. This shows the structure and data types of the returned field definitions. ```json 1{ 2 "data": [ 3 { 4 "id": 123, 5 "typeid": 10001, 6 "align": "left", 7 "description": "Created timestamp", 8 "key": "createdtimestamp", 9 "sqlclause": "tm.order.createdts", 10 "uitype": "number", 11 "variablewidth": true, 12 "width": 50, 13 "isarchived": false, 14 "createdts": "2014-09-26 15:24:36", 15 "lastupdatets": "2014-09-26 15:24:36" 16 } 17 ] 18} ``` -------------------------------- ### Pricetype Voucher Response Example (Go) Source: https://apps.ticketmatic.com/docs/api/settings/vouchers/create Example response structure for creating a pricetype voucher using Go. ```go result := &ticketmatic.Voucher{ Id: 10000, Typeid: 24001, Name: "Pricetype voucher", Codeformatid: 27001, Description: "This voucher can be used to buy tickets for a specific locked pricetype in an event", Nbrofcodes: 0, Validity: &ticketmatic.VoucherValidity{ ExpiryMonthsaftercreation: 12, Maxusages: 10, Maxusagesperevent: 1, }, Isarchived: false, } ```