-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pretix integration within Discord app #3
Comments
@DhanshreeA I see that the |
Hey @Kislovskiy sorry for not getting to this sooner. The Items API lists the visible name for an item which can help us identify the known ticket types. |
ah, cool. Thank you! I build a prototype using the check-in list. I'll open a PR soon. You could take a look 🤓 |
@Kislovskiy So, when you query the Orders API with an order code, within "id": 21385480,
"order": "RCZN9",
"positionid": 1,
"item": 339045,
"variation": 163263, And when you query the Items API with the item ID 339045, you see a list of variations as a list: {
"id": 339045,
"category": null,
"name": {
"en": "Presenter"
},
......,
"variations": [
{
"id": 163263,
"value": {
"en": "Speaker"
},
"active": true,
"description": {
"en": "Speaker Ticket - Access to three days of the conference: Wednesday-Friday (19-21 July 2023) + Sprints Weekend.<br>\r\nThank you for choosing EuroPython to share your time and experience with the community. We hope that you have a fantastic time presenting at the conference.<br>\r\nThe ticket is free. If you'd like to support our Finaid Programme - consider buying a ticket. Thanks! :)"
},
"position": 0, wherein, value gives us the name of the ticket (so Presenter here), and if you look at the variations id, it tells you which type of presenter this person is (in this case, a Speaker... there are other variations it would appear, ie Tutorial presenter, Keynote presenter etc) |
Hey, @DhanshreeA. Exactly, thank you for sharing this. I'll open a PR soon, however I found that it's easier to call e.g.
I'll share the Postman collection |
Basic Pretix integration was implemented in 711eeb2. Thanks to everyone who was involved in it! 🎉 |
Authenticating Discord bot with Pretix
We can authenticate the app with Pretix with a simple API token (unclear about which permissions are required at this point)
Validating a ticket
We can use the Orders API to validate if a user holds a paid ticket, and the type of ticket they hold (if needed). If the status of the Order is
p
(Paid) then we can assume that the user holds a valid ticket. A caveat here would arise if we start charging cancellation fees but I don't think we do that. (Refer to the state diagram here)Fetching an Order
We can fetch individual orders using either the order code or filtering by order creation email/company name/attendee email
Determining Ticket type:
The Order object contains information about individual products contained within the it as Order Position Resource. The
Item
field within this object should help us identify the ticket type.The text was updated successfully, but these errors were encountered: