Gelatin Partner API
List DJs, send booking requests, take the card hold and read status back. Plain HTTPS and JSON, with a typed TypeScript client.
Quickstart
Three commands, run in your project. They need Node.js 20 or later.
npx github:gelatinbookings/cli install # the Gelatin skill for your coding agent, and the partner SDK npx github:gelatinbookings/cli login # sign in with your Gelatin account, in the browser npx github:gelatinbookings/cli init # create your test app and write its key
Not using the CLI? Install the SDK yourself and pin it to a release tag: npm install github:gelatinbookings/gelatin-partner-sdk#v0.1.0-alpha.10.
init writes your base and test key to .env.local. Keep them on your server.
# .env.local — server only, never ship the key to the browser GELATIN_API_BASE=https://staging.gelatinbookings.com/v1/partners/<slug> GELATIN_API_KEY=gel_test_…
The journey in four calls
import { createPartnerClient } from "@gelatinbookings/partner-sdk/server"
const gelatin = createPartnerClient({
baseUrl: process.env.GELATIN_API_BASE,
apiKey: process.env.GELATIN_API_KEY,
})
// 1. who is free, in this city, on a night about two months out
const night = new Date(Date.now() + 60 * 86_400_000).toISOString().slice(0, 10)
const page = await gelatin.listDjs({ city: "Atlanta, GA", date: night, available: true })
if (!page.items.length) throw new Error("No DJ is free that night. Try another date or city.")
// 2. the organizer's request, one entry per DJ. Charges nothing.
const booking = await gelatin.submitBookingRequests({
external_event_id: "event_123",
organizer: { external_user_id: "user_7", email: "organizer@example.com" },
event: {
name: "Friday Social",
starts_at: `${night}T20:00:00-04:00`,
ends_at: `${night}T23:30:00-04:00`,
time_zone: "America/New_York",
venue_name: "The Warehouse",
},
requests: [{ dj_id: page.items[0].id, initial_offer: { currency: "usd", dj_fee_cents: 30000 } }],
authorization_placement: "gelatin_portal_handoff",
return_url: "http://localhost:3000/events/event_123", // a site on your app's list
})
// 3. send the organizer to place the card hold. One-use link, about 60 seconds.
const launch = await gelatin.createPortalLaunch({
external_event_id: "event_123",
external_user_id: "user_7",
resource: { kind: "request", id: booking.engagements[0].request_id },
return_url: "http://localhost:3000/events/event_123", // a site on your app's list
})
redirect(launch.launch_url)
// 4. when they are back, read status by your own event ID
const status = await gelatin.getEventBookings("event_123")
status.data.bookings[0].requests[0].status // "requested", then "confirmed" after the DJ accepts
Not on JavaScript? Every call is a plain HTTPS request with JSON. The repository includes an OpenAPI 3.1 file and a Next.js example you can click through against the sandbox.
Your first test booking
Your test key works against Gelatin’s test server, which has its own roster of fictional DJs and moves no real money. Your test bookings hold a test DJ only for your app, so other builders’ tests never use up yours. A test key never works on production.
- List DJs with
listDjs. Each one has anid. - Send an offer with
submitBookingRequests. Keep thebooking_idfromengagements[0]. - Place the hold. Create a portal launch, open its
launch_url, and pay with Stripe’s test card4242 4242 4242 4242, any future date and any CVC. - Make the test DJ answer from your project:
npx github:gelatinbookings/cli test answer <booking_id> accept
- Read the result with
getEventBookings. After an accept, the DJ readsconfirmed, usually within a minute.
The four test answers
accept— the test DJ accepts. Stripe captures the test hold and the booking readsconfirmed.pass— the test DJ passes. The booking is cancelled and the test hold is released.expire— the offer expires, as if the DJ never answered. Any test hold is released.counter --fee 150— the test DJ comes back with a new fee, and the organizer’s new total is shown. It’s the organizer’s turn: accept, decline or counter on the portal page. Add--note "Two-hour set"to send a note with it.
If something goes wrong
- “The DJ hasn’t been sent this offer yet.” (
409 not_sent) The card hold hasn’t landed. Place it on the portal page first, then answer. - “The sign-in on this computer has ended.” Run
npx github:gelatinbookings/cli loginagain. - A
return_urlis refused (400 invalid_request). Its site isn’t on your app’s list. Add it withnpx github:gelatinbookings/cli sites add <address>. - “This project has no Gelatin test key yet.” Run
npx github:gelatinbookings/cli initin the project first.
Authentication
https://staging.gelatinbookings.com/v1/partners/{partner}Sandbox — Stripe test mode, gel_test_ keysSend Authorization: Bearer gel_test_… in the sandbox and gel_live_… in production. A sandbox key only works against the sandbox and a live key only against production. Keys are hashed at rest, can be rolled with 24 hours of overlap, and can be revoked at once. Your live base comes with your live key.
Scopes
catalog:read— DJs, cities and genresrequests:write— booking requests, cancelling, the city waitlistlaunch:write— portal launches and payment sessionsbookings:read— booking status, alternates, the lineup and organizer standing
One key with all four covers both ways of taking payment. Calling outside your scopes returns 403 forbidden_scope.
Limits and retries
By default a key gets 600 reads and 60 writes a minute. Over that, the API answers 429 with Retry-After. Every write takes an Idempotency-Key: the same key with the same body returns the original result, and the same key with a different body returns 409. The SDK sets keys for you and retries network errors, 429 and 503 with the same key, up to three attempts in all.
Catalog
/djsid, name, city, tier, profile_page_url, image_url, draw, genres, published_rate_cents, available/citiesUS states and major cities, each with dj_count/genresThe genres your DJs list in a city, busiest first/city-waitlistSave an organizer’s sign-up for a city with no DJs yet. Needs consent: true./djs filters by city, date or a set window, available, genre and budget, and pages with cursor. With a date, every DJ carries available for that night. Availability is advisory: we check again when you send the request.
Tiers come back as verified, top_performer, resident or city_pillar. draw is null when a DJ has no confirmed nights yet, and a null rate means show no price at all. Contact details are never in a response.
Bookings
/booking-requestsOne booking with one or more DJ requests. Charges nothing./events/{external_event_id}/dj-bookings/{request_id}/alternatesUp to five DJs open that night, after a DJ passes/organizers/{community_ref}/standingMake a Deal onlyA request needs your external_event_id and the organizer’s external_user_id. We make the booking and request IDs. A DJ who can’t take the night answers 409 dj_unavailable and nothing in the submission is saved. To add DJs later, send another request for the same event.
Add payment: "event_checkout" to open one checkout for every DJ on the event in the same call. It needs launch:write as well, and saved cards switched on for your app.
Every request is Confirm & Book by default: the organizer places a card hold, and we charge it when the DJ accepts. Make a Deal, where the organizer pays the DJ directly, is off until we turn it on for your integration.
Payment
/portal-launchesA one-use link to our co-branded booking page/payment-sessionsclient_secret and publishable_key for Stripe’s checkout on your pageWe always take the payment. You choose where the organizer types their card, with authorization_placement on the request.
- Light —
gelatin_portal_handoff. Create a portal launch when the organizer clicks, redirect at once, and they come back to yourreturn_url. One server call and a redirect. - Full —
partner_event_flow. Create a payment session on your server and mount Stripe’s embedded checkout in the organizer’s browser. One checkout per DJ. A DJ’s counteroffer still goes to our page: the call answers409 portal_required.
Finishing the checkout doesn’t place the hold on its own. We record it when Stripe confirms, usually within seconds, so show “Confirming…” and read status until the DJ moves from authorization_required to requested. Register your return_url origins yourself with npx github:gelatinbookings/cli sites add <address>; init registers the first one.
Status
/events/{external_event_id}/dj-bookingsEach DJ’s status for your event/events/{external_event_id}/lineupPublic-safe: names, photos, profile links, set times. No prices.Status is pull-only. We never call your server. Read it when the organizer comes back, when they open the event, or on a schedule. Send If-None-Match with the last ETag to skip unchanged reads.
authorization_required → requested → confirmed
↘ negotiating · reauthorization_required
↘ declined · expired · cancelled
The lineup is safe to render on a public event page. A confirmed DJ shows their set time and sound when known; a pending one shows neither.
Cancelling
/bookings/{booking_id}/cancel/previewWhat cancelling would do now, with the rule in plain words/bookings/{booking_id}/cancelApplies the same plan. A resend returns the same answer.Show the preview to the organizer before they confirm. Before the DJ accepts, cancelling is free and the hold is released. After the charge: 7 or more days out, everything comes back except card processing; between 48 hours and 7 days, the DJ keeps half their fee; inside 48 hours, the DJ keeps all of it. Once the event starts, cancelling answers 409 not_cancellable.
Plans and usage
Every app starts on Free. Pick or change a plan in your developer dashboard; a change mid-month is prorated.
- Free, $0 a month — 10,000 requests and 5 bookings a month, one site, and “Powered by Gelatin” shows
- Launch, $29 a month — 100,000 requests and 100 bookings a month, one site, the badge optional
- Grow, $99 a month — 1,000,000 requests and 1,000 bookings a month, one site, the badge optional
Usage counts from the 1st of each month, in UTC. On Free, searches stop at the allowance until the month turns. On Launch and Grow, going over never stops anything and costs nothing extra. Going over your bookings never blocks a booking on any plan.
Every response says where you stand:
X-Gelatin-Plan: free X-Gelatin-Usage-Requests: 9420/10000 X-Gelatin-Usage-Bookings: 3/5
Errors
Every error carries a safe code and a request ID to quote to support.
400 invalid_request— the input failed validation, including areturn_urloutside your registered sites400 event_ended— the event’sends_athas passed; nothing was created401 unauthorized— the key is wrong, revoked, or from the other environment403 forbidden_scope— the key lacks the scope for this call403 organizer_owes— the organizer’s community owes a DJ; nothing more can be booked until it’s settled409 dj_unavailable— a DJ can’t take the night; nothing was saved409 portal_required— pay this DJ on our page through a portal launch409 offer_changed— the offer changed, was paid or expired; read status409 conflict— the request conflicts with an earlier submission409 idempotency_conflict— theIdempotency-Keywas used with a different body409 not_your_turn— the other side has the last offer; wait for their answer409 counter_limit— no more counteroffers on this booking; accept, decline or let it expire429 rate_limited— wait forRetry-After429 plan_limit_reached— a Free app has used its searches for the month; bookings still work, and searches open again when the month turns or on a paid plan503 temporarily_unavailable— try again shortly with the sameIdempotency-Key
Going live
Test keys are yours, from init. Build against the test roster first, with Stripe test cards, until the whole journey works: list, request, hold, status and cancel.
When it does, ask for a live key from your app’s page in the developer dashboard. You choose what the key may do, list your live sites, and sign the Developer Agreement in the same step.
A person at Gelatin reviews each request. Once it’s approved, you take the key in the dashboard. It’s shown once, so store it right away.
Get help
Stuck? Ask in the Gelatin Community group on WhatsApp. Ced answers within one business day.
Prefer not to share a phone number? Write to ced@gelatinbookings.com instead, with the same one business day for an answer.
Bring your app’s slug and the request ID from the error. Never post an API key: we never ask for one and never send one.
Found a security problem? Tell us privately at ced@gelatinbookings.com, not in the group.