Authentication
Partner account
Section titled “Partner account”Each channel has one partner account with GoCamping. It is created when the partner agreement is signed. The account has:
- a test key for the test environment and, after certification, a live key for production;
- a webhook secret per environment (see Webhooks);
- a list of connections: the properties that have switched the channel on.
API keys
Section titled “API keys”Send the key in the Authorization header on every request:
GET /channel/v1/properties HTTP/1.1Host: api.gocamping.dkAuthorization: Bearer gcc_live_7Hq2…redacted…Accept: application/json| Rule | Detail |
|---|---|
| Prefix | gcc_test_ for test, gcc_live_ for production. A test key never works in production, and the other way round |
| Where | Only in the Authorization header. Never in the URL, a query string or a request body. A request with a key in the URL is rejected and the key is revoked |
| Shown once | GoCamping shows a new key once. We store only a hash of it and can never show it again |
| Two at a time | A partner account can have two active keys per environment, so you can rotate without downtime: create the new key, deploy it, then revoke the old one |
| Revoke | If a key leaks, tell GoCamping at once. A revoked key stops working within one minute |
| Server only | Call the API from your servers. Never put a key in a browser, an app or anything a guest can read |
Property access
Section titled “Property access”A key gives access only to properties that have a connection to your channel.
- The property’s owner opens Apps › Booking channels in GoCamping, finds your channel and switches it on. Only the owner can do this.
- The owner chooses which unit types to sell through you, whether guests may pick a unit on the map, and who collects the payment (see Payments).
- GoCamping creates the connection and sends you the webhook
property.connected. The property now appears inGET /properties.
| Connection status | Meaning | What you can do |
|---|---|---|
active |
Switched on | Everything |
paused |
The property has paused sales through you for a while | Read content and your existing bookings, modify and cancel them. New quotes and bookings get 403 property_not_connected |
disconnected |
Switched off | Read and cancel your existing bookings only. The property disappears from GET /properties |
A request for a property whose connection to you is paused or disconnected returns 403 with code
property_not_connected (GC110), except for the reads and cancellations allowed in the table above. Every other
property (one that does not exist, or one you have never been connected to) returns 404 not_found (GC100), so
nobody can guess which properties exist. After disconnected you still get booking.* webhooks for your existing
bookings.
What a key can and cannot see
Section titled “What a key can and cannot see”| Can | Cannot |
|---|---|
| Content, unit types, units, the map, guest types and add-ons of connected properties | Other properties |
| Availability and indicative rates of the unit types the property sells through you | Unit types the property has not chosen for you |
| Exact quotes | Internal price rules, discounts not offered to you, costs |
| Bookings created by your channel | Bookings from the property’s website, other channels, staff or walk-ins |
| The guest data you sent with your own bookings | The property’s guest register |
Request headers
Section titled “Request headers”| Header | Required | Purpose |
|---|---|---|
Authorization: Bearer <key> |
Yes | Your key |
Content-Type: application/json |
On POST |
Body format |
Idempotency-Key: <uuid> |
On every POST that writes |
Safe retries, see Endpoints |
Accept-Language: en |
No | Preferred language for texts |
X-Correlation-Id: <string> |
No | Your own trace id, up to 64 characters. Logged and echoed |
v1 uses API keys. OAuth 2.0 (client credentials, or a “Connect with GoCamping” button for properties) can be added later without breaking v1, if partners ask for it.