> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapping.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure your export format for mapping results

> Set or retrieve the export format configuration that controls how Mapping.Travel structures and delivers hotel mapping results for your organization.

The export format configuration determines the structure, encoding, and field selection of mapping result files delivered to your organization. Each organization has a single active format configuration. You can create or replace it using the PUT endpoint at any time, and retrieve the current configuration with GET.

<Note>
  Both endpoints require authentication. Include your bearer token in the `Authorization` header.
</Note>

***

## PUT /api/v1/export-format

Create or replace your organization's export format configuration. If no configuration exists, one is created. If one already exists, it is fully replaced by the new values.

```bash theme={null} theme={null}
PUT https://api.mapping.travel/api/v1/export-format
Content-Type: application/json
```

### Request body

<ParamField body="format" type="string" required>
  Output file format. Accepted values: `json`, `csv`, `jsonl`.
</ParamField>

<ParamField body="includeFields" type="string[]">
  List of fields to include in the export. When omitted, all fields are included by default.
</ParamField>

<ParamField body="delimiter" type="string" default=",">
  Column delimiter for CSV exports. Ignored for JSON and JSONL formats.
</ParamField>

<ParamField body="includeHeader" type="boolean" default="true">
  Whether to include a header row in CSV exports.
</ParamField>

<ParamField body="compression" type="string">
  Optional compression for the export file. Accepted values: `gzip`, `none`. Defaults to `none`.
</ParamField>

### Response

Returns the saved configuration.

<ResponseField name="id" type="string" required>
  UUID of the format configuration.
</ResponseField>

<ResponseField name="format" type="string" required>
  The configured output format.
</ResponseField>

<ResponseField name="includeFields" type="string[]">
  Fields included in the export.
</ResponseField>

<ResponseField name="delimiter" type="string">
  CSV delimiter character.
</ResponseField>

<ResponseField name="includeHeader" type="boolean">
  Whether CSV exports include a header row.
</ResponseField>

<ResponseField name="compression" type="string">
  Compression applied to the export file.
</ResponseField>

<ResponseField name="updatedAt" type="string" required>
  ISO 8601 timestamp of the last update.
</ResponseField>

### Example

```bash theme={null} theme={null}
curl -X PUT https://api.mapping.travel/api/v1/export-format \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "jsonl",
    "compression": "gzip",
    "includeFields": ["referenceId", "supplierId", "supplierHotelId", "confidence"]
  }'
```

```json theme={null} theme={null}
{
  "id": "fmt-2c3d4e5f-0000-0000-0000-000000000001",
  "format": "jsonl",
  "includeFields": ["referenceId", "supplierId", "supplierHotelId", "confidence"],
  "compression": "gzip",
  "updatedAt": "2026-04-25T12:00:00Z"
}
```

***

## GET /api/v1/export-format

Retrieve your organization's current export format configuration.

```bash theme={null} theme={null}
GET https://api.mapping.travel/api/v1/export-format
```

### Response

Returns the current format configuration object if one has been set.

<ResponseField name="id" type="string" required>
  UUID of the format configuration.
</ResponseField>

<ResponseField name="format" type="string" required>
  Output file format (`json`, `csv`, or `jsonl`).
</ResponseField>

<ResponseField name="includeFields" type="string[]">
  Fields included in the export, if configured.
</ResponseField>

<ResponseField name="delimiter" type="string">
  CSV column delimiter.
</ResponseField>

<ResponseField name="includeHeader" type="boolean">
  Whether CSV exports include a header row.
</ResponseField>

<ResponseField name="compression" type="string">
  Compression type applied to export files.
</ResponseField>

<ResponseField name="updatedAt" type="string" required>
  ISO 8601 timestamp of the last configuration update.
</ResponseField>

### Errors

| Status          | Description                                                                                            |
| --------------- | ------------------------------------------------------------------------------------------------------ |
| `404 Not Found` | No export format configuration has been set for your organization. Use the PUT endpoint to create one. |

### Example

```bash theme={null} theme={null}
curl https://api.mapping.travel/api/v1/export-format \
  -H "Authorization: Bearer <token>"
```
