{"swagger":"2.0","info":{"version":"v1","title":"YourTicket organiser API","description":"\r\n## 🚀 Getting Started\r\n\r\nTo start using the YourTicket API, you need to authenticate and obtain a temporary access token.\r\n\r\n### 🔑 Step 1: Get your API Key\r\nLog in as an organiser on:\r\nhttps://www.yourticket.dk\r\n\r\nFrom there, generate your personal API key.\r\n\r\n---\r\n\r\n### 🔐 Step 2: Generate an Access Token\r\nUse your API key to request a token via:\r\n\r\nUse the **Authentication → GenerateToken** endpoint:\r\n\r\n<a href=\"#tag/Authentication/operation/Authentication_GenerateToken\">\r\nPOST /Authentication/GenerateToken\r\n</a>\r\n\r\n---\r\n\r\n### 📌 Step 3: Use the Token\r\nInclude the token in all subsequent requests using the Authorization header:\r\n\r\nAuthorization: Bearer {your_token}\r\n\r\n#### Example request\r\n\r\n<pre>\r\nPOST /Sales/Tickets\r\nHost: arrapi.yourticket.dk\r\nAuthorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\r\n</pre>\r\n\r\n---\r\n\r\n### ⏱ Token Lifetime\r\nThe generated token is valid for **5 minutes**.\r\n\r\nAfter expiration, you must generate a new token.\r\n\r\n---\r\n\r\n### 🧪 Testing\r\nYou can test the API and authenticate directly here:\r\n<a href=\"/swagger/ui/index\" target=\"_blank\">Open Swagger UI</a>\r\n\r\n---\r\n"},"host":"arrapi.yourticket.dk","schemes":["https"],"paths":{"/Authentication/GenerateToken":{"post":{"tags":["Authentication"],"summary":"GenerateToken","operationId":"Authentication_GenerateToken","consumes":[],"produces":["application/json"],"parameters":[{"name":"apiKey","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GenerateTokenResponse"}}}}},"/Sales/Tickets":{"post":{"tags":["Sales"],"summary":"Tickets","operationId":"Sales_Tickets","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/GetTicketsRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetTicketsResponse"}}}}}},"/Sales/CheckTicket":{"post":{"tags":["Sales"],"summary":"CheckTicket","operationId":"Sales_CheckTicket","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CheckTicketRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/CheckTicketResponse"}}}}},"/Sales/ScanTicket":{"post":{"tags":["Sales"],"summary":"ScanTicket","operationId":"Sales_ScanTicket","consumes":["application/json","application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CheckTicketRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ScanTicketResponse"}}}}}},"definitions":{"GenerateTokenResponse":{"type":"object","properties":{"token":{"description":"The generated token to use in subsequent requests.","type":"string"},"expiresIn":{"format":"int32","description":"The number of seconds until the token expires.","type":"integer"},"expiresAt":{"description":"The date and time when the token expires.","type":"string"}}},"GetTicketsRequest":{"type":"object","properties":{"fromDateTime":{"format":"date-time","type":"string"},"search":{"type":"string"},"eventId":{"format":"int32","type":"integer"}}},"GetTicketsResponse":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organiserId":{"format":"int32","description":"Only returned if API key has access to multiple organisers","type":"integer","readOnly":true},"ticketId":{"format":"int32","type":"integer","readOnly":true},"orderId":{"format":"int32","type":"integer","readOnly":true},"dateTime":{"format":"date-time","type":"string","readOnly":true},"ticketType":{"description":"Returns ticket, booking or add-on","type":"string","readOnly":true},"action":{"description":"returns add or remove","type":"string","readOnly":true},"eventId":{"format":"int32","type":"integer"},"description":{"type":"string"},"price":{"format":"double","type":"number"},"fee":{"format":"double","type":"number"},"ticketScanned":{"format":"date-time","type":"string","readOnly":true},"email":{"type":"string"},"phone":{"type":"string"},"fullName":{"type":"string","readOnly":true}}},"CheckTicketRequest":{"type":"object","properties":{"data":{"description":"QR Data or Ticket ID","type":"string"}}},"CheckTicketResponse":{"type":"object","properties":{"ticket":{"$ref":"#/definitions/CheckTicketResponseSingle"},"otherTickets":{"type":"array","items":{"$ref":"#/definitions/CheckTicketResponseSingle"}}}},"CheckTicketResponseSingle":{"type":"object","properties":{"id":{"format":"int32","type":"integer"},"organiserId":{"format":"int32","description":"Only returned if API key has access to multiple organisers","type":"integer","readOnly":true},"ticketName":{"type":"string","readOnly":true},"ticketType":{"description":"Returns ticket, booking or add-on","type":"string","readOnly":true},"price":{"format":"double","type":"number"},"eventName":{"type":"string"},"eventStart":{"format":"date-time","type":"string","readOnly":true},"scannedDateTime":{"format":"date-time","type":"string","readOnly":true}}},"ScanTicketResponse":{"type":"object","properties":{"success":{"type":"boolean"},"scannedDateTime":{"format":"date-time","type":"string"},"message":{"type":"string"},"errorCode":{"format":"int32","type":"integer"},"organiserId":{"format":"int32","description":"Only returned if API key has access to multiple organisers","type":"integer"}}}},"securityDefinitions":{"apiKey":{"type":"apiKey","description":"JWT Authorization header. Example: Bearer {token}","name":"Authorization","in":"header"}}}