Modify an existing ticketsalessetup

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/system/ticketsalessetups/{id}

Example

Request

 1use Ticketmatic\Endpoints\Settings\System\Ticketsalessetups;
 2
 3$result = Ticketsalessetups::update($client, $id, 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));

Response

 1object(\Ticketmatic\Model\Ticketsalessetup) (5) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(8) "Websales"
 6  ["code"]=>
 7  string(36) "d6f72313-bc7a-4dca-a3fc-371057f5f99f"
 8  ["integrated"]=>
 9  bool(false)
10  ["widgetparams"]=>
11  array(2) {
12    ["oncompletion"]=>
13    string(11) "orderdetail"
14    ["returnurl"]=>
15    string(27) "https://www.ticketmatic.com"
16  }
17}
18

Request

 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})

Response

 1result := &ticketmatic.Ticketsalessetup{
 2    Id: 123,
 3    Name: "Websales",
 4    Code: "d6f72313-bc7a-4dca-a3fc-371057f5f99f",
 5    Integrated: false,
 6    Widgetparams: map[string]string{
 7        "oncompletion": "orderdetail",
 8        "returnurl": "https://www.ticketmatic.com",
 9    },
10}

Request

 1PUT /api/1/{accountname}/settings/system/ticketsalessetups/{id} HTTP/1.1
 2Content-Type: application/json
 3
 4{
 5    "name": "Websales",
 6    "code": "d6f72313-bc7a-4dca-a3fc-371057f5f99f",
 7    "integrated": false,
 8    "widgetparams": {
 9        "oncompletion": "orderdetail",
10        "returnurl": "https://www.ticketmatic.com"
11    }
12}

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "name": "Websales",
 7    "code": "d6f72313-bc7a-4dca-a3fc-371057f5f99f",
 8    "integrated": false,
 9    "widgetparams": {
10        "oncompletion": "orderdetail",
11        "returnurl": "https://www.ticketmatic.com"
12    }
13}

Request body fields

FieldDescription
name
string 
(required)

Name

Example value:"Websales"
code
string 
(required)

Unique code used for the public link to the ticketsalessetup docs

Example value:"d6f72313-bc7a-4dca-a3fc-371057f5f99f"
integrated
bool 
(required)

Whether or not the ticket sales setup is integrated with the website

        </td>
    </tr><tr>
        <td class="field">
            <div class="name">widgetparams</div>
            <div class="type">map&lt;string, string&gt;&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Widget parameters used for all flows in this setup</p> 
            <strong>Example value:</strong><code>{ &#34;oncompletion&#34;: &#34;orderdetail&#34;, &#34;returnurl&#34;: &#34;https://www.ticketmatic.com&#34; }</code>
        </td>
    </tr>
</tbody>

Type reference: Ticketsalessetup

Result fields

FieldDescription
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<string, string>

Widget parameters used for all flows in this setup

Example value:{ "oncompletion": "orderdetail", "returnurl": "https://www.ticketmatic.com" }

Type reference: Ticketsalessetup