Tour departurestour_departures
/api/v1/imports/tour_departuresUpsert: re-sending the same external_id updates the existing row.
Endpoints
- validatePOST /api/v1/imports/tour_departures/validate
- importPOST /api/v1/imports/tour_departures
- feedGET /api/v1/imports/tour_departures/records
- read_backGET /api/v1/imports/tour_departures/records/{external_id}
A new row must carry
title
Fields(9)
external_idstringsource primary key → ExternalReference
titlestringrequiredstarts_ondateends_ondatecurrencycurrencymax_capacityintegerinventory_stateenumOne of:
openclosed_directon_requestmin_not_metsold_outcancelleddepartedcompletednotesstringsupplier_external_idreferencethe operator we bought the seat from
References
supplier_external_id→ suppliers · matched by external_id, code · when missing skip
Reading it back
Once the agency works the record (confirms it, numbers the tickets, invoices it) this is what GET /api/v1/imports/{entity}/records/{external_id} answers, and what every webhook delivers. detail carries what only the agency can add after your push.
{
"entity": "tour_departures",
"external_id": "TOUR-DEPARTURE-1001",
"source_system": "crm",
"type": "TourDeparture",
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"created_at": "2026-03-14T09:30:00Z",
"updated_at": "2026-03-15T11:05:00Z",
"currency": "EUR",
"totals": {
"cost": "1100.0",
"sell": "1250.0"
},
"invoices": [
{
"id": "4b8e1f60-7c2d-4e9a-b3f5-0a6d2c9e8b71",
"number": "LYD2026000000117",
"status": "issued",
"currency": "EUR",
"total": "1250.0",
"balance": "1250.0"
}
],
"detail": {
"title": "Cappadocia Highlights",
"inventory_state": "open",
"starts_on": "2026-03-14",
"ends_on": "2026-03-18",
"max_capacity": 24,
"supplier": "Lovelace Travel Partners"
}
}Request · dry run, every field
curl -X POST 'https://YOUR-CELL.lydira.com/api/v1/imports/tour_departures/validate' \
-H 'Authorization: Bearer sek_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 8f14e45f-ea2c-4f33-9a3b-6d0c1b7e5a90' \
-d '{
"source_system": "crm",
"rows": [
{
"external_id": "TOUR-DEPARTURE-1001",
"title": "Cappadocia Highlights",
"starts_on": "2026-03-14",
"ends_on": "2026-03-18",
"currency": "EUR",
"max_capacity": 2,
"inventory_state": "open",
"notes": "Imported from the source system.",
"supplier_external_id": "SUPPLIER-1001"
}
]
}'{
"import": {
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"entity": "tour_departures",
"source_system": "crm",
"status": "ready",
"company_id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"stats": {
"total": 1,
"will_create": 1,
"will_update": 0,
"created": 0,
"updated": 0,
"skipped": 0,
"invalid": 0,
"failed": 0,
"not_selected": 0
},
"error": null,
"created_at": "2026-03-14T09:30:00Z",
"links": {
"self": "/api/v1/imports/9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"rows": "/api/v1/imports/9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18/rows"
},
"mode": "validate",
"async": false,
"on_conflict": "skip",
"pricing": "apply_rules"
},
"ignored_fields": [],
"results": [
{
"row": 1,
"external_id": "TOUR-DEPARTURE-1001",
"status": "will_create"
}
]
}