Itineraries (v2)

Create an itinerary

Runs the Setup step's rules, matches the place against the catalogue (free text stays valid; generation is name driven), files the draft row under the caller's trip (tripExternalId names one the caller may build on, else the place and dates match one, else a new trip is made) and answers its document. generate: true also starts the AI build, as the Generate button does; poll GET .../build until it is terminal. A free account at its trip limit with nothing matching gets the row without a trip and needs_trip_choice with the candidates; POST .../trip files it afterwards.

post/api/v2/itineraries

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v2/itineraries
  • Auth: HTTP bearer

Request body

generateboolean

Start the AI build at once.

tripExternalIdstring nullable

The trip to file the itinerary under.

destinationstring nullable required

Where the trip goes.

destinationIdinteger nullable
startDatestring nullable required

The day of arrival (Y-m-d).

endDatestring nullable required

The day of leaving (Y-m-d).

intensityLevelstring nullable required

relaxed, moderate or intense.

numAdultsinteger required

Adults travelling.

numSeniorsinteger

Must be at least 0. Must not be greater than 50.

numChildreninteger nullable

Children travelling.

childrenAgesinteger[]

One age per child.

interestsstring[]

Interests to weight the plan by.

categoriesstring[]

Must not be greater than 100 characters.

mustDostring nullable

Must not be greater than 2000 characters.

mustDoChipsstring[]

Must not be greater than 255 characters.

tripType'single_city' | 'multi_city'
quickStartTemplateIdinteger nullable

Example request

{
  "generate": true,
  "tripExternalId": "01J9X",
  "destination": "Lisbon, Portugal",
  "destinationId": 16,
  "startDate": "2026-11-10",
  "endDate": "2026-11-14",
  "intensityLevel": "moderate",
  "numAdults": 2,
  "numSeniors": 18,
  "numChildren": 1,
  "childrenAges": [
    7
  ],
  "interests": [
    "food",
    "museums"
  ],
  "categories": [
    "u"
  ],
  "mustDo": "w",
  "mustDoChips": [
    "p"
  ],
  "tripType": "multi_city",
  "stops": [
    {
      "destination": "n",
      "destination_id": 16,
      "nights": 22
    }
  ],
  "quickStartTemplateId": 16
}

Response

OR

Example response

{
  "external_id": "9c7e",
  "state": "draft",
  "inputs": {
    "destination": "Lisbon, Portugal"
  },
  "plan": {
    "days": []
  },
  "build": null,
  "can": {
    "edit": true,
    "generate": true
  },
  "edit_version": 0
}

Changes

No recorded changes to this operation across all 1 revision of this API.