Quickstart
Introductionβ
Our CSV API provides an intuitive solution for inventory clients to manage and configure their hotel products, including rooms, rates, and other related details, directly within our robust inventory system.
This API is designed to streamline the process of updating and maintaining large datasets, making it easier for clients to quickly integrate their data via a well-defined CSV file format. The API supports a range of operations essential for the effective management of hotel inventories, all through the convenience of CSV uploads.
Whether you are looking to initial upload your inventory data, make comprehensive updates, or simply fine-tune specific details, this API affords you the flexibility and control needed to manage your product listings efficiently and accurately.
It is ideal for:
- Bulk Updates: Easily upload or modify large sets of data, such as room types, rates, and availability in one go.
- Simplified Integration: Use a standard CSV file format for data import and export, facilitating easy preparation and processing of data.
- Less Technical Complexity: Avoid the intricacies of coding detailed API requests by using prepared CSV templates.
In the following sections, you will find detailed guidance on how to prepare your CSV files, the specific fields and formats required, and step-by-step instructions on how to submit your data through the API. We also provide troubleshooting tips and best practices to help you optimize your use of this tool and achieve seamless integration with our inventory system.
Let's get started on simplifying and enhancing your inventory management process with our CSV API.
Let's Get Started: How to use the CSV!β
1. Prepare Your Working Sheetβ
The recommended way to create and manage inventory CSV files is using the Travelgate Inventory CSV Builder β a Google Sheets template with built-in validation, dynamic dropdowns, and one-click CSV export.
Create your own private copy directly from the Make my own copy button in the builder guide. You do not need to configure any API key.
For a complete step-by-step guide on how to use the tool, see:
π Google Sheets CSV Builder
Alternatively, if you prefer to build CSV files manually, you can follow the formatting rules described in Section 5 (CSV Format Requirements) and the field specifications in the individual entity pages.
2. Google Sheets CSV Builder β Key Featuresβ
The Google Sheets template includes the following built-in capabilities:
Data Validationβ
As you fill the spreadsheet, the script automatically checks all required fields and format rules. Invalid cells are highlighted in red with a description of the error. Run β Validate All Sheets at any time to see a full error summary.
Dynamic Dropdowns from the APIβ
After running π Load Dynamic Data (API), the following columns are populated with live data from Travelgate:
- Context codes (HotelsMaster and Hotels sheets)
- Hotel categories (HotelsMaster)
- Meal plan names (RatePlans)
- Room master codes (Rooms)
CSV Exportβ
Use π₯ Export CSV to generate correctly formatted CSV files (semicolon-delimited, UTF-8) ready for SFTP upload. The tool names the files automatically using your Client Code and Supplier Code.
Column Tooltipsβ
Hover over any header cell to read a tooltip describing the expected format for that column.
3. File Naming Importance for Travelgate FTP Uploadsβ
Understanding the significance of file naming is crucial for successful file uploads to Travelgate's FTP. Below is a summary of the required elements to correctly name your file, which are detailed through examples shared in the file schema:
clientCode(Inventory):β
This is Travelgate's native code for the client in the inventory system.
Your ClientCode can be retrieved from any Travelgate's access with a Channel Manager. See My Connections and click "Get form data" in the selected access, the code in Password is equivalent to the ClientCode.
providerCode(Inventory):β
This is Travelgate's native code for the provider in the inventory.
Your ProviderCode can be retrieved from any Travelgate's access with a Channel Manager. See My Connections and click "Get form data" in the selected access, the code in User is equivalent to the ProviderCode.
HotelCode#ContextCode:β
Depending on the type of connection to a Channel Manager, there are two scenarios to consider for naming your file:
-
Scenario 1: Connecting to a Channel Manager Using Its Own Codes:
- HotelCode: Use the native code provided by the Channel Manager.
- ContextCode: This part must be filled in, as it is essential for the Channel Manager that uses its own unique codes. It is mandatory to include both the hotel code and the context code in the file name.
-
Scenario 2: Connecting to a Channel Manager Using Travelgate Inventory Codes:
- HotelCode: Use the code from Travelgate's inventory.
To check if the hotel exists in inventory you can retrieve current details using the following queries: Hotels Master, Search Hotels Master - ContextCode: This part should be ignored as the Channel Manager works with Travelgate's inventory codes, and no additional contextual code is needed.
- HotelCode: Use the code from Travelgate's inventory.
Examples:
-
Example for Scenario 1: Example: Imagine you are the client "travelClient (TG)" connected to the channel manager "travelgateChannelManagerNativeCode (TGCMNC)", which uses natives hotel codes (Native1234). If you are completing the "rooms" file, the download file name should be: clientCode(Inventory)-providerCode(Inventory)-HotelCode#ContextCode-rooms.csv. In this Case, you would name the file "TG-TGCMNC-Native1234#TRV-rooms.csv". The ContextCode can be found in the same sheet, in the column "context", you have a dropdown with the current values of the channels managers that work with native hotel codes.
-
Example for Scenario 2: Imagine you are the client "travelClient (TG)" connected to the channel manager "travelgateChannelManager (TGCM)", which uses hotel codes from the inventory. If you are completing the "rooms" file, the download file name should be: "clientCode(Inventory)-providerCode(Inventory)-HotelCode#ContextCode-rooms.csv. In this case, you would name the file "TG-TRVCM-1234-rooms.csv", omitting the #ContextCode since the connected channel does not use native codes but relies on Travelgate's inventory codes.
IMPORTANT: The file name is parsed by the system using the dash (-) character as a separator. Make sure your client code and provider code do NOT contain dashes. The system expects the following patterns:
clientCode-providerCode-entity.csv(for masters like hotelsMaster)clientCode-providerCode-HotelCode#ContextCode-entity.csv(for setups)clientCode-roomsMaster.csv(special case for rooms master)
The entity part must match one of the supported types exactly (case-insensitive): hotels, rooms, rateplans, policies, taxes, offers, hotelsMaster, roomsMaster.
4. Uploading Files to SFTP and Configurationβ
After completing the necessary preliminary steps, the next stage involves uploading your files to the SFTP server.
When accessing the SFTP, you will find three folders in the main directory, each referring to different Travelgate services that can use the SFTP for mappings, setups, etc. In this case, we focus on the Inventory section, where you should upload the CSV files needed for setup.
sftp://sftp.travelgate.com:22

