---
title: "Evaluate dynamic dispatch"
method: POST
path: "/v1/dispatch/evaluate"
tags: ["Dispatch Strategies"]
---

# Evaluate dynamic dispatch

`POST /v1/dispatch/evaluate`

## Request

- Base URL: `https://api.sandbox.usenash.com`
- URL: `https://api.sandbox.usenash.com/v1/dispatch/evaluate`
- Auth: none declared

Evaluate dispatch rules and rank providers without creating a job or order.

## Request body

- EvaluateDispatchInput
  - `pickupAddress` string, nullable: The full pickup address in one line. Will be geocoded to lat/lng if pickupLat/pickupLng not provided.
  - `pickupLat` number, nullable: The pickup latitude coordinate.
  - `pickupLng` number, nullable: The pickup longitude coordinate.
  - `pickupAddressCity` string, nullable: The city of the pickup address.
  - `pickupAddressState` string, nullable: The state of the pickup address.
  - `pickupAddressZip` string, nullable: The zip or postal code of the pickup address.
  - `pickupAddressCountry` string, nullable: The ISO 3166-1 alpha-2 country code of the pickup address.
  - `pickupBusinessName` string, nullable: Pickup business name.
  - `dropoffAddress` string, nullable: The full dropoff address in one line. Will be geocoded to lat/lng if dropoffLat/dropoffLng not provided.
  - `dropoffLat` number, nullable: The dropoff latitude coordinate.
  - `dropoffLng` number, nullable: The dropoff longitude coordinate.
  - `dropoffAddressCity` string, nullable: The city of the dropoff address.
  - `dropoffAddressState` string, nullable: The state of the dropoff address.
  - `dropoffAddressZip` string, nullable: The zip or postal code of the dropoff address.
  - `dropoffAddressCountry` string, nullable: The ISO 3166-1 alpha-2 country code of the dropoff address.
  - `dropoffBusinessName` string, nullable: Dropoff business name.
  - `quotes` DispatchQuoteInput[], required
    - `providerId` string, required
    - `totalPriceCents` integer, required
  - `context` DispatchRuleContextInput
    - `packageValueCents` integer, nullable
    - `itemsCount` integer, nullable
    - `pickupTime` string, nullable
    - `dropoffTime` string, nullable
    - `drivingDistance` number, nullable
    - `tags` string[], nullable
    - `metadata` object, nullable
    - `pickupStoreLocationId` string, nullable
    - `dropoffStoreLocationId` string, nullable
    - `packageHeight` number, nullable
    - `packageWidth` number, nullable
    - `packageDepth` number, nullable
    - `packageWeight` number, nullable
    - `totalWeight` number, nullable
    - `packageRequirements` string[], nullable
    - `packageDeliveryMode` string, nullable
    - `packageTipCents` integer, nullable
    - `numberOfPackages` integer
    - `isBatch` boolean
  - `optionsGroupId` string, nullable: If provided, skip dispatch rule evaluation and use this options group directly.

## Response `200`

OK

- EvaluateDispatchOutput
  - `dispatchRule` DispatchRuleResult
    - `matchedRuleId` string, nullable
    - `matchedRuleLabel` string, nullable
    - `matchedRuleCondition` string, nullable
    - `optionsGroupId` string, nullable
    - `optionsGroupLabel` string, nullable
  - `rankedProviders` RankedProvider[], required
    - `providerId` string, required
    - `parentProviderId` string, required
    - `providerName` string, required
    - `probability` number, required
    - `rank` integer, required
  - `strategy` string, nullable

## Other responses

- `422`: Unprocessable Content

---

[API](https://skmtc.dev/nash/apis/nash-api.md) - [All operations](https://skmtc.dev/nash/apis/nash-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nash/apis/nash-api/revisions/e3713837c5c9?raw)
