The partner programme

One private key for you, one credential per property, and who decides what.

8 min read

The programme is for integrations that serve several properties: revenue management systems, CRMs, POS, self check-in kiosks, lock systems and other platforms. It exists because the shape of the Public API — one key, one property, issued by the hotel — stops working once you have forty hotels and forty keys with nothing tying them together.

How it fits together

  1. 1You join the programmeWe register you and mint your keypair. The private half is handed over once and never stored — it is what you decrypt every response with, from every property, for as long as you are in the programme.
  2. 2A ceiling is setThe endpoints you may ever be granted, agreed with us when you join. No connection can go outside it — which is also what lets a hotel say yes to you without reading a permissions list.
  3. 3Each property switches you onWhen a property wants to work with you, its admin switches your integration on in its Marketplace, and that connects you with everything in your ceiling. That issues a credential for that property alone, and switching it off revokes it. Forty properties means forty credentials, and the one that leaks opens exactly one of them. If you asked for it when joining, the property's id with you — our pcode, or the number it types when switching you on — reaches you with the credential as accountRef, so you know which of your customers each pcode is; see below. Hotelgest can also connect, pause or revoke a property by hand.

One private key, many credentials

The two halves do different jobs. The credential in x-api-key says which property you are asking about; your private key opens what comes back. You hold one private key and as many credentials as properties. The keyId in every envelope tells you which private half to use, so keeping two installed during a key change costs you no downtime.

Server to server, without exception

Every call to the partner API leaves your backend. Never a mobile app, a browser, a till, a tablet or any other device — yours or the property’s. The credential of each property and the private key that opens the responses live on your servers and only there: a key in an app or on a device is a key anyone holding it can copy.

Your apps talk to your backend, not to us

If what you sell runs on a phone, a kiosk or a device in the hotel, that device calls your servers and your servers call the API. It is a condition of joining the programme, and it applies to every partner.

Which of your customers a property is

A credential tells you the pcode, which means nothing on your platform. If you need the id you know the property by, it reaches you with the credential as accountRef, in one of two ways agreed when you join. Neither is required.

WayWhat the property doesWhat you give us
Our pcode (nothing to type)Nothing beyond switching your integration on: accountRef is its pcode, as a JSON number.Nothing: you know your customers by our pcode.
An id the property types when activating your integration in its Marketplace — a whole numberTypes its customer number or hotel code with you in your integration's form. Without it, the integration cannot be switched on.Which id it is, so the form asks for it in those words. It is a positive whole number and reaches you as a JSON number.

A typed id only says which customer the property claims to be. Answer 4xx to a delivery whose accountRef is not one of your customers: the integration is not switched on, and the property sees why and can correct the id.

What you can call

Everything in the Public API, plus the endpoints reserved for the programme — the ones a property’s own key is refused on. Which of them you may call is your ceiling, agreed with us when you join, and every connection carries all of it. An endpoint outside it answers 403 and names itself, so you always know what to ask us for. When we widen it, every connection you already hold gets the new endpoints on the same key: there is no new credential to wait for.

The endpoint you have to expose

Joining the programme asks one thing of your side: an HTTPS endpoint of your own where we POST a credential every time a property switches your integration on. That is how your integration learns which key belongs to which property — nobody copies a key out of a screen and pastes it into a ticket, and no property waits for somebody to do it.

json
1POST https://your-domain.example/hotelgest/credentials
2Content-Type: application/json
3X-Hotelgest-Signature: sha256=9f2c41a08b7e5d3c62f1a4b8...
4
5{
6 "pcode": 1234,
7 "connectionId": "68cac30b93a55b1138a46882",
8 "accountRef": 4512,
9 "apiKey": "2f1a4b8c...-9f2c41a08b7e5d3c62f1a4b8",
10 "issuedAt": "2026-10-01T09:14:22.104Z"
11}
Store apiKey against pcode: that is the credential to send in x-api-key for that property, and no other. accountRef is the property's id with you, our pcode or exactly as the property typed it — use it to match the pcode to your customer; it is only present when you asked for it. connectionId is the stable name of the relationship — keep it to quote one connection to us without spelling out which hotel; it stays the same when the credential is sent again. What the key may call is not in here on purpose: the selection can change afterwards, so a copy you stored would go quietly out of date. The 403 tells you, and names the endpoint.

Verify the signature before you store anything

