Introduction
ICRTouch REST API Development Guidelines
If you don’t know what Rest is an overview can be found here https://en.wikipedia.org/wiki/Representational_state_transfer
There isn’t a defined specification of REST each company/person has their own interpretation. So this document has been created so that when ICRTouch is developing a REST API there are rules governing the implementation to maintain consistency between Methods, Filters, Names, return types etc.
Resource Methods
- GET - Read/Retrieve - lowest risk level 1
- POST - Create - risk level 2
- PUT - Update/create full record - idempotence risk level 3
- PATCH - Update part record - if it doesn’t exist fail risk level 2
- DELETE - Delete (this needs to be looked at per table - does it delete or blank) risk level 3
Resource Naming Guide
A resource name should be a thing (noun) instead of referring to an action (verb) because nouns have properties which verbs do not have
A resource name should be plural, Ie. Ticket(s) as there are multiple resources within. An example url would be /api/tickets/1 for a specific entity and /api/tickets for all entities.
A resource can be a singleton or a collection. For example, “customers” is a collection resource and “customer” is a singleton resource. We can identify “customers” collection resources using the URI “/customers”. We can identify a single “customer” resource using the URI “/customers/{customerId}”.
Use lowercase letters in URIs
When convenient lowercase letters should be used in URI paths
Pagination
Endpoints that return multiples i.e. “GET /api/tickets”
GET /api/tickets
should have pagination.
Pagination will have two filters
- page=1
- pagesize=10,
If no "pagesize" is set, the resource defaults to a default value of (10), Max (250)
Example pagination object
"pagination": {
"uri": {},
"hasMore": false,
"total": 7014,
"perPage": 10,
"pageCount": 702,
"pageSelector": "page",
"currentPage": 1,
"next": "http://localhost/api/v1/tickets?page=2",
"previous": null,
"segment": 0
}
Sort By
Sortable by any allowed field, by name...Up or down, asc/desc if its string, alphabetical If it's a “number”, order by size.
- sort=key:direction
?sort=id:desc
Parameters/Filters
query[ColumnName] = query querylike[ColumnName] = “%query%” (if no % in string then wrap both)
?query[id]=1&query[name]=ashley
This allows you to filter any request by multiple fields, the field does have to be an accepted/allowed filterable field. It also allows for loose filtering with querylike, which acts like a sql LIKE query.
A few alternatives to this, as well as the possibility to have a /search verb for each resource to give a more in depth filtering.
Deleted Resources
Resources with soft deletes
?deleted=true
?deleted=true
This will return all items, including deleted resources. (if they are soft-delete enabled)
Expansions
Expansions give the ability to “expand” other types of resource in the resource entity, so long as a relationship is set between them.
For example : ?exp=[ticket_type]
This could also be used to allow expansion of nested resources
For example : exp=[ticket_type,[[event]]]
exp=[ticket_type,[[event]]]
This would return the expanded ticket_type, which would in turn also have an related/expanded event.
Expansions are limited to 3 levels deep [ticket_type,[[event,[[event_dates]]]]]
.
EventBrite & Asana’s API Does this, it's a great way to minimise server resources as not all requests will have expansions. It also helps as if expansions were not available, then extra requests to the api would have to be made.
Note : One reason for wanting expansion’s is that ETAL http requests HAVE to be done in queues, meaning nested requests could slow up user interfaces and cause more problems.
API Response Rules
Return field names where possible, avoid casting names which lead to inconsistencies between developers The return should be of the expected type so:
- Integer = “PLU” : 1 (not “PLU” : “1”) (the underlaying datatype of the DB should be used as you will get integers stored in varchars).
- Strings = “Name” : “Test”
- Arrays = “Items” : [{“Price” : 1000,“Qty” : 1}]
Null returns should be avoided at all costs, it is better to replay with an empty array / string this will help developers understand what is in the response with the need for documentation.
Error Responses
400 Responses should follow the below rules
{
"status": 404,
"error": 404,
"messages": [{
"code": 1,
"text": "Could not find any items"
}]
}
Codes :
- 1 = Could not find any items,
- 2 = Could not find item,
- 3 = Could not find item to edit
- 4 = Could not find item to delete
- 5 = Data limitation set
Versioning
Currently we have no versioning on APIs this restricts us from improving end points without breaking existing integrations.
When to roll on version number When changes are made that will break existing integrations these include A change to the format of the response data for one or more calls A change to the response type (changing a integer to a float) Removing any part of the API
URI Versioning https://api.touchoffice.net/v1
Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "https://api.icrtouch.com/api/v1"
-H "Authorization: myapikeyhere"
Make sure to replace
myapikeyhere
with your API key.
Tickets uses API keys to allow access to the API.
Tickets expects for the API key to be included in all API requests to the server in a header that looks like the following:
Authorization: bearer myapikeyhere
In addition to the apiKey, in order to get the correct companies data, you must pass the company TAK this can either be in the GET or as a Header, for example
# With shell, you can just pass the correct header with each request
curl "https://api.icrtouch.com/api/v1"
-H "TAK: yourtakhere"
Events
Get All Events
curl "/api/v1/events"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 4,
"name": "Boat Hire July2020",
"description": "Tickets for adults",
"status": 0,
"capacity": 0,
"show_on_webshop":false,
"webshop_category_id":0,
"created_at": "2020-07-08T11:44:47+01:00",
"updated_at": "2020-07-08T15:01:13+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
],
This endpoint retrieves all events, paginated.
HTTP Request
GET /api/v1/events
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quanitty of events in a single page response |
Get a Specific Event
curl "/api/events/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 4,
"name": "Boat Hire July2020",
"description": "Tickets for adults",
"status": 0,
"capacity": 0,
"show_on_webshop":false,
"webshop_category_id":0,
"created_at": "2020-07-08T11:44:47+01:00",
"updated_at": "2020-07-08T15:01:13+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific ticket.
HTTP Request
GET /api/v1/events/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to retrieve |
Create a Event
curl "/api/tickets/2"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name":"New Event"
"description":"My new event"
}
The above command returns JSON structured like this:
{
"id": 4,
"name": "New Event",
"description": "My new event",
"status": 0,
"capacity": 0,
"created_at": "2020-07-08T11:44:47+01:00",
"updated_at": "2020-07-08T15:01:13+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific ticket.
HTTP Request
POST /api/v1/events/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to retrieve |
Edit a Event (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"description":"Edited description"
}
The above command returns JSON structured like this:
{
"id": 4,
"name": "Boat Hire July2020",
"description": "Edited description",
"status": 0,
"capacity": 0,
"created_at": "2020-07-08T11:44:47+01:00",
"updated_at": "2020-07-08T15:01:13+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific ticket.
HTTP Request
PUT /api/v1/events/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to retrieve |
Edit a Event (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"description":"Edited description 2"
}
The above command returns JSON structured like this:
{
"id": 4,
"name": "Boat Hire July2020",
"description": "Edited description 2",
"status": 0,
"capacity": 0,
"created_at": "2020-07-08T11:44:47+01:00",
"updated_at": "2020-07-08T15:01:13+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific event.
HTTP Request
PUT /api/v1/events/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event to retrieve |
Delete a Specific Event
curl "/api/v1/events/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific events.
HTTP Request
DELETE /api/v1/events/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event to delete |
Event Sites
Get All Event Sites
curl "/api/v1/event-sites"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/event-sites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
[
{
"id": 3,
"event_id": 5,
"site": 1,
"description": "test",
"status": 0,
"created_at": "2020-07-08T14:44:22+01:00",
"updated_at": "2020-07-23T11:55:52+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
{
"id": 4,
"event_id": 6,
"site": 1,
"description": "foh",
"status": 0,
"created_at": "2020-07-08T15:14:51+01:00",
"updated_at": "2020-07-08T15:14:51+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
]
This endpoint retrieves all event dates, paginated.
HTTP Request
GET /api/v1/event-sites
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quanitty of events in a single page response |
Get a Specific Event Site
curl "/api/event-sites/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 3,
"event_id": 5,
"site": 1,
"description": "test",
"status": 0,
"created_at": "2020-07-08T14:44:22+01:00",
"updated_at": "2020-07-23T11:55:52+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific event site.
HTTP Request
GET /api/v1/event-sites/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event site to retrieve |
Create a Event Site
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"event_id":5
"site": 1,
"description": "test",
"status": 0,
}
The above command returns JSON structured like this:
{
"id": 3,
"event_id": 5,
"site": 1,
"description": "test",
"status": 0,
"created_at": "2020-07-08T14:44:22+01:00",
"updated_at": "2020-07-23T11:55:52+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific event site.
HTTP Request
POST /api/v1/event-sites/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event site to retrieve |
Edit a Event Site (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/event-date/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"event_id": 2,
}
The above command returns JSON structured like this:
{
"id": 3,
"event_id": 2,
"site": 1,
"description": "test",
"status": 0,
"created_at": "2020-07-08T14:44:22+01:00",
"updated_at": "2020-07-23T11:55:52+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific event site.
HTTP Request
PUT /api/v1/event-sites/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event site to retrieve |
Edit a Event Site (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"site": 3,
}
The above command returns JSON structured like this:
{
"id": 3,
"event_id": 2,
"site": 3,
"description": "test",
"status": 0,
"created_at": "2020-07-08T14:44:22+01:00",
"updated_at": "2020-07-23T11:55:52+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific event site.
HTTP Request
PUT /api/v1/event-sites/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event site to retrieve |
Delete a Specific Event Site
curl "/api/v1/event-sites/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific event site.
HTTP Request
DELETE /api/v1/event-sites/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event site to delete |
Event Dates
Get All Event Dates
curl "/api/v1/event-dates"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/event-dates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 4,
"event_id": 4,
"start_date_time": "2020-07-01 00:00:00",
"end_date_time": "2020-07-31 00:00:00",
"created_at": "2020-07-08T15:01:12+01:00",
"updated_at": "2020-07-08T15:01:12+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
]
This endpoint retrieves all event dates, paginated.
HTTP Request
GET /api/v1/event-dates
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quanitty of events in a single page response |
Get a Specific Event Date
curl "/api/event-dates/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
json { "id": 4, "event_id": 4, "start_date_time": "2020-07-01 00:00:00", "end_date_time": "2020-07-31 00:00:00", "created_at": "2020-07-08T15:01:12+01:00", "updated_at": "2020-07-08T15:01:12+01:00", "deleted_at": "0000-00-00T00:00:00+00:00" }
This endpoint retrieves a specific event date.
HTTP Request
GET /api/v1/event-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event date to retrieve |
Create a Event Date
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"event_id":4
"start_date_time": "2020-07-01 00:00:00",
"end_date_time": "2020-07-31 00:00:00",
}
The above command returns JSON structured like this:
{
"id": 4,
"event_id": 4,
"start_date_time": "2020-07-01 00:00:00",
"end_date_time": "2020-07-31 00:00:00",
"created_at": "2020-07-08T15:01:12+01:00",
"updated_at": "2020-07-08T15:01:12+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific event date.
HTTP Request
POST /api/v1/event-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event date to retrieve |
Edit a Event Date (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "start_date_time": "2020-07-02 00:00:00", } ```
The above command returns JSON structured like this: ```json
{ "id": 4, "event_id": 4, "start_date_time": "2020-07-02 00:00:00", "end_date_time": "2020-07-31 00:00:00", "created_at": "2020-07-08T15:01:12+01:00", "updated_at": "2020-07-08T15:01:12+01:00", "deleted_at": "0000-00-00T00:00:00+00:00" } ```
This endpoint retrieves a specific event date.
HTTP Request
PUT /api/v1/event-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event date to retrieve |
Edit a Event Date (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"start_date_time": "2020-07-06 00:00:00",
}
The above command returns JSON structured like this:
{
"id": 4,
"event_id": 4,
"start_date_time": "2020-07-06 00:00:00",
"end_date_time": "2020-07-31 00:00:00",
"created_at": "2020-07-08T15:01:12+01:00",
"updated_at": "2020-07-08T15:01:12+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific event date.
HTTP Request
PUT /api/v1/event-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event date to retrieve |
Delete a Specific Event Date
curl "/api/v1/event-dates/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific event date.
HTTP Request
DELETE /api/v1/event-dates/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event date to delete |
Tickets
Get All Tickets
curl "/api/v1/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/tickets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 128,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"sale_id": 67,
"ticket_type_id": 2,
"state": 1,
"selected_date": "2021-01-22 00:00:00",
"selected_ticket_type_time_id": 8,
"created_at": "2021-01-13T12:19:35+00:00",
"updated_at": "2021-01-13T12:40:26+00:00",
"deleted_at": "-001-11-30T00:00:00-00:01"
}
]
This endpoint retrieves all tickets, paginated.
HTTP Request
GET /api/v1/tickets
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quanitty of tickets in a single page response |
validate | false | Adds the validation property to the ticket |
Get a Specific Ticket
curl "/api/tickets/22"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 22,
"uuid": "686d02e5-ac08-4705-bcdb-3518f6ce9320",
"sale_id": 11,
"ticket_type_id": 2,
"state": 1,
"selected_date": "2020-07-08 00:00:00",
"selected_ticket_type_time_id": 0,
"created_at": "2020-07-08T15:08:33+01:00",
"updated_at": "2020-07-08T15:08:33+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00",
"qr_code": "ZEIxZW9ybFo3MjVQZ1pTV0NSRXEzbjBCd212MkpON28xV055Nmo4cmd6MUQzclgwM1hoUlpuMk10M09pakZlL0tqd3JRZE5RNklDVmN6TjR2bFRYeXc9PQ==,ggqfbwkr1VptPbg524vbqw=="
}
This endpoint retrieves a specific ticket.
HTTP Request
GET /api/v1/tickets/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to retrieve |
Create a Ticket
curl "/api/tickets/2"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"ticket_type_id":3,
"selected_date":"2020-06-20"
}
The above command returns JSON structured like this:
{
"id": 111,
"uuid": "686d02e5-ac08-4705-bcdb-3518f6ce9320",
"sale_id": 0,
"ticket_type_id": 3,
"state": 1,
"selected_date": "2020-06-20 00:00:00",
"selected_ticket_type_time_id": 0,
"created_at": "2020-07-08T15:08:33+01:00",
"updated_at": "2020-07-08T15:08:33+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00",
"qr_code": "ZEIxZW9ybFo3MjVQZ1pTV0NSRXEzbjBCd212MkpON28xV055Nmo4cmd6MUQzclgwM1hoUlpuMk10M09pakZlL0tqd3JRZE5RNklDVmN6TjR2bFRYeXc9PQ==,ggqfbwkr1VptPbg524vbqw=="
}
This endpoint retrieves a specific ticket.
HTTP Request
POST /api/v1/tickets/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to retrieve |
Edit a Ticket (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"ticket_type_id":5
}
The above command returns JSON structured like this:
{
"id": 111,
"uuid": "686d02e5-ac08-4705-bcdb-3518f6ce9320",
"sale_id": 0,
"ticket_type_id": 5,
"state": 1,
"selected_date": "2020-06-20 00:00:00",
"selected_ticket_type_time_id": 0,
"created_at": "2020-07-08T15:08:33+01:00",
"updated_at": "2020-07-08T15:08:33+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00",
"qr_code": "ZEIxZW9ybFo3MjVQZ1pTV0NSRXEzbjBCd212MkpON28xV055Nmo4cmd6MUQzclgwM1hoUlpuMk10M09pakZlL0tqd3JRZE5RNklDVmN6TjR2bFRYeXc9PQ==,ggqfbwkr1VptPbg524vbqw=="
}
This endpoint retrieves a specific ticket.
HTTP Request
PUT /api/v1/events/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to retrieve |
Edit a Ticket (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"state":3
}
The above command returns JSON structured like this:
{
"id": 111,
"uuid": "686d02e5-ac08-4705-bcdb-3518f6ce9320",
"sale_id": 0,
"ticket_type_id": 5,
"state": 3,
"selected_date": "2020-06-20 00:00:00",
"selected_ticket_type_time_id": 0,
"created_at": "2020-07-08T15:08:33+01:00",
"updated_at": "2020-07-08T15:08:33+01:00",
"deleted_at": "0000-00-00T00:00:00+00:00",
"qr_code": "ZEIxZW9ybFo3MjVQZ1pTV0NSRXEzbjBCd212MkpON28xV055Nmo4cmd6MUQzclgwM1hoUlpuMk10M09pakZlL0tqd3JRZE5RNklDVmN6TjR2bFRYeXc9PQ==,ggqfbwkr1VptPbg524vbqw=="
}
This endpoint retrieves a specific ticket.
HTTP Request
PUT /api/v1/events/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to retrieve |
Delete a Specific Ticket
curl "/api/v1/tickets/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific tickets.
HTTP Request
DELETE /api/v1/tickets/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the ticket to delete |
Ticket Scans
Get All Ticket Scans
curl "/api/v1/scans"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/scans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Ticket Scans, paginated.
HTTP Request
GET /api/v1/scans
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of ticket Scans in a single page response |
Get a Specific Ticket Scans
curl "/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
json { "id": 2, "uuid": "135167bb-46a4-4789-9863-8e4ec07aead7", "name": "Adult", "description": "oky", "plu": 7, "event_id": 5, "scannable_offline": false, "scan_allowance_total": 1, "scan_allowance_daily": 0, "bookable": true, "element_capacity": 8, "total_capacity": 0, "created_at": "2020-07-08T11:51:32+01:00", "updated_at": "2021-01-13T13:47:57+00:00", "deleted_at": "0000-00-00T00:00:00+00:00" }
This endpoint retrieves a specific Ticket Scans.
HTTP Request
GET /api/v1/scans/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Scans to retrieve |
Create a Ticket Scans
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Scans.
HTTP Request
POST /api/v1/scans/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Scans to retrieve |
Edit a Ticket Scans (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Scans.
HTTP Request
PUT /api/v1/scans/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Scans to retrieve |
Edit a Ticket Scans (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Scans.
HTTP Request
PUT /api/v1/scans/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Scans to retrieve |
Delete a Specific Ticket Scans
curl "/api/v1/scans/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Ticket Scans.
HTTP Request
DELETE /api/v1/scans/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Scans to delete |
Ticket Upgrades
Get All Ticket Upgrades
curl "/api/v1/ticket-upgrades"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/ticket-upgrades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Ticket Upgrades, paginated.
HTTP Request
GET /api/v1/ticket-upgrades
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of ticket Upgrades in a single page response |
Get a Specific Ticket Upgrades
curl "/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
json { "id": 2, "uuid": "135167bb-46a4-4789-9863-8e4ec07aead7", "name": "Adult", "description": "oky", "plu": 7, "event_id": 5, "scannable_offline": false, "scan_allowance_total": 1, "scan_allowance_daily": 0, "bookable": true, "element_capacity": 8, "total_capacity": 0, "created_at": "2020-07-08T11:51:32+01:00", "updated_at": "2021-01-13T13:47:57+00:00", "deleted_at": "0000-00-00T00:00:00+00:00" }
This endpoint retrieves a specific Ticket Upgrades.
HTTP Request
GET /api/v1/ticket-upgrades/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Upgrades to retrieve |
Create a Ticket Upgrades
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Upgrades.
HTTP Request
POST /api/v1/ticket-upgrades/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Upgrades to retrieve |
Edit a Ticket Upgrades (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Upgrades.
HTTP Request
PUT /api/v1/ticket-upgrades/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Upgrades to retrieve |
Edit a Ticket Upgrades (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Upgrades.
HTTP Request
PUT /api/v1/ticket-upgrades/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Upgrades to retrieve |
Delete a Specific Ticket Upgrades
curl "/api/v1/ticket-upgrades/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Ticket Upgrades.
HTTP Request
DELETE /api/v1/ticket-upgrades/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Upgrades to delete |
Ticket Notes
Get All Ticket Notes
curl "/api/v1/notes"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Ticket Notes, paginated.
HTTP Request
GET /api/v1/notes
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of ticket Notes in a single page response |
Get a Specific Ticket Notes
curl "/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
json { "id": 2, "uuid": "135167bb-46a4-4789-9863-8e4ec07aead7", "name": "Adult", "description": "oky", "plu": 7, "event_id": 5, "scannable_offline": false, "scan_allowance_total": 1, "scan_allowance_daily": 0, "bookable": true, "element_capacity": 8, "total_capacity": 0, "created_at": "2020-07-08T11:51:32+01:00", "updated_at": "2021-01-13T13:47:57+00:00", "deleted_at": "0000-00-00T00:00:00+00:00" }
This endpoint retrieves a specific Ticket Notes.
HTTP Request
GET /api/v1/notes/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Notes to retrieve |
Create a Ticket Notes
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Notes.
HTTP Request
POST /api/v1/notes/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Notes to retrieve |
Edit a Ticket Notes (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Notes.
HTTP Request
PUT /api/v1/notes/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Notes to retrieve |
Edit a Ticket Notes (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Notes.
HTTP Request
PUT /api/v1/notes/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Notes to retrieve |
Delete a Specific Ticket Notes
curl "/api/v1/notes/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Ticket Notes.
HTTP Request
DELETE /api/v1/notes/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Notes to delete |
Ticket Types
Get All Ticket Types
curl "/api/v1/ticket-types"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/ticket-types",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Ticket Types, paginated.
HTTP Request
GET /api/v1/ticket-types
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of ticket types in a single page response |
Get a Specific Ticket Types
curl "/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Types.
HTTP Request
GET /api/v1/ticket-types/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Types to retrieve |
Create a Ticket Types
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Types.
HTTP Request
POST /api/v1/ticket-types/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Types to retrieve |
Edit a Ticket Types (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Types.
HTTP Request
PUT /api/v1/ticket-types/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Types to retrieve |
Edit a Ticket Types (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Types.
HTTP Request
PUT /api/v1/ticket-types/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Types to retrieve |
Delete a Specific Ticket Types
curl "/api/v1/ticket-types/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Ticket Types.
HTTP Request
DELETE /api/v1/ticket-types/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Types to delete |
Ticket Type Times
Get All Ticket Type Times
curl "/api/v1/ticket-type-times"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/ticket-type-times",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Ticket Type Times, paginated.
HTTP Request
GET /api/v1/ticket-type-times
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of ticket type Times in a single page response |
Get a Specific Ticket Type Times
curl "/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Times.
HTTP Request
GET /api/v1/ticket-type-times/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Times to retrieve |
Create a Ticket Type Times
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Times.
HTTP Request
POST /api/v1/ticket-type-times/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Times to retrieve |
Edit a Ticket Type Times (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Times.
HTTP Request
PUT /api/v1/ticket-type-times/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Times to retrieve |
Edit a Ticket Type Times (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Times.
HTTP Request
PUT /api/v1/ticket-type-times/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Times to retrieve |
Delete a Specific Ticket Type Times
curl "/api/v1/ticket-type-times/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Ticket Type Times.
HTTP Request
DELETE /api/v1/ticket-type-times/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Times to delete |
Ticket Type Dates
Get All Ticket Type Dates
curl "/api/v1/ticket-type-dates"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/ticket-type-dates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Ticket Type Dates, paginated.
HTTP Request
GET /api/v1/ticket-type-dates
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of ticket type Dates in a single page response |
Get a Specific Ticket Type Dates
curl "/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Dates.
HTTP Request
GET /api/v1/ticket-type-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Dates to retrieve |
Create a Ticket Type Dates
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Dates.
HTTP Request
POST /api/v1/ticket-type-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Dates to retrieve |
Edit a Ticket Type Dates (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Dates.
HTTP Request
PUT /api/v1/ticket-type-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Dates to retrieve |
Edit a Ticket Type Dates (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Dates.
HTTP Request
PUT /api/v1/ticket-type-dates/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Dates to retrieve |
Delete a Specific Ticket Type Dates
curl "/api/v1/ticket-type-dates/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Ticket Type Dates.
HTTP Request
DELETE /api/v1/ticket-type-dates/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Dates to delete |
Ticket Type Upgrade Paths
Get All Ticket Type Upgrade Paths
curl "/api/v1/upgrade-paths"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/upgrade-paths",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Ticket Type Upgrade Paths, paginated.
HTTP Request
GET /api/v1/upgrade-paths
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of Ticket Type Upgrade Paths in a single page response |
Get a Specific Ticket Type Upgrade Paths
curl "/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Upgrade Paths.
HTTP Request
GET /api/v1/upgrade-paths/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Upgrade Paths to retrieve |
Create a Ticket Type Upgrade Paths
curl "/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Upgrade Paths.
HTTP Request
POST /api/v1/upgrade-paths/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Upgrade Paths to retrieve |
Edit a Ticket Type Upgrade Paths (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Upgrade Paths.
HTTP Request
PUT /api/v1/upgrade-paths/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Upgrade Paths to retrieve |
Edit a Ticket Type Upgrade Paths (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Ticket Type Upgrade Paths.
HTTP Request
PUT /api/v1/upgrade-paths/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Upgrade Paths to retrieve |
Delete a Specific Ticket Type Upgrade Paths
curl "/api/v1/upgrade-paths/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Ticket Type Upgrade Paths.
HTTP Request
DELETE /api/v1/upgrade-paths/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Ticket Type Upgrade Paths to delete |
Sales
Get All Sales
curl "http://apiv2.touchoffice.net/api/v1/sales"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/sales",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Sales, paginated.
HTTP Request
GET https://api.icrtouch.com/api/v1/sales
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of Sales in a single page response |
Get a Specific Sales
curl "http://apiv2.touchoffice.net/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Sales.
HTTP Request
GET https://api.icrtouch.com/api/v1/sales/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Sales to retrieve |
Create a Sales
curl "http://apiv2.touchoffice.net/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Sales.
HTTP Request
POST https://api.icrtouch.com/api/v1/sales/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Sales to retrieve |
Edit a Sales (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "http://apiv2.touchoffice.net/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Sales.
HTTP Request
PUT https://api.icrtouch.com/api/v1/sales/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Sales to retrieve |
Edit a Sales (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "http://apiv2.touchoffice.net/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Sales.
HTTP Request
PUT https://api.icrtouch.com/api/v1/sales/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Sales to retrieve |
Delete a Specific Sales
curl "http://apiv2.touchoffice.net/api/v1/sales/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Sales.
HTTP Request
DELETE http://apiv2.touchoffice.net/api/v1/sales/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Sales to delete |
Online Sale Gateways
Get All Online Sale Gateways
curl "http://apiv2.touchoffice.net/api/v1/onlinesalegateways"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "localhost/api/v1/onlinesalegateways",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
The above command returns JSON structured like this:
"data": [
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
},
]
This endpoint retrieves all Online Sale Gateways, paginated.
HTTP Request
GET https://api.icrtouch.com/api/v1/onlinesalegateways
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | Defines the pagination page |
pagesize | 10 | Defines the quantity of Online Sale Gateways in a single page response |
Get a Specific Online Sale Gateways
curl "http://apiv2.touchoffice.net/api/ticket-types/4"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "Adult",
"description": "oky",
"plu": 7,
"event_id": 5,
"scannable_offline": false,
"scan_allowance_total": 1,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Online Sale Gateways.
HTTP Request
GET https://api.icrtouch.com/api/v1/onlinesalegateways/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Online Sale Gateways to retrieve |
Create a Online Sale Gateways
curl "http://apiv2.touchoffice.net/api/tickets"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"name": "New Ticket From API",
"description" : "This is new",
"eventid": 1,
"plu":22,
"bookable":0,
"elementcapacity":0,
"totalcapacity":0,
"scannableoffline":0
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "This is new",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Online Sale Gateways.
HTTP Request
POST https://api.icrtouch.com/api/v1/onlinesalegateways/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Online Sale Gateways to retrieve |
Edit a Online Sale Gateways (PUT)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL ```shell curl "http://apiv2.touchoffice.net/api/event-date/1" -H "Authorization: yourapikey" -H "TAK: your_tak"
{ "description" : "Updated description", } ```
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 22,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Online Sale Gateways.
HTTP Request
PUT https://api.icrtouch.com/api/v1/onlinesalegateways/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Online Sale Gateways to retrieve |
Edit a Online Sale Gateways (PATCH)
This endpoint much like the create event endpoint takes an input of JSON with the new fields that you would like to edit. To select the event, the ID of the event goes in the URL
curl "http://apiv2.touchoffice.net/api/events/1"
-H "Authorization: yourapikey"
-H "TAK: your_tak"
{
"plu" : 2,
}
The above command returns JSON structured like this:
{
"id": 2,
"uuid": "135167bb-46a4-4789-9863-8e4ec07aead7",
"name": "New Ticket From API",
"description": "Updated description",
"plu": 2,
"event_id": 1,
"scannable_offline": false,
"scan_allowance_total": 0,
"scan_allowance_daily": 0,
"bookable": true,
"element_capacity": 8,
"total_capacity": 0,
"created_at": "2020-07-08T11:51:32+01:00",
"updated_at": "2021-01-13T13:47:57+00:00",
"deleted_at": "0000-00-00T00:00:00+00:00"
}
This endpoint retrieves a specific Online Sale Gateways.
HTTP Request
PUT https://api.icrtouch.com/api/v1/onlinesalegateways/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Online Sale Gateways to retrieve |
Delete a Specific Online Sale Gateways
curl "http://apiv2.touchoffice.net/api/v1/onlinesalegateways/ID"
-X DELETE
-H "Authorization: yourapikey"
-H "TAK: your_tak"
This endpoint deletes a specific Online Sale Gateways.
HTTP Request
DELETE http://apiv2.touchoffice.net/api/v1/onlinesalegateways/ID
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the Online Sale Gateways to delete |
Errors
The Kittn API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The requested is hidden for administrators only. |
404 | Not Found -- The specified item could not be found. |
405 | Method Not Allowed -- You tried to access a item with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't json. |
410 | Gone -- The requested has been removed from our servers. |
418 | I'm a teapot. |
429 | Too Many Requests -- You're requesting too many items! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
set :endpoint, 'https://apiv2.touchoffice.netss'