### Start Neo4j Database Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/MCP-SETUP.md Starts the Neo4j graph database using an npm script. This is a prerequisite for using the graph traversal tools provided by the MCP server. Ensure Neo4j is installed and configured correctly before running this command. ```bash npm run neo4j:up ``` -------------------------------- ### Project Setup and Execution Commands Source: https://context7.com/webrenew/channex-knowledge-graph/llms.txt This provides a set of npm scripts for managing the Channex Knowledge Graph project. It includes commands to start Neo4j using Docker, build the TypeScript code, parse documentation and build the graph, sync data to Neo4j, run example queries, start the MCP server, and clear data from Supabase and Neo4j for a fresh rebuild. These commands streamline the development and deployment workflow. ```bash # Start Neo4j with Docker npm run neo4j:up # Or manually: docker-compose up -d # Verify Neo4j is running curl http://localhost:7474 # Access Neo4j Browser: http://localhost:7474 # Username: neo4j, Password: channex123 # Build TypeScript npm run build # Parse documentation and build knowledge graph npm run parse # Sync to Neo4j npm run sync:neo4j # Run example Neo4j queries npm run query:neo4j # Start MCP server for Claude npm run mcp:start # Or use with Claude CLI: claude --mcp "node dist/mcp-server.js" # Clear data and rebuild npm run clear:supabase npm run clear:neo4j npm run parse npm run sync:neo4j ``` -------------------------------- ### Troubleshoot Neo4j Start Failures Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README-neo4j.md Commands to help troubleshoot issues when Neo4j fails to start. Includes checking logs and resetting Docker volumes. ```bash # Check logs docker-compose logs neo4j # Reset volumes if needed docker-compose down -v docker-compose up -d ``` -------------------------------- ### Start and Manage Neo4j with Docker Compose Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README-neo4j.md Commands to start, check status, and view logs for Neo4j using Docker Compose. Assumes a docker-compose.yml file is present in the project. ```bash # Start Neo4j using Docker Compose docker-compose up -d # Check if Neo4j is running docker-compose ps # View logs docker-compose logs -f neo4j ``` -------------------------------- ### Copy MCP Config for Claude Desktop App Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/MCP-SETUP.md Copies the example MCP configuration file to the appropriate directory for the Claude Desktop App. This action requires administrator privileges or write access to the specified user directories. The command varies based on the operating system (macOS or Windows). ```bash cp .mcp.json.example ~/Library/Application\ Support/Claude/claude_desktop_config.json ``` ```bash copy .mcp.json.example %APPDATA%\Claude\claude_desktop_config.json ``` -------------------------------- ### Start MCP Server and Configure Claude Desktop Source: https://context7.com/webrenew/channex-knowledge-graph/llms.txt This snippet demonstrates how to start the Model Context Protocol (MCP) server for the Channex Knowledge Graph Builder and how to configure it within Claude Desktop. It includes commands for starting the server and an example JSON configuration for `.mcp.json`. ```bash npm run build claude --mcp "node dist/mcp-server.js" ``` ```json { "mcpServers": { "channex-knowledge": { "command": "node", "args": ["/path/to/dist/mcp-server.js"], "env": { "KNOWLEDGE_DB_SERVICE_KEY": "your-service-key", "NEO4J_URI": "bolt://localhost:7687", "NEO4J_PASSWORD": "channex123" } } } } ``` -------------------------------- ### Configure Environment Variables for Neo4j Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README-neo4j.md Copies an example environment file to be edited with specific credentials. This step is crucial for connecting to services like Supabase. ```bash cp .env.example .env # Edit .env with your Supabase credentials ``` -------------------------------- ### MCP Server Tool Examples: Search Endpoints, Get Details, Search Documentation Source: https://context7.com/webrenew/channex-knowledge-graph/llms.txt Examples of how an AI assistant would use the tools provided by the MCP server to interact with the Channex knowledge graph. This includes searching for endpoints, retrieving specific endpoint details, and performing semantic searches on documentation. ```json // Example: Search endpoints (used by AI assistant) // Tool name: search_endpoints // Input: { "query": "booking", "method": "POST", "category": "bookings" } // Output: Array of matching endpoints with details [ { "method": "POST", "path": "/api/v1/bookings", "category": "bookings", "description": "Create a new booking", "parameters": [...], "examples": [...] } ] ``` ```json // Example: Get endpoint details // Tool name: get_endpoint_details // Input: { "path": "/api/v1/properties" } // Returns: Complete endpoint specification including auth, rate limits, examples ``` ```json // Example: Search documentation with semantic search // Tool name: search_documentation // Input: { "query": "room availability", "limit": 5 } // Returns: Top 5 relevant documentation chunks based on vector similarity ``` -------------------------------- ### Run MCP Server with Claude CLI Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/MCP-SETUP.md Launches the MCP server using the Claude CLI tool. This command allows specifying the path to the MCP server script and setting necessary environment variables like KNOWLEDGE_DB_SERVICE_KEY. It's designed for command-line execution. ```bash # From the project directory KNOWLEDGE_DB_SERVICE_KEY="your-key" claude --mcp "node dist/mcp-server.js" # Or with full path KNOWLEDGE_DB_SERVICE_KEY="your-key" claude --mcp "node /path/to/channex-knowledge-graph/dist/mcp-server.js" ``` -------------------------------- ### Install Application API Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_applications-api.md Installs an application into a specified property. It is recommended to use `application_code` for the installation process. ```APIDOC ## POST /api/v1/applications/install ### Description Method to add an Application into a Property. ### Method POST ### Endpoint /api/v1/applications/install ### Parameters #### Request Body - **application_installation** (object) - Required - Contains details for the application installation. - **property_id** (string) - Required - The ID of the property to install the application on. - **application_code** (string) - Required - The code of the application to install. ### Request Example ```json { "application_installation": { "property_id": "18535b75-26a0-4716-ae99-0578006639c5", "application_code": "channex_messages" } } ``` ### Response #### Success Response (200) - **data** (object) - Contains the details of the installed application. - **id** (string) - The unique identifier for the application installation. - **type** (string) - The type of the resource, e.g., "application_installation". - **attributes** (object) - Attributes of the installed application. - **id** (string) - The unique identifier for the application installation. - **settings** (object) - Configuration settings for the application. - **property_id** (string) - The ID of the property where the application is installed. - **is_active** (boolean) - Indicates if the application is currently active. - **application_id** (string) - The ID of the application. - **application_code** (string) - The code of the application. - **relationships** (object) - Relationships to other resources. - **rate_plans** (object) - Information about associated rate plans. #### Response Example ```json { "data": { "attributes": { "id": "7db569e1-3fb3-49a7-884b-690140827c50", "settings": {}, "property_id": "18535b75-26a0-4716-ae99-0578006639c5", "is_active": true, "application_id": "0dbb54b2-1321-43dd-9fe9-30d54e19ff33", "application_code": "channex_messages" }, "id": "7db569e1-3fb3-49a7-884b-690140827c50", "type": "application_installation", "relationships": { "rate_plans": { "data": [] } } } } ``` #### Error Response (401 Unauthorized) - **errors** (object) - Contains error details. - **code** (string) - Error code, e.g., "unauthorized". - **title** (string) - Error title, e.g., "Unauthorized". #### Error Response Example ```json { "errors": { "code": "unauthorized", "title": "Unauthorized" } } ``` ### Note Some applications may require additional configuration after installation. Please contact support for details. ``` -------------------------------- ### Advanced Usage: Direct Cypher Queries with Neo4j Driver Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README-neo4j.md Example TypeScript code showing how to connect to Neo4j using the `neo4j-driver` and execute a direct Cypher query. Includes driver instantiation, session creation, and running a query with parameters. ```typescript import neo4j from 'neo4j-driver'; const driver = neo4j.driver( 'bolt://localhost:7687', neo4j.auth.basic('neo4j', 'channex123') ); const session = driver.session(); const result = await session.run( 'MATCH (n:Endpoint) RETURN n LIMIT $limit', { limit: 10 } ); ``` -------------------------------- ### MCP Server Environment Variables Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/MCP-SETUP.md Defines the required and optional environment variables for the MCP server. KNOWLEDGE_DB_SERVICE_KEY is mandatory, while NEO4J_URI, NEO4J_USER, and NEO4J_PASSWORD are optional with default values provided. These variables configure the connection to Supabase and Neo4j databases. ```bash # Required KNOWLEDGE_DB_SERVICE_KEY=your-supabase-service-role-key # Optional (defaults shown) NEO4J_URI=bolt://localhost:7687 NEO4J_USER=neo4j NEO4J_PASSWORD=channex123 ``` -------------------------------- ### Install the Payment Application Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_payment-application-api.md Initiates the installation of the Payment Application for a given property, setting up the necessary connection with Channex. ```APIDOC ## POST /api/v1/applications ### Description Installs the Payment Application for a specified property by providing the property ID and the application code. ### Method POST ### Endpoint /api/v1/applications ### Parameters #### Request Body - **application_installation** (object) - Required - Contains installation details. - **property_id** (string) - Required - The ID of the property to install the application for. - **application_code** (string) - Required - The code for the application to install (e.g., "channex_payments"). ### Request Example ```json { "application_installation": { "property_id": "{{PROPERTY_ID}}", "application_code": "channex_payments" } } ``` ### Response #### Success Response (200) - **data** (array) - Contains the installation details. - **attributes** (object) - Attributes of the application installation. - **id** (string) - The unique identifier for this specific application installation. - **settings** (object | null) - Configuration settings for the application. - **property_id** (string) - The ID of the property where the application is installed. - **application_id** (string) - The ID of the application itself. - **application_code** (string) - The code of the installed application. - **id** (string) - The installation ID (same as attributes.id). - **type** (string) - The type of the resource (e.g., "application_installation"). #### Response Example ```json { "data": [ { "attributes": { "id": "12ca008c-95e9-4668-942a-d255b618c00e", "settings": null, "property_id": "c19a05af-8c8c-4754-8c8a-8132845d4cac", "application_id": "8587fbf6-a6d1-46f8-8c12-074273284917", "application_code": "channex_messages" }, "id": "12ca008c-95e9-4668-942a-d255b618c00e", "type": "application_installation" } ] } ``` ``` -------------------------------- ### Get List of Installed Applications API Success Response Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_applications-api.md This JSON example demonstrates a successful response (Status Code: 200 OK) for the 'Get List of Installed Applications' endpoint. The 'data' array contains objects representing installed applications, including their 'id', 'settings', 'property_id', 'application_id', and 'application_code'. ```JSON { "data": [ { "attributes": { "id": "12ca008c-95e9-4668-942a-d255b618c00e", "settings": null, "property_id": "c19a05af-8c8c-4754-8c8a-8132845d4cac", "application_id": "8587fbf6-a6d1-46f8-8c12-074273284917", "application_code": "channex_messages" }, "id": "12ca008c-95e9-4668-942a-d255b618c00e", "type": "application_installation" } ] } ``` -------------------------------- ### Get List of Installed Applications API Request Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_applications-api.md This code snippet shows the HTTP GET request used to retrieve a list of applications that have been installed for a specific property. The request is directed to the '/api/v1/applications/installed' endpoint. ```HTTP GET /api/v1/applications/installed ``` -------------------------------- ### Run Example Neo4j Queries and Access Browser (Bash) Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README.md This snippet shows how to execute example Neo4j queries to verify the knowledge graph's integrity and provides instructions for accessing the Neo4j Browser for visual exploration. It assumes Neo4j is running locally with default credentials. ```bash # Run example Neo4j queries to verify the graph npm run query:neo4j # Access Neo4j Browser for visual exploration # URL: http://localhost:7474 # Username: neo4j, Password: channex123 ``` -------------------------------- ### GET /api/v1/applications/installed Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_applications-api.md Retrieve a list of applications that are currently installed for the authenticated user. This endpoint provides details about the installed application instances. ```APIDOC ## GET /api/v1/applications/installed ### Description Retrieve a list of installed Applications for the authenticated user. This endpoint shows which applications are active and associated with the user's account or properties. ### Method GET ### Endpoint /api/v1/applications/installed ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **data** (array) - An array of installed application objects. - **id** (string) - The unique identifier for the application installation. - **settings** (any|null) - Configuration settings for this specific installation. - **property_id** (string) - The ID of the property this application is installed for. - **application_id** (string) - The ID of the application that is installed. - **application_code** (string) - The code identifier of the installed application. #### Response Example ```json { "data": [ { "id": "12ca008c-95e9-4668-942a-d255b618c00e", "settings": null, "property_id": "c19a05af-8c8c-4754-8c8a-8132845d4cac", "application_id": "8587fbf6-a6d1-46f8-8c12-074273284917", "application_code": "channex_messages" } ] } ``` #### Error Response (401 Unauthorized) - **errors** (object) - **code** (string) - Error code, e.g., "unauthorized". - **title** (string) - A message describing the error, e.g., "Unauthorized". #### Error Response Example ```json { "errors": { "code": "unauthorized", "title": "Unauthorized" } } ``` ``` -------------------------------- ### View Property Setup Workflow in Neo4j Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/neo4j-visualization-queries.md This query illustrates the step-by-step workflow for the 'Property Setup Flow' API pattern. It shows the sequence of API steps involved in setting up a property. ```cypher // Shows the complete property setup flow MATCH (pattern:APIPattern {name: 'Property Setup Flow'})-[r:HAS_STEP]->(step:APIStep) MATCH (step)-[next:NEXT*0..]->(following) RETURN pattern, r, step, next, following ``` -------------------------------- ### Get List of Applications API Request Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_applications-api.md This code snippet represents the GET request to retrieve a list of all available applications from the Channex.io API. It is a simple HTTP GET request to the specified endpoint. No request body or headers are shown in this example. ```HTTP GET /api/v1/applications ``` -------------------------------- ### Application Documentation Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/channex-index.md Guides and overviews for using the Channex application interface, including features like dashboard, property management, inventory, and channel management. ```APIDOC ## Application Overview ### Description Overview of the Channex application interface and features. ### Endpoint `https://docs.channex.io/application-documentation/overview` ## Dashboard ### Description Guide to the Channex dashboard and its features. ### Endpoint `https://docs.channex.io/application-documentation/dashboard` ## Properties & Groups Management ### Description Managing properties and user groups in the application. ### Endpoint `https://docs.channex.io/application-documentation/properties-and-groups-management` ## Property Tasks ### Description Managing and tracking property-related tasks. ### Endpoint `https://docs.channex.io/application-documentation/property-tasks` ## Rooms Management ### Description Managing rooms and room types in the application. ### Endpoint `https://docs.channex.io/application-documentation/rooms-management` ## Inventory Management ### Description Managing inventory, rates, and availability. ### Endpoint `https://docs.channex.io/application-documentation/inventory-management` ## Channels Management ### Description Managing OTA and channel connections. ### Endpoint `https://docs.channex.io/application-documentation/channels-management` ## Channel Actions Log ### Description Viewing logs of channel actions and updates. ### Endpoint `https://docs.channex.io/application-documentation/channel-actions-log` ## Bookings Management ### Description Managing bookings within the application. ### Endpoint `https://docs.channex.io/application-documentation/bookings-management` ## Availability Rules ### Description Managing availability rules in the application. ### Endpoint `https://docs.channex.io/application-documentation/availability-rules` ## API Key Access ### Description Managing API keys for integration. ### Endpoint `https://docs.channex.io/application-documentation/api-key-access` ## Change Log Feature ### Description Viewing and using the change log feature. ### Endpoint `https://docs.channex.io/application-documentation/change-log-feature` ``` -------------------------------- ### Get Message Threads - Success Response Example (JSON) Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_messages-collection.md Example of a successful response (200 OK) when retrieving message threads. It includes a 'data' array containing message thread objects with their attributes and relationships, along with pagination metadata. ```json { "data": [ { "attributes": { "title": "Maldonado Roxy", "is_closed": false, "provider": "BookingCom", "message_count": 2, "last_message": { "attachments": [], "inserted_at": "2021-07-27T09:43:05.864520", "message": "Thanks for your message.", "sender": "property" }, "last_message_received_at": "2021-07-27T09:43:05.864520", "inserted_at": "2021-07-27T09:32:14.281622", "updated_at": "2021-07-27T09:43:05.868034" }, "id": "20d1b08c-190e-4068-a77d-4a909a21835d", "relationships": { "booking": { "data": { "id": "4d8240fd-d709-454b-a866-08bca2a5a909", "type": "booking" } }, "channel": { "data": { "id": "351f145d-cb8c-4df7-9f12-2f6854991b91", "type": "channel" } }, "property": { "data": { "id": "71d34923-a8be-4682-9625-e4a2f080df92", "type": "property" } } }, "type": "message_thread" } ], "meta": { "limit": 10, "order_by": "inserted_at", "order_direction": "desc", "page": 1, "total": 1 } } ``` -------------------------------- ### Install Dependencies and Configure Environment (Bash) Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README.md This snippet outlines the steps to clone the repository, install Node.js dependencies, and configure environment variables, including setting the OpenAI API key. It assumes Node.js 18+ and npm are installed. ```bash git clone https://github.com/WebRenew/channex-knowledge-graph.git cd channex-knowledge-graph npm install cp .env.example .env # Edit .env and add your OpenAI API key # Ensure Neo4j is running on localhost:7687 # Default credentials: neo4j / channex123 ``` -------------------------------- ### GET Hotel Policies API Request Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_hotel-policy-collection.md This snippet shows the HTTP GET request to retrieve a list of hotel policies from the Channex.io API. It targets the staging environment and does not include any request body or specific headers for authentication in this example. ```http GET https://staging.channex.io/api/v1/hotel_policies ``` -------------------------------- ### Get List of Connected Providers Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_payment-application-api.md Retrieves a list of payment providers that are connected to the Payment App for a given installation. ```APIDOC ## POST /api/v1/applications/payment_app/{{installation_id}}/providers ### Description Fetches a list of payment providers connected to the Payment Application for a specific installation, with pagination support. ### Method POST ### Endpoint /api/v1/applications/payment_app/{{installation_id}}/providers ### Parameters #### Path Parameters - **installation_id** (string) - Required - The ID of the application installation. #### Request Body - **page** (integer) - Optional - The page number for pagination (defaults to 1). - **limit** (integer) - Optional - The number of results per page (defaults to 10). ### Request Example ```json { "page": 1, "limit": 10 } ``` ### Response #### Success Response (200) - **data** (array) - A list of connected payment provider objects. - **id** (string) - Unique identifier for the provider entry. - **type** (string) - Type of the resource (e.g., "payment_provider"). - **attributes** (object) - Attributes of the connected provider. - **id** (string) - The actual ID of the payment provider (e.g., Stripe account ID). - **title** (string) - The custom title given to this provider connection. - **provider** (string) - The name of the payment provider (e.g., "stripe"). - **is_active** (string) - Currency code if active (e.g., "USD"). - **is_default** (boolean) - Indicates if this is the default provider. - **details** (object) - Additional details about the provider connection. - **account_id** (string) - The account ID of the provider. #### Response Example ```json { "data": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "payment_provider", "attributes": { "id": "550e8400-e29b-41d4-a716-446655440000", "title": "string", "provider": "stripe", "is_active": "USD", "is_default": true, "details": { "account_id": "xyz123" } } } ] } ``` ``` -------------------------------- ### Install Application using API Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_applications-api.md This code demonstrates how to install an application into a property using the Channex API. It requires the property ID and the application code. The response includes details of the installed application or an unauthorized error. ```json POST /api/v1/applications/install { "application_installation": { "property_id": "18535b75-26a0-4716-ae99-0578006639c5", "application_code": "channex_messages" } } ``` ```json { "data": { "attributes": { "id": "7db569e1-3fb3-49a7-884b-690140827c50", "settings": {}, "property_id": "18535b75-26a0-4716-ae99-0578006639c5", "is_active": true, "application_id": "0dbb54b2-1321-43dd-9fe9-30d54e19ff33", "application_code": "channex_messages" }, "id": "7db569e1-3fb3-49a7-884b-690140827c50", "type": "application_installation", "relationships": { "rate_plans": { "data": [] } } } } ``` ```json { "errors": { "code": "unauthorized", "title": "Unauthorized" } } ``` -------------------------------- ### Get Property by ID - Success Response Example Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_hotels-collection.md Example of a successful response (200 OK) when retrieving a property by ID. The response body contains the 'data' object, which includes the property's 'type', 'id', and detailed 'attributes' such as title, contact information, content, and settings. It also outlines 'relationships' to other entities like groups. ```json { "data": { "type": "property", "id": "716305c4-561a-4561-a187-7f5b8aeb5920", "attributes": { "id": "716305c4-561a-4561-a187-7f5b8aeb5920", "title": "Demo Hotel", "is_active": true, "email": "hotel@channex.io", "phone": "01267237037", "currency": "GBP", "country": "GB", "state": "Demo State", "city": "Demo Town", "address": "Demo Street", "zip_code": "SA23 2JH", "latitude": null, "longitude": null, "timezone": "Europe/London", "property_type": "hotel", "content": { "description": "Some Property Description Text", "photos": [{ "author": "Author Name", "description": "Room View", "id": "4355439c-df23-4f12-bffd-26476e31dd4a", "kind": "photo", "position": 0, "property_id": "716305c4-561a-4561-a187-7f5b8aeb5920", "room_type_id": null, "url": "https://img.channex.io/af08bc1d-8074-476c-bdb7-cec931edaf6a/" }], "important_information": null }, "settings": { "allow_availability_autoupdate_on_confirmation": true, "allow_availability_autoupdate_on_modification": true, "allow_availability_autoupdate_on_cancellation": true, "min_stay_type": "both", "max_price": null, "min_price": null, "max_day_advance": null }, "logo_url": null, "acc_channels_count": 0 }, "relationships": { "groups": { "data": [ { "id": "f5338935-7fe0-40eb-9d7e-4dbf7ecc52c7", "type": "group", "attributes": { "id": "f5338935-7fe0-40eb-9d7e-4dbf7ecc52c7", "title": "User Group" } } ] }, "facilities": { "data": [] } } } } ``` -------------------------------- ### Make My Trip / Goibibo Examples Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_bookings-collection.md Examples of booking data retrieved from Make My Trip and Goibibo channels. ```APIDOC ## GET /bookings ### Description Retrieves a collection of bookings. This example specifically showcases data from Make My Trip and Goibibo. ### Method GET ### Endpoint /bookings ### Parameters #### Query Parameters - **channel_name** (string) - Optional - Filter bookings by channel name (e.g., "Goibibo", "MakeMyTrip"). ### Request Example ```json { "message": "Request to get bookings" } ``` ### Response #### Success Response (200) - **data** (object) - Contains booking details. - **id** (string) - Unique identifier for the booking. - **type** (string) - Type of the resource, e.g., "booking". - **attributes** (object) - Booking attributes. - **id** (string) - Internal booking ID. - **meta** (object) - Metadata related to the booking. - **booking_id** (string) - The booking ID from the OTA. - **cancellation_policy** (array) - Array of cancellation policies. - **created_time** (string) - Timestamp when the booking was created. - **last_modified_time** (string) - Timestamp of the last modification. - **status** (string) - Current status of the booking (e.g., "new", "cancelled"). - **services** (array) - List of services included in the booking. - **currency** (string) - Currency code for the booking amount. - **amount** (string) - Total booking amount. - **agent** (object|null) - Agent details if applicable. - **inserted_at** (string) - Timestamp when the booking was inserted into the system. - **unique_id** (string) - Unique identifier for the booking within the channel. - **property_id** (string) - Identifier for the property. - **channel_id** (string) - Identifier for the channel. - **ota_name** (string) - Name of the Online Travel Agency (OTA). - **ota_reservation_code** (string) - Reservation code from the OTA. - **arrival_date** (string) - Arrival date in YYYY-MM-DD format. - **arrival_hour** (string|null) - Arrival hour if specified. - **customer** (object) - Customer details. - **name** (string) - Customer's first name. - **mail** (string) - Customer's email address. - **phone** (string) - Customer's phone number. - **surname** (string) - Customer's last name. - **departure_date** (string) - Departure date in YYYY-MM-DD format. - **deposits** (array) - Details of any deposits made. - **notes** (string|null) - Any additional notes for the booking. - **ota_commission** (object|null) - OTA commission details. - **payment_collect** (string) - How payment is collected (e.g., "ota"). - **payment_type** (string) - Type of payment (e.g., "bank_transfer"). - **rooms** (array) - Array of room details for the booking. - **meta** (object) - Room-specific metadata. - **number** (integer) - Room number. - **hotel_code** (string) - Hotel code from the OTA. - **rate_plan_code** (string) - Rate plan code. - **room_type_code** (string) - Room type code. - **cancel_penalties** (array) - Cancellation penalties for the room. - **days_breakdown** (array) - Daily breakdown of charges. - **taxes** (array) - Taxes applied to the room. - **services** (array) - Services included in the room. - **amount** (string) - Amount for the room. - **days** (object) - Daily rates for the room. - **ota_commission** (object|null) - OTA commission for the room. - **guests** (array) - Guest details for the room. - **occupancy** (object) - Occupancy details for the room. - **children** (integer) - Number of children. - **adults** (integer) - Number of adults. - **ages** (null) - Ages of guests if specified. - **infants** (integer) - Number of infants. - **rate_plan_id** (string) - Rate plan ID. - **room_type_id** (string) - Room type ID. - **booking_room_id** (string) - Unique ID for the booking room. - **checkin_date** (string) - Check-in date for the room. - **checkout_date** (string) - Check-out date for the room. - **is_cancelled** (boolean) - Indicates if the room booking is cancelled. - **ota_unique_id** (string|null) - Unique ID from OTA for the room booking. - **occupancy** (object) - Overall occupancy details for the booking. - **children** (integer) - Number of children. - **adults** (integer) - Number of adults. - **ages** (null) - Ages of guests if specified. - **infants** (integer) - Number of infants. - **guarantee** (object|null) - Guarantee details if applicable. - **secondary_ota** (string) - Name of a secondary OTA if involved. - **acknowledge_status** (string) - Status of acknowledgment. - **has_unacked_revisions** (boolean) - Indicates if there are unacknowledged revisions. - **raw_message** (string) - The raw message received from the OTA. - **is_crs_revision** (boolean) - Indicates if this is a CRS revision. - **revision_id** (string) - ID of the revision. #### Response Example (200 OK) ```json { "data": { "attributes": { "id": "8a362bbf-5a67-49ad-87a0-70ad7d26cd8d", "meta": { "booking_id": "0123936109", "cancellation_policy": [ { "charge": "0", "charge_type": "percent", "end_day": "365", "policy_text": "Free cancellation if cancelled between 365 days prior to checkin and 1 days prior to checkin", "start_day": "1" }, { "charge": "100", "charge_type": "percent", "end_day": "1", "policy_text": "Non-Refundable between 1 days prior to checkin or in case of NO SHOW", "start_day": "-1" } ], "created_time": "2025-03-20 16:23:58", "last_modified_time": "2025-03-20 16:24:03" }, "status": "new", "services": [], "currency": "THB", "amount": "9100.00", "agent": null, "inserted_at": "2025-03-20T10:55:00.218175", "unique_id": "GMT-0123936109", "property_id": "2924ab73-14fb-4b47-bf0b-680118e98bef", "channel_id": "85016ebd-a1aa-2b9f-abb9-4ad3a0857835", "ota_name": "Goibibo", "booking_id": "8a362bbf-5a67-49ad-87a0-70ad7d26cd8d", "arrival_date": "2025-04-14", "arrival_hour": null, "customer": { "name": "Name", "mail": "", "phone": "", "surname": "Surname" }, "departure_date": "2025-04-19", "deposits": [], "notes": null, "ota_commission": null, "ota_reservation_code": "0123936109", "payment_collect": "ota", "payment_type": "bank_transfer", "rooms": [ { "meta": { "number": 1, "hotel_code": "1000113081", "rate_plan_code": "910020446642", "room_type_code": "15200264119", "cancel_penalties": [], "days_breakdown": [] }, "taxes": [], "services": [], "amount": "9100.00", "days": { "2025-04-15": "2093.00", "2025-04-16": "1638.00", "2025-04-17": "1638.00", "2025-04-18": "1638.00", "2025-04-14": "2093.00" }, "ota_commission": null, "guests": [], "occupancy": { "children": 0, "adults": 2, "ages": null, "infants": 0 }, "rate_plan_id": "12b1419c-6ee6-4032-9d2b-7521fb59c87d", "room_type_id": "2219cf5c-ddbc-4162-bb14-6aa7581f78b9", "booking_room_id": "f933192b-17d3-411a-9906-7c82844afee1", "checkin_date": "2025-04-14", "checkout_date": "2025-04-19", "is_cancelled": false, "ota_unique_id": null } ], "occupancy": { "children": 0, "adults": 2, "ages": null, "infants": 0 }, "guarantee": null, "secondary_ota": "MakeMyTrip", "acknowledge_status": "acknowledged", "has_unacked_revisions": false, "raw_message": "...", "is_crs_revision": false, "revision_id": "cd82f770-7c1e-4053-b834-93e0483305a0" }, "id": "8a362bbf-5a67-49ad-87a0-70ad7d26cd8d", "type": "booking" } } ``` ``` -------------------------------- ### Troubleshoot Neo4j Connection Issues Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README-neo4j.md Commands to diagnose connection problems with Neo4j. Includes testing the connection via `curl` and checking if the APOC plugin is installed. ```bash # Test connection curl http://localhost:7474 # Check if APOC is installed docker exec channex-neo4j cypher-shell -u neo4j -p channex123 \ "RETURN apoc.version()" ``` -------------------------------- ### Install Payment Application API Request Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_payment-application-api.md Initiates the installation of the Channex Payment Application for a specific property. Requires the property ID and the application code 'channex_payments'. Returns installation details including a unique installation ID. ```plaintext POST /api/v1/applications Payload: { "application_installation": { "property_id": "{{PROPERTY_ID}}", "application_code": "channex_payments" } } Response: { "data": [ { "attributes": { "id": "12ca008c-95e9-4668-942a-d255b618c00e", "settings": null, "property_id": "c19a05af-8c8c-4754-8c8a-8132845d4cac", "application_id": "8587fbf6-a6d1-46f8-8c12-074273284917", "application_code": "channex_messages" }, "id": "12ca008c-95e9-4668-942a-d255b618c00e", <-- INSTALLATION ID "type": "application_installation" } ] } ``` -------------------------------- ### Get Property Options (Success Response) Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_api-v.1-documentation_hotels-collection.md Example of a successful response (200 OK) when retrieving property options. The response includes an array of property objects, each with an ID, title, and currency. ```json { "data": [ { "attributes": { "id": "716305c4-561a-4561-a187-7f5b8aeb5920", "title": "Demo Hotel", "currency": "GBP" }, "id": "716305c4-561a-4561-a187-7f5b8aeb5920", "type": "properties" } ] } ``` -------------------------------- ### Build and Run MCP Server (Bash) Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README.md Instructions for building the Model Context Protocol (MCP) server and running it with the Claude CLI. This enables integration with AI assistants for intelligent API interaction. It requires the project to be built first. ```bash # Build the MCP server npm run build # Run with Claude CLI claude --mcp "node dist/mcp-server.js" # Or configure for Claude Desktop (see MCP-SETUP.md) ``` -------------------------------- ### Build the Knowledge Graph: Parse and Sync (Bash) Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README.md These commands demonstrate the process of building the knowledge graph. It involves parsing documentation files into Supabase and then synchronizing this data to the Neo4j graph database. Commands for clearing data are also included. ```bash # Step 1: Parse all documentation files into Supabase npm run parse # Step 2: Sync data to Neo4j graph database npm run sync:neo4j # Optional: Clear and rebuild from scratch npm run clear:supabase # Clear Supabase data npm run clear:neo4j # Clear Neo4j data ``` -------------------------------- ### Cypher Query: Find all Property Endpoints Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README-neo4j.md An example Cypher query to find all Neo4j `:Endpoint` nodes where the `path` property contains 'properties'. It returns the method, path, and description of these endpoints. ```cypher MATCH (e:Endpoint) WHERE e.path CONTAINS 'properties' RETURN e.method, e.path, e.description ``` -------------------------------- ### Make API Request with API Key Header Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/channex-docs/docs.channex.io_application-documentation_api-key-access.md This example demonstrates how to include the API key in the 'user-api-key' header when making a GET request to the Channex.io API. Ensure the API key is kept secure and is only shared when necessary. ```http GET /api/v1/properties/ HTTP/1.1 Host: staging.channex.io Content-Type: application/json user-api-key: uU08XiMgk8a7CrY4xUjAReUIuTrn83R123adaVb8Tf/qMcVTEgriuJhXWs/1Q1P ``` -------------------------------- ### MCP Server Usage (Bash) Source: https://github.com/webrenew/channex-knowledge-graph/blob/main/README.md Commands for running the Model Context Protocol (MCP) server, demonstrating quick start with Claude CLI and usage with environment variables for authentication. ```bash # Quick start with Claude CLI claude --mcp "node dist/mcp-server.js" ``` ```bash # With environment variables KNOWLEDGE_DB_SERVICE_KEY="your-key" claude --mcp "node dist/mcp-server.js" ```