IMPORTANT: It is essential to use the correct file naming conventions to ensure the files can be processed via the SFTP.
File Checking Frequencyβ
It is important to note that our CSV API checks the SFTP server periodically for new files (approximately every hour). Once detected, files are queued for processing. The processing time depends on the file size and the current system load.
File Processing Status: After a file is picked up for processing, it will be renamed with a suffix indicating its status:
- -Queued: The file has been detected and is waiting to be processed.
- -Processing: The file is currently being processed.
- -Processed: The file has been successfully processed.
- -Error: An error occurred during processing. Check your file format and data.
In production, the SFTP is polled approximately once per hour, so allow that time before expecting a status change.
You can monitor these status changes on the SFTP to track the progress of your uploads.
This guide will ensure you can securely transfer your files to the appropriate destination without any issues.
5. CSV Format Requirementsβ
Critical formatting rules that must be followed:
| Requirement | Details |
|---|---|
| Delimiter | Semicolon (;) β NOT comma, NOT tab |
| Encoding | UTF-8 (recommended) or ANSI |
| Header row | Must be present as the first line (it is skipped during processing) |
| Empty optional fields | Leave the value empty between semicolons (e.g., value1;;value3) |
| Multi-value fields | Use pipe (|) as separator (e.g., email1@test.com|email2@test.com) |
| Decimal numbers | Both dot (.) and comma (,) are accepted as decimal separators |
| Date format | dd/MM/yyyy (e.g., 14/04/2026) |
| Boolean fields | 1 = True, 0 = False |
| Line endings | Both Windows (CRLF) and Unix (LF) are accepted |
| Quoting | Optional β values may be enclosed in double quotes ("value") |
| Markets fields | ALL and N/A are accepted as shortcuts and are exported as empty (= all markets / no exclusions) |
| Coordinates | Use a single decimal separator. 36.500832 and 36,500832 are valid; 36.500,832 is not |
| Empty rows | Rows with only delimiters (;;;;;) are not ignored β delete them before uploading |