Context Agent

Bridge endpoint that forwards context resolution requests to Fideltour.

Table of Contents

Introduction

This endpoint lets you resolve an agent's context. HotelDataHub acts as a bridge (pass-through): it receives the request, forwards it to Fideltour using the customer's token, and returns Fideltour's response as-is (same status code and same body).

HotelDataHub does not transform or interpret the request body: it only forwards it and delegates the logic to Fideltour.

The API user needs the "context-agent" permission to use this endpoint.

Integration principle

The customer calls HotelDataHub with their token
  ↓
HotelDataHub forwards the request to Fideltour (same body)
  ↓
Fideltour identifies the account via the token and resolves the context
  ↓
HotelDataHub returns Fideltour's response unmodified

Authentication

Each integrated account has a specific token that identifies the customer (hotel chain). The token is sent in the Authorization header.

Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Available methods

Method Endpoint
POST <PENDING: confirm public domain, e.g. https://app.hoteldatahub.io/api/v1/agent/context/resolve/>

Request body

<PENDING: exact payload schema.> HotelDataHub treats the body as opaque and forwards it to Fideltour without transforming it. See Fideltour's documentation for the request/response schema.

Examples

Request (POST)

Protocol: HTTP/1.1 Method: POST Endpoint: <PENDING: public domain>/api/v1/agent/context/resolve/

Headers:

Content-Type: application/json
Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Body:

{
  "...": "..."
}

Responses

The response (status code and body) is whatever Fideltour returns, forwarded unmodified.

Invalid JSON

400 Bad Request

{
  "message": "Invalid JSON data"
}

No permission

403 Forbidden — the API user does not have the context-agent permission assigned.

Connection error with Fideltour

502 Bad Gateway

{
  "message": "Error de conexión con Fideltour"
}