Docs
  • Solver
  • Models
    • Field Service Routing
    • Employee Shift Scheduling
    • Pick-up and Delivery Routing
  • Platform
Try models
  • Pick-up and Delivery Routing
  • User guide
  • Validation

Pick-up and Delivery Routing

    • Introduction
    • Getting started: Hello world
    • User guide
      • Terms
      • Planning AI concepts
      • Demo datasets
      • Validation
      • Routing with Timefold’s maps service
      • Metrics and optimization goals
    • Driver resource constraints
      • Lunch breaks and personal appointments
      • Route optimization
      • Shift hours and overtime
    • Job service constraints
      • Time windows and opening hours
      • Skills
      • Movable stops and multi-day schedules
      • Dependencies between stops
      • Priority stops and optional stops
      • Job requirements and tags
        • Job required drivers
        • Job pooling
        • Prohibit job combinations
        • Maximum time burden
        • Driver capacity
        • Tags
    • Changelog
    • Upgrading to the latest versions
    • Feature requests

Validation

Whenever you submit a dataset to Timefold through the API the input is validated and if there are issues, you will see the following depending on the type of validation issue:

  • Invalid JSON: The submitted JSON file is validated to make sure the JSON is valid according to the OpenAPI specification and can be processed by Timefold.

A POST call with an invalid JSON document will return a status 400 Bad Request. The response will include a message specifying the input JSON has an invalid format and details that will help you locate the issue with the JSON.

Solution: Fix the invalid JSON and resubmit the dataset.

  • Error: The JSON is valid according to the OpenAPI specification but the submitted dataset includes (or does not include) elements that need to be rectified before the dataset can be solved, including:

    1. A driver shift must have either a minStartTime or a minFirstStopArrivalTime.

    2. A driver shift must have a minStartTime before or equal to minFirstStopArrivalTime (when both are set).

    3. A driver shift itinerary contains a stop that is not found in the route plan.

    4. The list of jobs is empty.

    5. A job’s requiredDrivers references a non-existing driver.

    6. A stop’s time window does not have minStartTime less than the maxEndTime.

    7. A stop’s dependency must reference an existing preceding stop id.

Solution: Review the error message and update the dataset.

  • Warning: The JSON is valid according to the OpenAPI specification but the dataset:

    1. Uses a deprecated feature.

    2. Is missing some element that is necessary to successfully assign a visit, including:

      1. The list of drivers is empty.

      2. The list of driver shifts is empty.

      3. A job’s 'preferredDrivers' references a non-existing driver.

      4. A time window is too small for a stop.

      5. A job requires a skill that is not declared by any driver shift.

Solution: The dataset will be processed, but we recommend looking at the warnings and updating the dataset.

Next

  • See the full API spec or try the online API.

  • © 2025 Timefold BV
  • Timefold.ai
  • Documentation
  • Changelog
  • Send feedback
  • Privacy
  • Legal
    • Light mode
    • Dark mode
    • System default