• 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

    custom

    The custom type is a plain JSON object with user-defined fields and string values. They are returned unmodified on the appropriate response object, and have no effect on optimization. The custom field exists on all top-level request objects, as well as many subobjects, such as route, job, and geocode_request_address.

    {
      "user-defined-field-a": "value-a",
      "another-custom-field": "a string value",
      "externalId": "000784123"
    }
    

    Example

    For example, sending the following evaluate request to RouteCloud:

    {
      "custom": {
        "save_name": "Evaluate Example 24",
        "last_modified": "2017-04-17T08:24:12.19"
      },
      "routes": [
        {
          "id": "route0_with_custom_fields",
          "depot": {
            "id": "depot0_with_custom_fields",
            "location": "39.718005, -104.969531",
            "custom": {
              "backend_id": "D0005",
              "last_modified": "2017-04-17T08:20:11.14",
              "last_evaluated": "2017-04-17T08:20:11.19"
            }
          },
          "custom": {
            "backend_id": "R0024",
            "last_modified": "2017-04-17T08:24:14.45",
            "last_evaluated": "2017-04-17T08:24:12.18"
          },
          "jobs": [
            { "id": "job0", "location": "39.635928, -105.049219", custom: { "backend_id": "4563456" } },
            { "id": "job1", "location": "39.725375, -104.791080", custom: { "backend_id": "4563182" } },
            { "id": "job2", "location": "39.708990, -105.026954", custom: { } },
            { "id": "job3", "location": "39.653975, -105.093750" }
          ]
        }
      ]
    }
    

    Yields the following response:

    {
      "routes": [{
          "id": "route0_with_custom_fields", ...
          "stops": [{
              "id": "depot0_with_custom_fields", "type": "depot", ...
              "custom": { "backend_id": "D0005", "last_modified": "2017-04-17T08:20:11.14", "last_evaluated": "2017-04-17T08:20:11.19" }
            }, {
              "id": "job0", "type": "job", ...
              "custom": { "backend_id": "4563456" }
            }, {
              "id": "job1", "type": "job", ...
              "custom": { "backend_id": "4563182" }
            },
            {
              "id": "job2", "type": "job", ...
              "custom": {}
            },
            {
              "id": "job3", "type": "job", ...
            },
            {
              "id": "depot0_with_custom_fields", "type": "depot", ...
              "custom": { "backend_id": "D0005", "last_modified": "2017-04-17T08:20:11.14", "last_evaluated": "2017-04-17T08:20:11.19" }
            }
          ],
          "custom": { "backend_id": "R0024", "last_modified": "2017-04-17T08:24:14.45", "last_evaluated": "2017-04-17T08:24:12.18" }
        }
      ],
      "custom": { "save_name": "Evaluate Example 24", "last_modified": "2017-04-17T08:24:12.19" }
    }
    

    See Also

    • On top level objects, as in the build.custom, evaluate.custom, and sequence.custom.
    • On other objects, as in the route.custom, job.custom, and depot.custom fields.