Skip to content
DRAFT 0.2 · 3 December 2026 · Nothing is built yet. Subject to change.

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 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.

POST /webhooks/gocamping HTTP/1.1
Host: channel.example
Content-Type: application/json
User-Agent: GoCamping-Webhooks/1
X-GoCamping-Event: booking.modified
X-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 }
}
  • id is unique per event. You may receive the same event more than once: skip ids you have already handled.
  • sequence goes up per property. Events can arrive out of order; use sequence (and the booking’s version) to ignore older news.

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)
  1. Read the raw body as bytes, before parsing JSON.
  2. Compute the HMAC and compare it with v1 in constant time.
  3. Reject the message if t is more than 300 seconds away from your clock.
  4. During a secret rotation the header can carry two signatures (v1=…,v1=…). Accept the message if one of them matches.
  5. The secret is used as it is, as UTF-8 text.
  6. If the check fails, answer 401 and 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.

  • Answer with any 2xx within 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.
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.

  • 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.