At Cronofy we expose opaque IDs from our API, a strategy we gratuitously copied from Stripe.
A what ID?
What is an opaque ID? It’s an ID that rather than just being an unique identifier includes information about what the ID represents.
For example, rather than just returning a profile’s ID as 12345, we return it as pro_12345. Similarly for a calendar belonging to that profile, rather than returning 67890 we return cal_12345_67890.
We do this because for a few bytes of overhead we think it makes our API easier to learn. An ID in isolation be it in documentation, in a response, or stored in a database is much more meaningful.
Improved understanding
Opaque IDs make it easier to understand and translate examples to your application. When the example using a cal_ ID, it’s obvious you should be providing one of your own cal_ IDs in the same place.
It makes it easier for us to spot errors in support cases as we don’t have to lookup what each ID refers in order to fully understand an example request.
This saves time for us as the provider and for you as the consumer, it’s a win-win situation.
Coupling related values
Composite opaque IDs like cal_12345_67890 also make things simpler for the consumer as rather than providing two pieces of data they pass one. Rather than a URL structure like:
/v1/profiles/{PROFILE_ID}/calendars/{CALENDAR_ID}/events
We have:
/v1/calendars/{CALENDAR_ID}/events
This is because the profile information is embedded within the ID. That simplification again surfaces for more efficient support as it’s much easier to copy and paste one value into a search dialog than two. A customer will always provide a composite ID as one value, whereas if it is two separate pieces of information they may well be spread out in their correspondence.
Hopefully this is an interesting peek behind the decisions we’ve made at Cronofy. If you have any questions about our API or suggestions about how we can improve it, please get in touch with us via support@cronofy.com.
Managing Transparency and Privacy in Recruitment: Beyond Data Protection
Building a trustworthy employer brand requires being open with candidates, yet maintaining that trust while safeguarding sensitive information is crucial. Are you confident that your current process truly protects privacy without sacrificing transparency? Read on to find out what you might be missing.
How To Streamline your Hiring with Automated Interview Scheduling
Curious about how to enhance candidate experience, reduce time-to-hire, and improve overall recruitment efficiency? We bring insights on top areas to optimize, backed up by data on what candidates want from hiring in 2024.
The 6-Step Guide to Identifying Recruitment Gaps
Ever feel like your hiring process is more of a guessing game than a strategy? You’re not alone. We’ve gathered insights from top recruitment leaders to help you uncover hidden gaps and turn your recruitment process into a well-oiled machine.