• Home
  • Guides
  • Reference
  • Support

    Show / Hide Table of Contents
    • API Overview
      • Overview
      • Authentication
      • Retrieving API Results
      • Referenced vs Inline Entities
      • Choosing API Response Data
      • Handling API Errors
    • separator
    • Vehicle Routing Endpoints
      • Path
    • Optimization Endpoints
      • Instantiate
      • Build
      • Assignment Restrictions
      • Optimize
      • Sequence
      • Evaluate
      • Recommend
      • Insert
      • Centroids
      • Zones
      • Consolidate By Job Restrictions
      • Consolidate By Route Assignments
    • Geocoding Endpoints
      • Geocode
      • Reverse Geocode
    • Task Endpoints
      • List
      • Status
      • Result
      • Cancel
    • Sandbox Endpoints
      • List
      • Create
      • Rename
      • Retrieve
      • Update
      • Delete
      • Revisions
      • Add Revision
      • Expiry
      • Permissions
    • Verizon Connect Fleet Integration Endpoints
      • Pull Platform Data
      • Sync Platform Data
      • List Platform Territories
    • Other Endpoints
      • Canonicalize
      • Route Cards
      • Validate
      • Version
    • separator
    • Request Types
      • problem
      • capacity_metric
      • depot
      • driver
      • driver_break
      • job
      • job_template
      • job_type
      • load_amount
      • marker
      • problem_defaults
      • route
      • schedule
      • settings
      • shift
      • shift_override
      • shift_pattern
      • shift_pattern_assignment
      • stop
      • vehicle
      • zone
      • variance
    • Response Types
      • instantiate_response
      • problem_response
      • problem_aggregates
      • driver_response
      • geocoded_location
      • recommend_option
      • route_response
      • schedule_response
      • schedule_instantiate_response
      • stop_response
      • violation
    • Meta Types
      • task_redirect_response
      • task_status_response
      • validate_response
    • Sandbox Types
      • delta
      • array_delta
      • dict_delta
      • keyed_array_delta
      • object_delta
      • set_delta
      • revision
      • revision_created_response
      • revision_response
      • sandbox_response
    • Common Types
      • date_range
      • day_of_week
      • hazmat_load_type
      • id
      • latlon
      • stop_type
      • time_window
      • custom
      • polygon
    • Primitive Types
      • boolean
      • date
      • datetime
      • float
      • integer
      • string
      • timespan

    object_delta

    An object_delta is a type of delta that assigns all fields to the target object, ignoring any control fields (any field with a name prefixed with $).

    Name Type Description
    $collection string Optional. Must be "object" for an object delta. Defaults to object.
    $create boolean Optional. Defaults to true. If the delta is attempting to modify a non-existent object, create it first.
    $path string Required on top-level deltas. The JSON path to modify. See Paths for a list of valid paths.

    Any field that does not start with a $ character is assigned to the target object.

    If the field value is a JSON object, the field is applied as a subdelta. This subdelta may be a different type of delta. This allows an object_delta to represent a recursive tree of deltas to apply to an object tree.

    Otherwise, the field value is copied to the target object.

    Examples

    A revision modifying the settings on a problem file using an object_delta:

    {
      "deltas": [{
        "$path": [],
        "settings": {
          time_windows_as_hard_constraint: false,
        },
      }]
    }
    

    A revision modifying two routes using an object_delta:

    {
      "deltas": [{
        "$path": ["route"],
        "$collection": "keyed_array",
        "ids": ["route0", "route1"],
        "assign": {
          "vehicle_type": "truck",
          "driving_speed_percentage": null, // unset this field
          "start_location": {
            // Implicit "$collection": "object" means this will perform an assignment,
            // and any existing fields on this object will be preserved
            "location": "43.21,-172.34",
          },
        },
      }]
    }
    

    See Also

    • delta.
    • Sandboxes.