Why is it Necessary to Configure the File Export from Opera?
In order to send guest data through the SES Hospedajes portal, Civitfun must first collect the information. Since Opera encrypts certain data and we cannot access them via API, it is necessary to configure the daily creation of file exports that will be stored on your SFTP. This way, Civitfun, by having access to your SFTP, will be able to retrieve the data and send it to SES Hospedajes.
Which Fields and in What Order Should I Include Them in the File Export?
Below are the fields that must be included in the file export (considering the space for field one or two). It is crucial that the fields follow the specified order, and that each line in the file corresponds to a single guest (you can find an example at the end of this article).
The file export must be generated daily for each hotel and saved in a format that matches the configuration established in the Traveler Registration section. If you manage multiple hotels with the same SFTP, we recommend creating a separate directory for each one.
For guest data in the fields “Document Type,” “Gender,” “Payment Type,” and “Relationship Between Travelers,” you must use the specific codes detailed later in this article.
Required Format for Specific Fields
Some fields must be submitted in specific formats to be correctly processed by the corresponding authorities. Below are the requirements:
Nationality
- ISO 2 code (e.g.,
ESfor Spain) - ISO 3 code (e.g.,
ESPfor Spain)
Municipality Code
Technical note: Even if you visually see the municipality name, only the municipality code is sent in the actual data.
Required format by recipient:
- SES and Ertzaintza: INE code with 5 digits
- Mossos d’Esquadra: INE code with 6 digits
If you have questions about how to obtain or verify these codes, we recommend checking the official INE tables.
Dates
Needed ISO-8601 that is the international standard for representing dates and times in a clear and machine-readable format.
Recommended format (date):YYYY-MM-DD → Year-Month-Day, always with leading zeros.
Example:
2025-03-07(March 7, 2025)
Date and time (if applicable):YYYY-MM-DDThh:mm:ss with the separator T
Example without time zone:
2025-03-07T14:35:00Example UTC (Zulu):
2025-03-07T14:35:00ZExample with local time zone:
2025-03-07T14:35:00+01:00
Key rules:
Always 4 digits for the year, 2 for month and day (leading zeros required).
Use hyphens (
-) for dates and colons (:) for times.Use 24-hour time format.
If including a time zone, use
Z(UTC) or an offset like±hh:mm.
What NOT to send:
07/03/2025,07-03-25,03/07/25(ambiguous or short)Month names:
7 Mar 2025Dates without
T:2025-03-07 14:35:00(should useT)
Quick conversion (Spain):
-
From
dd/mm/yyyy→yyyy-mm-dd07/03/2025→2025-03-07
Best practices for SES/Traveler Registry:
Use only
YYYY-MM-DDwhen the field expects a date.If the system requires date and time, include the time zone (
Zor±hh:mm) to avoid discrepancies.Validate length and format before sending (e.g., regex:
^\d{4}-\d{2}-\d{2}$).
Valid examples for submission:
Check-in date:
2025-11-14Check-out date:
2025-11-17Generation timestamp (UTC):
2025-11-14T05:11:45Z
Definition of Report Columns
| COLUMN | FIELD IN OPERA |
|---|---|
| CodigoEstablecimiento | Property code |
| Referencia | confirmation number |
| Fechacontrato | reservation insert date |
| Fechaentrada | reservation begin date |
| fechasalida | reservation end date |
| numpersonas | persons |
| numHabitaciones | room qty |
| internet | always true |
| rol | direct guest: VI, Indirect guest: TI |
| nombre | reservation guest name |
| apellido1 | last name |
| apellido2 | maternal last name |
| tipodocumento | id type |
| NumeroDocumento | id number |
| SoporteDocumento | id number for support type |
| FechaNacimiento | birthday date |
| Nacionalidad | nationality |
| Sexo | gender |
| Direccion | address1 |
| Tefelono | phone |
| Telefono2 | mobile phone |
| Correo | email address |
| Parentesco | relationship |
Document Type Codes
| Description | Code |
|---|---|
| Tax Identification Number | NIF |
| Foreigner Identification Number | NIE |
| Passport Number | PAS |
| Other | OTRO |
Gender Codes
| Description | Code |
|---|---|
| Male | H |
| Female | M |
| Other | O |
Payment Type Codes
| Description | Code |
|---|---|
| Cash | EFECT |
| Credit Card | TARJT |
| Payment Platform | PLATF |
| Bank Transfer | TRANS |
| Mobile Payment | MOVIL |
| Gift Card | TREG |
| Pay at Destination | DESTI |
| Other Payment Methods | OTRO |
Relationship Between Travelers Codes
| Description | Code |
|---|---|
| Grandparent | AB |
| Great-grandparent | BA |
| Great-grandchild | BN |
| Brother/Sister-in-law | CD |
| Spouse | CY |
| Child | HJ |
| Sibling | HR |
| Grandchild | NI |
| Parent | PM |
| Nephew/Niece | SB |
| Father/Mother-in-law | SG |
| Uncle/Aunt | TI |
| Son/Daughter-in-law | YN |
| Guardian | TU |
| Other | OT |
When Should the File Export Be Generated?
At Civitfun, we send data to SES Hospedajes from 3:00 AM, so it is essential that the file is available on the SFTP by that time. We recommend scheduling the Opera file export generation at 1:00 AM to ensure it is correctly sent. You can also, force submission once you have the file on the SFTP
XML Example of File Export
We hope this article was helpful! If you need more information, contact us at support@civitfun.com — we’ll be happy to help. 😊✍️