Webhooks and the change feed
You can stay up to date in two ways, and you may use both:
| Way | How | Good for |
|---|---|---|
| Webhooks | GoCamping sends a POST to your HTTPS address when something changes |
Fast updates, few calls |
| Change feed | You call GET /changes every 1 to 5 minutes |
Channels that prefer to poll, and as a safety net if a webhook is lost |
Both carry exactly the same events.
Events
Section titled “Events”Events are notifications, not full copies. They tell you what changed; you fetch the fresh data from the API. That way an event that arrives late or twice never overwrites newer data.
| Event | Sent when | data |
|---|---|---|
property.connected |
A property switched your channel on | connection as in GET /properties |
property.updated |
Content, images, facilities, rules or cancellation terms changed | fields: list of changed areas |
property.connection_updated |
Unit types for you, unit selection or payment setting changed, or the connection was paused or resumed | connection |
property.disconnected |
The property switched your channel off | — |
unit_types.updated |
A unit type was added, changed or removed | unit_type_ids |
map.updated |
The site map has a new revision |
revision |
availability.updated |
Availability or stay rules changed | unit_type_ids, start, end |
rates.updated |
Indicative rates changed | unit_type_ids, start, end |
booking.modified |
The property changed one of your bookings (dates, unit, guests, price) | booking_id, version |
booking.cancelled |
The property cancelled one of your bookings | booking_id, reason |
booking.payment_updated |
The property registered a payment, a refund or your payout on one of your bookings | booking_id, balance, and paid when the property collects, or paid_to_channel, owed_by_channel and paid_out_by_channel when you collect |
booking.status_updated |
Check-in, check-out or no-show | booking_id, status |
You do not get events for changes you made yourself through the API. New event types may be added in v1: ignore types you do not know.
The message
Section titled “The message”POST /webhooks/gocamping HTTP/1.1Host: channel.exampleContent-Type: application/jsonUser-Agent: GoCamping-Webhooks/1X-GoCamping-Event: booking.modifiedX-GoCamping-Delivery: dlv_01JEK4…X-GoCamping-Signature: t=1796311800,v1=5f0c8a…e91b{ "id": "evt_01JEK3Z8Q4", "type": "booking.modified", "api_version": "v1", "created_at": "2026-12-03T15:10:00Z", "environment": "live", "property_id": "prop_8f2k1q", "sequence": 18240, "data": { "booking_id": "bk_7q4k2m9x", "version": 2 }}idis unique per event. You may receive the same event more than once: skip ids you have already handled.sequencegoes up per property. Events can arrive out of order; usesequence(and the booking’sversion) to ignore older news.
Checking the signature
Section titled “Checking the signature”Every webhook is signed with your webhook secret (one per environment, shown once when it is created).
X-GoCamping-Signature: t=<unix seconds>,v1=<hex>v1 = HMAC-SHA256(secret, t + "." + raw request body)- Read the raw body as bytes, before parsing JSON.
- Compute the HMAC and compare it with
v1in constant time. - Reject the message if
tis more than 300 seconds away from your clock. - During a secret rotation the header can carry two signatures (
v1=…,v1=…). Accept the message if one of them matches. - The secret is used as it is, as UTF-8 text.
- If the check fails, answer
401and do nothing.
Example in TypeScript (Node.js):
import { createHmac, timingSafeEqual } from "node:crypto";
export function isValidGoCampingSignature(rawBody: Buffer, header: string, secret: string): boolean { const parts = header.split(",").map((p) => p.trim().split("=")); const t = parts.find(([k]) => k === "t")?.[1]; const signatures = parts.filter(([k]) => k === "v1").map(([, v]) => v); const ts = Number(t); if (!Number.isInteger(ts) || signatures.length === 0) return false; if (Math.abs(Date.now() / 1000 - ts) > 300) return false; const expected = createHmac("sha256", secret).update(`${t}.`).update(rawBody).digest(); return signatures.some((s) => { const given = Buffer.from(s, "hex"); return given.length === expected.length && timingSafeEqual(given, expected); });}This is the same signature scheme as the GoCamping door for booking systems.
Answering
Section titled “Answering”- Answer with any
2xxwithin 5 seconds. Do the real work afterwards, for example in a queue. - Anything else (another status, a time-out, a TLS error) counts as a failure.
Retries
Section titled “Retries”| Attempt | After |
|---|---|
| 1 | At once |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 15 minutes |
| 5 | 1 hour |
| 6 | 6 hours |
| 7 | 24 hours |
After the 7th failure the delivery is marked as failed. The property sees it in the channel log, and GoCamping is told. The event is still in the change feed for 30 days. If more than 100 deliveries fail in a row, webhooks to you are paused and we contact you. Fetch the change feed to catch up.
Your webhook address
Section titled “Your webhook address”- One HTTPS address per environment, given to GoCamping when you start (self-service may come later).
- The address must have a valid certificate. Plain HTTP and private IP addresses are refused.
- Do not put secrets in the address. Use the signature instead.