acomodo-Ticketshop GraphQL API
API documentation.
API Endpoints
https://stage-api.acomodo.de/graphql
Version
0.6.0
Authorization
The Client Authorization works via an HTTP Header, as an long-term access-token. The access-tokens will be generated from codekeepers only on request
HTTP Header
Authorization: <access-token>
Changelog
Versions
0.6.0
- update non-null and add explizit "optional" to the description.
0.5.0
- add order to ticket_sold mutation
- add order query endpoint
0.4.1
- add info about the ticket category price array to the documentation.
0.4.0
- add mutation tickets_free: remove the block from tickets before they expire.
0.1
- initial release
Sort-Directive
Arguments
| Name | Description |
|---|---|
fields - [Sort!] |
Field directive
@sort(fields: [{field: "location_id", asc: true}])
Queries
category
event
Response
Returns an Event
Example
Query
query event(
$event_id: Int,
$client_id: Int,
$search: String,
$location_id: Int,
$date_from: String,
$date_to: String,
$state: String
) {
event(
event_id: $event_id,
client_id: $client_id,
search: $search,
location_id: $location_id,
date_from: $date_from,
date_to: $date_to,
state: $state
) {
event_id
title
client_id
location_id
location {
...EventLocationFragment
}
subtitle
description
entry_info
more_info
start_date
start_time
end_date
end_time
advanced_sales_end_time
external_url
categories {
...CategoryFragment
}
images {
...EventImageFragment
}
tickets {
...EventTicketInfoFragment
}
tickets_sold {
...TicketSoldFragment
}
tickets_available
tickets_contingent
}
}
Variables
{
"event_id": 123,
"client_id": 123,
"search": "abc123",
"location_id": 987,
"date_from": "xyz789",
"date_to": "abc123",
"state": "xyz789"
}
Response
{
"data": {
"event": {
"event_id": 987,
"title": "xyz789",
"client_id": 123,
"location_id": 987,
"location": EventLocation,
"subtitle": "xyz789",
"description": "abc123",
"entry_info": "abc123",
"more_info": "xyz789",
"start_date": "xyz789",
"start_time": "xyz789",
"end_date": "xyz789",
"end_time": "xyz789",
"advanced_sales_end_time": "abc123",
"external_url": "abc123",
"categories": [Category],
"images": [EventImage],
"tickets": [EventTicketInfo],
"tickets_sold": [TicketSold],
"tickets_available": 987,
"tickets_contingent": 123
}
}
}
events
Response
Returns an EventPagination
Example
Query
query events(
$first: Int,
$offset: Int
) {
events(
first: $first,
offset: $offset
) {
totalCount
edges {
...EventFragment
}
pageInfo {
...pageInfoFragment
}
}
}
Variables
{"first": 123, "offset": 123}
Response
{
"data": {
"events": {
"totalCount": 123,
"edges": [Event],
"pageInfo": pageInfo
}
}
}
locations
Response
Returns [EventLocation]
Example
Query
query locations(
$client_id: Int,
$state: String
) {
locations(
client_id: $client_id,
state: $state
) {
location_id
name
client_id
}
}
Variables
{"client_id": 123, "state": "abc123"}
Response
{
"data": {
"locations": [
{
"location_id": 123,
"name": "abc123",
"client_id": 123
}
]
}
}
order
Description
returns details of an order. Restricted to users with role: VIEW_ORDER
Example
Query
query order($order_id: Int) {
order(order_id: $order_id) {
order_id
state
firstname
lastname
country
postal_code
city
street
email
phone
timestamp
access_token
tickets {
...OrderTicketFragment
}
}
}
Variables
{"order_id": 123}
Response
{
"data": {
"order": {
"order_id": 987,
"state": "xyz789",
"firstname": "abc123",
"lastname": "abc123",
"country": "xyz789",
"postal_code": "xyz789",
"city": "xyz789",
"street": "xyz789",
"email": "xyz789",
"phone": "xyz789",
"timestamp": "abc123",
"access_token": "abc123",
"tickets": [OrderTicket]
}
}
}
timestamp
Description
the current server unix timestamp. Relevant for the ticket-block expire timestamp.
Response
Returns an Int
Example
Query
query timestamp {
timestamp
}
Response
{"data": {"timestamp": 123}}
Mutations
order
Response
Returns an Int
Arguments
| Name | Description |
|---|---|
tickets - [OrderTicketInput!]
|
|
order - OrderInput!
|
Example
Query
mutation order(
$tickets: [OrderTicketInput!],
$order: OrderInput!
) {
order(
tickets: $tickets,
order: $order
)
}
Variables
{
"tickets": [OrderTicketInput],
"order": OrderInput
}
Response
{"data": {"order": 987}}
order_cancel
Response
Returns a Boolean!
Example
Query
mutation order_cancel(
$order_id: Int!,
$access_token: String!,
$ticket_ids: [Int!],
$mail: Boolean,
$refund_reason: String
) {
order_cancel(
order_id: $order_id,
access_token: $access_token,
ticket_ids: $ticket_ids,
mail: $mail,
refund_reason: $refund_reason
)
}
Variables
{
"order_id": 987,
"access_token": "xyz789",
"ticket_ids": [987],
"mail": false,
"refund_reason": "abc123"
}
Response
{"data": {"order_cancel": false}}
order_payment
Response
Returns a Boolean!
Example
Query
mutation order_payment(
$order_id: Int!,
$psp_reference: String!,
$payment_method: String!
) {
order_payment(
order_id: $order_id,
psp_reference: $psp_reference,
payment_method: $payment_method
)
}
Variables
{
"order_id": 987,
"psp_reference": "abc123",
"payment_method": "abc123"
}
Response
{"data": {"order_payment": false}}
ticket_storno
Response
Returns a Boolean
Example
Query
mutation ticket_storno(
$ticket_uuid: String!,
$reason: String
) {
ticket_storno(
ticket_uuid: $ticket_uuid,
reason: $reason
)
}
Variables
{
"ticket_uuid": "xyz789",
"reason": "xyz789"
}
Response
{"data": {"ticket_storno": false}}
ticket_verify
Response
Returns an EventTicket
Example
Query
mutation ticket_verify(
$ticket_uuid: String!,
$invalidation: Boolean
) {
ticket_verify(
ticket_uuid: $ticket_uuid,
invalidation: $invalidation
) {
ticket_id
event_id
uuid
state
category
price
reason
invalid
}
}
Variables
{
"ticket_uuid": "abc123",
"invalidation": false
}
Response
{
"data": {
"ticket_verify": {
"ticket_id": 123,
"event_id": 123,
"uuid": "abc123",
"state": "abc123",
"category": "xyz789",
"price": "abc123",
"reason": "abc123",
"invalid": true
}
}
}
tickets_block
Response
Returns a TicketBlock
Arguments
| Name | Description |
|---|---|
event_id - Int!
|
|
tickets - [TicketInput!]
|
Example
Query
mutation tickets_block(
$event_id: Int!,
$tickets: [TicketInput!]
) {
tickets_block(
event_id: $event_id,
tickets: $tickets
) {
expire
ticket_ids
}
}
Variables
{"event_id": 987, "tickets": [TicketInput]}
Response
{
"data": {
"tickets_block": {
"expire": "abc123",
"ticket_ids": [123]
}
}
}
tickets_block_free
tickets_sold
Response
Returns [TicketSold]
Example
Query
mutation tickets_sold(
$ticket_ids: [Int!],
$status: String!,
$order_id: Int
) {
tickets_sold(
ticket_ids: $ticket_ids,
status: $status,
order_id: $order_id
) {
ticket_id
ticket_uuid
timestamp
state
reason
}
}
Variables
{
"ticket_ids": [987],
"status": "abc123",
"order_id": 987
}
Response
{
"data": {
"tickets_sold": [
{
"ticket_id": 987,
"ticket_uuid": "xyz789",
"timestamp": 987,
"state": "abc123",
"reason": "abc123"
}
]
}
}
Types
Boolean
Description
The Boolean scalar type represents true or false.
Example
true
Category
Event
Description
Event Type
Fields
| Field Name | Description |
|---|---|
event_id - Int
|
unique eventID |
title - String
|
|
client_id - Int
|
|
location_id - Int
|
|
location - EventLocation
|
the event location |
subtitle - String
|
|
description - String
|
|
entry_info - String
|
|
more_info - String
|
|
start_date - String
|
format: "yyyy-mm-dd" |
start_time - String
|
format: "hh:mm:ss" |
end_date - String
|
format: "yyyy-mm-dd" |
end_time - String
|
format: "hh:mm:ss" |
advanced_sales_end_time - String
|
|
external_url - String
|
|
categories - [Category]
|
|
Arguments
|
|
images - [EventImage]
|
|
tickets - [EventTicketInfo]
|
|
tickets_sold - [TicketSold]
|
|
tickets_available - Int
|
|
tickets_contingent - Int
|
|
Example
{
"event_id": 987,
"title": "xyz789",
"client_id": 987,
"location_id": 123,
"location": EventLocation,
"subtitle": "abc123",
"description": "xyz789",
"entry_info": "xyz789",
"more_info": "xyz789",
"start_date": "abc123",
"start_time": "xyz789",
"end_date": "abc123",
"end_time": "xyz789",
"advanced_sales_end_time": "abc123",
"external_url": "xyz789",
"categories": [Category],
"images": [EventImage],
"tickets": [EventTicketInfo],
"tickets_sold": [TicketSold],
"tickets_available": 123,
"tickets_contingent": 987
}
EventImage
EventLocation
EventPagination
EventTicket
Example
{
"ticket_id": 123,
"event_id": 987,
"uuid": "abc123",
"state": "abc123",
"category": "xyz789",
"price": "abc123",
"reason": "abc123",
"invalid": false
}
EventTicketInfo
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
123.45
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
987
Order
Description
Order Type
Example
{
"order_id": 987,
"state": "xyz789",
"firstname": "xyz789",
"lastname": "xyz789",
"country": "xyz789",
"postal_code": "xyz789",
"city": "abc123",
"street": "abc123",
"email": "xyz789",
"phone": "abc123",
"timestamp": "xyz789",
"access_token": "abc123",
"tickets": [OrderTicket]
}
OrderInput
Example
{
"adyen_reference": "abc123",
"firstname": "abc123",
"lastname": "abc123",
"country": "abc123",
"postal_code": "abc123",
"city": "abc123",
"street": "xyz789",
"street_additional": "xyz789",
"email": "abc123",
"phone": "xyz789"
}
OrderTicket
Description
Order Ticket Type
Example
{
"order_ticket_id": 987,
"order_id": 123,
"ticket_id": 987,
"ticket": EventTicket,
"meta_price": 987.65,
"meta_category_id": 123.45
}
OrderTicketInput
Sort
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"abc123"