pretix / pretix

Ticket shop application for conferences, festivals, concerts, tech events, shows, exhibitions, workshops, barcamps, etc.
https://pretix.eu
Other
1.82k stars 456 forks source link

Question: Getting quotas affected by order via API #1381

Open rimi-itk opened 5 years ago

rimi-itk commented 5 years ago

Hi,

We using a pretix webhook to send out emails to organizers when a new order is placed. When the webhook is called, we get the order via the pretix API and then we have to get the affected quotas to tell the organizer how many tickets are left.

I may be missing something, but I cannot find an obvious way to get the quota(s) affected by an order.

Our events all have sub-events, and the only way I can find to get the affected quotas is to get all quotas on the sub-events from the order and then search for the quotas that apply to the purchased products. Is this the (best) way to do it?

Best regards, Mikkel

raphaelm commented 5 years ago

There currently is not a better way. Do you have a good idea how a better way could look like?