Use the event ID from the Partner API to dynamically render embedded checkouts, cards, or full pages on your site.
Once you've retrieved events via the Partner Events API, you can dynamically embed checkout components into your website using our pre-built HTML snippets.
All embeds rely on a single key piece of data: the eventId
, which corresponds to the _id
of the event returned from the API.
eventId
Use the Partner Events API to retrieve your list of events:
GET <https://3common.com/partner/events?referral_code=yourcode>
Each item in the data[]
array will include an internal _id
:
{
"data": [
{
"_id": "68757e5a4f5eacefd8ac9488",
"name": "Sunset Yoga",
...
}
]
}
Extract the _id
value for the event you want to embed.
You can embed the event in three ways:
This renders a button that opens a checkout dialog when clicked.
<div id="threeCommononButton"
eventId="YOUR_EVENT_ID"
type="button"
linkToEvent="false">
</div>
<div id="threeCommononDialog"></div>
<script src="<https://3common.com/scripts/embed/event_checkout_page.js>"></script>