New QR-Code Format, need help

Dear all,

I created a software to scan the Ticket QR code and print out a badge with a label printer. Unfortunately, on our indico server (where we don’t have admin privileges), the software has been updated to the newest version with a new QR Code format.

Up to now, I scanned the QR code, got the registration id and fetched all data needed by using the servers URL with a “/regnumber”. This JSON could then be used to proceed with the printing.

Unfortunately, now only the checkin_secret is part of the QR code. Is there any possibility to directly access a registrant using the checkin_secret, or do I have to fetch ALL registrants and look for the respective secret (and then link it to the registrant ID)?

So: How can I use the checkin secret without downloading the whole data of all registrants?

Thank you very much, best
Christian

/api/checkin/ticket/<uuid> is the endpoint to call.

To convert the compact string in the QR code to the UUID the API expects, have a look at the relevant code in the checkin app.

For the sake of completeness, here are all the APIs used by the checkin app:

/api/checkin/event/<int:event_id>/
/api/checkin/event/<int:event_id>/forms/
/api/checkin/event/<int:event_id>/forms/<int:reg_form_id>/
/api/checkin/event/<int:event_id>/forms/<int:reg_form_id>/registrations/
/api/checkin/event/<int:event_id>/forms/<int:reg_form_id>/registrations/<int:registration_id>
/api/checkin/ticket/<uuid:ticket_uuid>

But the API that takes the UUID should already give you everything you could ever want to know about the registration - these are the fields it returns (much more than the old API contained):

fields = ('id', 'regform_id', 'event_id', 'full_name', 'email', 'state', 'checked_in', 'checked_in_dt',
          'checkin_secret', 'is_paid', 'price', 'payment_date', 'currency', 'formatted_price', 'tags',
          'occupied_slots', 'registration_date', 'registration_data')

That means the UUID is the checkin-secret? I can therefore call the API above with the checkin-secret used as UUID?

Yes, checkin_secret and ticket_uuid are the same thing.

OK, thank you! That means I simply use another endpoint to get all data … would you mind giving me an example of a correctly formatted uuid? The bytes-ping-pong with adding slashes is a bit hard to read in the code … I have a uuid with the form 097cd1fc-4720-43b9-ad07-d01c030b2891 which I added (https://server.de/api/checkin/ticket/097cd1fc-4720-43b9-ad07-d01c030b2891 , but get the response

{
    "error": {
        "error_uuid": "66b8dbd6-1e5d-45a8-813c-65ac37c77887",
        "message": "The page you are looking for doesn't exist.",
        "title": "Not Found"
    }
}

in postman…

From where did you get that UUID? Are you sure that it’s the checkin secret adn not the UUID from the participant link?

Tip: You can also open https://yourindicoserver/api/checkin/event/XXX/forms/XXX/registrations/ etc. in your browser (while you’re logged in to Indico) and then get the full list of registrations including the checkin secrets.

Thank you for the help! At least, it works for 50% now ;). With the URLs you provided, I could indeed access the registrations / checkin_secrets, which are the same as obtained in the old version using /events/XXX/registrants endpoint

However, I have two registration forms. While I can get the checkin_secrets for every form by the URL

(https://yourindicoserver/api/checkin/event/XXX/forms/XXX/registrations/)

I can only get the registration details for persons of the first registration form. I insert the above URL into postman, copy one checkin_secret to the clipboard, paste it into another window of postman with the endpoint

checkin/ticket/XXXX

Everything works well. If I repeat it for my second registration form, it returns

{
    "error": {
        "error_uuid": "0ada7245-54fd-4c62-a137-724bde8a0e48",
        "message": "KeyError: 'htmlName'",
        "title": "Something went wrong"
    }
}

Anything I am missing here? Status Code is 500…
Thank you, best
Christian

That’s a known bug when the registration form contains static labels. It will be fixed in v3.3.3 (which will be released no later than early next week).

If you manage the Indico instance you can apply this patch in the meantime: Do not include labels in registration details by tomasr8 · Pull Request #6326 · indico/indico · GitHub