The URL is yours and somebody could guess it, and this request carries a live credential — so a forged one would have you sending your requests with an attacker’s key, to an endpoint of theirs. X-Hotelgest-Signature is sha256= followed by the HMAC-SHA256 of the RAW body with your signing secret. Compare it in constant time, over the bytes you received and not over a re-serialised object.
SecretWhere it comes fromWhat it is for
Your signing secret (whsec_…)We generate it when we register your endpoint and pass it to you then, once. Ask for a new one and the previous stops working immediately.Verifying that a delivery is ours. We hold a copy — signing needs it.
Your private key (.pem)Downloaded once, when your keys are issued. We keep only the public half, so it cannot be reissued to you — lost means rotating.Decrypting the responses the API sends you. Nothing to do with the signature.

Two different secrets, in two different directions: never use the PEM to verify a signature — it is not what we sign with, and it does not belong in the server that receives deliveries.

javascript
1import express from 'express'
2import { createHmac, timingSafeEqual } from 'crypto'
3
4// The secret we handed you when you registered this endpoint. Read it from your environment.
5const SECRET = process.env.HOTELGEST_DELIVERY_SECRET
6
7// express.json() parses the body and throws the original bytes away, and the signature is over
8// those bytes: a re-serialised object is not the same string, so it will never match.
9app.post('/hotelgest/credentials', express.raw({ type: 'application/json' }), (req, res) => {
10 const raw = req.body // the bytes as they arrived, a Buffer
11 const header = req.get('X-Hotelgest-Signature') // sha256=...
12
13 const expected = `sha256=${createHmac('sha256', SECRET).update(raw).digest('hex')}`
14 const received = Buffer.from(header ?? '')
15 const ours = Buffer.from(expected)
16 if (received.length !== ours.length || !timingSafeEqual(received, ours)) {
17 return res.sendStatus(401)
18 }
19
20 // Only now is it safe to read: everything above ran on bytes nobody had vouched for yet.
21 const { pcode, connectionId, accountRef, apiKey, issuedAt } = JSON.parse(raw.toString('utf8'))
22
23 // When you ask properties for their id with you: refuse one you do not recognise, with a 4xx.
24 // The property sees the delivery failed and can correct the id and send it again.
25 if (accountRef !== undefined && !findCustomer(accountRef)) return res.sendStatus(404)
26
27 saveCredential({ pcode, connectionId, accountRef, apiKey, issuedAt })
28 res.sendStatus(200)
29})
Answer 2xx once you have stored it. Answer 4xx when the accountRef is not one of your customers: the delivery is recorded as failed, we see it at once, and once the id is corrected the credential is sent again — a new key for the same connection and connectionId, which replaces the one you may have. Anything else that is not 2xx is also a failed delivery: no key is stored, the integration stays off, and the property sees why and can try again.
RequirementWhy
HTTPS, with a valid certificateThe body carries a credential in the clear. Plain HTTP is refused when you register the endpoint, not at delivery time.
A publicly resolvable hostAn address that resolves to a private range is refused: we will not post a credential to something inside somebody’s network.
Not open to the internetTell us a header to send — Authorization: Bearer …, X-Api-Key: …, whichever you already use — and reject anything arriving without it. The signature proves a body is ours; the header is what stops a stranger being answered at all. If you would rather protect it another way, that works too: the requirement is that it is not open, not that it is ours.
Keyed by pcodeA credential can be reissued for a property you already have — a failed delivery was sent again, or the integration was switched off and on. Store it against the pcode and let the new one replace the old, rather than ending up with two keys for the same hotel and no way to tell which works: when a delivery is sent again the previous key stops working.

When access stops

What happenedWhat you seeWhat to do
Hotelgest paused a connection401 on that property onlyNothing on your side: resuming gives back the SAME credential, so there is nothing to redeploy.
A connection was revoked401 on that property onlyThe property switched your integration off in its Marketplace, or Hotelgest revoked it. That credential is gone for good; switching it on again issues a new one under the same connectionId.
The programme suspended you401 everywhere at onceTalk to us. Your connections are kept, so resuming does not mean connecting every property again.

Ask to join

The conditions for joining are set for each integration: depending on the case, we ask for a minimum number of properties committed to using it and for both account-management teams to work together. We sign an NDA when talks start, and the programme contract before production credentials are issued. Access is through a partner licence, which may or may not have a cost depending on the conditions agreed.

Tell us what you integrate and which properties use it or are committed to it, and we reply by email: approved, with the endpoints of your ceiling; rejected; or asking you first for the committed properties. Sending this activates nothing: it starts a conversation, and the ceiling and the keys come out of it.

Holding the private key grants nothing

It only opens envelopes. What you may call, and about which property, is decided before any data is generated — by your ceiling and by what each connection was given. Losing your private key does not widen anybody’s access, and neither does holding somebody else’s.