TG Guest Talk
Docs

Error codes.

Every error the Talk with Guest API can return, the HTTP status it comes back on, the platform-specific TG-xxxx code inside the envelope and the remediation that will actually clear it. Bookmark this page while you build.

Error envelope

Every non-2xx response from the Guest Talk platform carries the same JSON envelope. The envelope has a stable code, a human-readable message, a request_id that ties the response to the underlying platform log line, and — where relevant — a details array with per-field information. The code is the value your code should branch on; the message is the value you should surface to a human debugging your integration.

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json

{
  "code": "TG-2004",
  "message": "arrival must be strictly before departure",
  "request_id": "req_01HYQ8XN2K9AB4CD",
  "details": [
    { "field": "arrival", "issue": "2026-08-06 is not before departure 2026-08-06" },
    { "field": "departure", "issue": "must be at least one day after arrival" }
  ]
}

Codes are stable across versions within a major API version. Talkguest never repurposes a code for a different meaning; if a new failure mode emerges we mint a new code. This means a client that parses on code instead of message is safe against copywriting changes on our side.

HTTP status conventions

StatusMeaning
200Read succeeded; body carries the resource
201Resource created; body carries the new resource with its id
204Write accepted; no body
400Malformed request — JSON parse error, missing content type, unknown field with strict parsing
401Missing or invalid Bearer token
403Token is valid but lacks permission for the resource or the action
404Resource does not exist, or exists in a tenant the token cannot see
409Conflict — overbooking, rate collision, concurrent update losing the compare-and-swap
422Validation failure — the payload is well-formed but semantically invalid
429Rate limit tripped — see the rate limits page
500Unhandled server error; safe to retry with backoff
503Platform degraded or in maintenance; obey Retry-After

Authentication errors (TG-1xxx)

CodeHTTPMeaningRemediation
TG-1001401Bearer token missing or malformedSend Authorization: Bearer <token> with a token issued from Settings → Integrations → API tokens.
TG-1002401Token revoked or rotated outIssue a fresh token; a revoked token is never re-activated.
TG-1003403Token lacks the permission for the resource or the actionRegenerate the token with the required scope, or ask the tenant admin to grant the scope on the existing token.

Auth errors are the first ones every new integration hits. If you are seeing a TG-1001, check the header name spelling first — the platform is strict about the exact string Authorization. If you are seeing a TG-1003, the token is valid but has been scoped read-only or scoped away from the resource you are touching; the fix is on the token, not on the request.

Validation errors (TG-2xxx)

CodeHTTPMeaningRemediation
TG-2001400Request body is not valid JSONFix the JSON syntax; the details array carries the parser position.
TG-2002400Content-Type is not application/jsonSet the header correctly.
TG-2003422Required field missingConsult the API reference for the resource shape.
TG-2004422Arrival is not strictly before departureAdjust the stay window; same-day arrivals require a minimum one-night stay.
TG-2005422Rate plan does not belong to the room typePick a rate plan attached to the requested room type or attach the plan first.
TG-2006422Guest document data fails Portuguese AL/SEF format checkEnsure passport / cartão de cidadão / driver's licence numbers match the expected format for the nationality declared.
TG-2007422Currency mismatch between quote and folioThe folio is denominated in one currency; the quote must match. Convert client-side or open a folio in the target currency.
TG-2008422Idempotency key reused with a different payloadUse a fresh key or send the exact same payload as the original request.
TG-2009422Enum value not in the accepted setThe details array lists the accepted set; pick one.
TG-2010422Reference target does not exist in this tenantThe guest_id, rate_plan_id or room_type_id resolves to nothing; check for typos or cross-tenant confusion.

Business logic errors (TG-3xxx)

CodeHTTPMeaningRemediation
TG-3001409Overbooking — no inventory in the requested room type for one or more nights of the windowQuery GET /availability before booking; either shift the window, pick a different room type, or explicitly opt-in to overselling on the tenant settings.
TG-3002409Rate conflict — the rate quote sent does not match the current rate tableRe-quote against the current table and resubmit; this usually means a rate update landed between quote and book.
TG-3003409Cancellation attempted after the free-cancellation window closedCharge the cancellation fee explicitly on the folio and cancel with force=true.
TG-3004409Check-in attempted on a reservation whose arrival date is not todayCheck-in early with an operator override or wait for the correct date.
TG-3005409Charge posted to a closed folioReopen the folio, split the charge into a new folio, or use a post-departure adjustment endpoint.

Business-logic errors are the hardest to design around because they represent a genuine conflict between the request and the state of the property. The pattern that works in production is to treat every 3xxx as an operator-visible signal: surface the code and the message to the operator UI, let them make the decision, then retry with the flag or the adjusted payload they chose.

Integration errors (TG-4xxx)

CodeHTTPMeaningRemediation
TG-4001502OTA channel unreachableTransient; the internal retry loop will pick it up. If it persists, the OTA is having an incident.
TG-4002502OTA rejected the payload as invalidCheck the channel mapping under Settings → Channels; a rate code or a room type has drifted between our side and the OTA.
TG-4003409OTA already knows about a reservation with the same external idThe reservation exists on both sides; reconcile by pulling the OTA record instead of re-creating.
TG-4004422Rate plan not mapped to the requested channelAdd a channel mapping to the rate plan, or send to a channel the plan is mapped to.
TG-4005502Payment provider timeoutRetry the charge with the same idempotency key; the platform will resolve the outcome once the provider responds.
TG-4006402Payment provider rejected the chargeThe provider's decline reason is in details.provider_reason; surface it to the guest.
TG-4007502SEF/AL submission endpoint unreachableTransient; the platform queues and retries. The reservation itself is not blocked.
TG-4008422Lock system rejected key issuanceRoom number is not present in the lock system's mapping; add the mapping under Settings → Integrations → Locks.

Rate limit errors (TG-5xxx)

CodeHTTPMeaningRemediation
TG-5001429Per-endpoint sub-cap trippedObey Retry-After; consider pacing on X-RateLimit-Remaining.
TG-5002429Per-tenant global 600/min trippedObey Retry-After; if this happens routinely, arrange an Enterprise ceiling raise — see the rate limits page.

Server errors (TG-9xxx)

CodeHTTPMeaningRemediation
TG-9001500Unhandled server errorRetry with exponential backoff; if it persists, include the request_id in a support ticket.
TG-9002503Platform in scheduled maintenanceObey Retry-After; maintenance windows are announced on the status page 72 hours in advance.
TG-9003503Regional failover in progressTransient — typically clears within two minutes; the platform is promoting the secondary EU region.

Server errors are the ones where the platform itself is at fault. The correct client behaviour on TG-9001 is to retry the same request with backoff — the underlying operation may have succeeded, may have failed, or may not have reached the persistence layer. Idempotency keys on writes make this safe: the retry with the same key either returns the original result or completes the operation for the first time.

Getting help

Every error envelope carries a request_id. When a specific request confuses you, the fastest path to a resolution is a support ticket that quotes the request_id, the endpoint, the payload (with any secrets redacted) and the error code. With the request_id our on-call engineer can go straight to the underlying platform log line without needing to reproduce the call. Without it, we spend the first hour of the ticket asking you to reproduce.

Next steps

Cross-check the resource shapes on the API reference so validation errors go away before they happen. Read the rate limits page so you avoid TG-5001 and TG-5002 in the first place. Read the webhooks page if you would rather subscribe to events than poll and parse errors on the read path. For anything else, reach the integrations team through the contact page or request access.