> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hudhud.sa/llms.txt
> Use this file to discover all available pages before exploring further.

# Evaluate Fleet Placement

> Measures how well a fleet of bases covers an area within a travel time limit, using travel times on the road network at the departure time.

Returns every H3 resolution 8 cell in the area and every demand point with its fastest base and how many bases reach it, and the demand weight reached.

The contract may change before general availability.

## Retryable errors

Retry these errors with exponential backoff and jitter:

- `500`, `503`, and `504`.
- `429` with the code `rate_limit_exceeded`. Wait the number of seconds in the `Retry-After` header.

Do not retry other errors, which fail again unchanged. A `429` with the code `daily_limit_exceeded` succeeds after the limit resets at 00:00 UTC; one with `trial_limit_reached` does not succeed again.


> [!WARNING]
>
> This API is experimental and currently in alpha. The request and response contract may change before general availability.

> [!TIP]
>
> Try it without writing code in the [Fleet Placement playground](https://console.developers.hudhud.sa/playground/fleet-placement) in the developer console. Draw your area, place your bases, and see who you reach in time.

![The Fleet Placement playground with six bases in central Riyadh, hexagons colored by travel time to the nearest base, and the reached weight](https://mintcdn.com/hudhud/ExtkT7l51RE47x5w/images/fleet-placement-playground.jpg?fit=max\&auto=format\&n=ExtkT7l51RE47x5w\&q=85\&s=1a6578cf3ddd4af234004c4269d7a9d1)

Six bases in central Riyadh reach 58.2% of 1.52 million people within 10 minutes at 08:00.

Use Fleet Placement to see who your bases reach within a travel time limit, and where you miss.

A base is where your vehicles leave from, such as an ambulance station, a delivery hub, or a service depot. Each base drives as a car or a motorcycle.

Send the area you serve as a GeoJSON polygon, the travel time limit, and when your vehicles leave. Travel times follow the road network with the traffic expected for that day and time.

Add demand to measure what matters to you. Demand is a list of places, each with a weight, such as people, emergency calls, or orders.

The response covers the area in H3 resolution 8 cells, about 0.74 km² each. Every cell and every demand point comes back with its fastest base, its travel time, and how many bases reach it in time. The summary adds up the demand weight reached.

Each request can include up to 50 bases and 20,000 demand points, and an area of up to 20,000 cells. The travel time limit is between 1 and 120 minutes.

Usage is the number of bases times the number of demand points in each request. A request with 6 bases and 336 demand points counts as 2,016. Without demand, usage is the number of bases.


## OpenAPI

````yaml POST /routing/fleet_placement/evaluate
openapi: 3.1.0
info:
  description: >-
    Hudhud Maps provides the most accurate, real-time mapping data for the
    Kingdom of Saudi Arabia.
  title: Next-Generation Geospatial Intelligence for Saudi Arabia
  version: '1.0'
servers:
  - description: Production
    url: https://b.hudhud.sa/v1
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /routing/fleet_placement/evaluate:
    post:
      tags:
        - Fleet Placement
      summary: Evaluate Fleet Placement (Alpha)
      description: >
        Measures how well a fleet of bases covers an area within a travel time
        limit, using travel times on the road network at the departure time.


        Returns every H3 resolution 8 cell in the area and every demand point
        with its fastest base and how many bases reach it, and the demand weight
        reached.


        The contract may change before general availability.


        ## Retryable errors


        Retry these errors with exponential backoff and jitter:


        - `500`, `503`, and `504`.

        - `429` with the code `rate_limit_exceeded`. Wait the number of seconds
        in the `Retry-After` header.


        Do not retry other errors, which fail again unchanged. A `429` with the
        code `daily_limit_exceeded` succeeds after the limit resets at 00:00
        UTC; one with `trial_limit_reached` does not succeed again.
      operationId: EvaluateFleetPlacement
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluateFleetPlacementRequest'
              summary: request
              description: Bases, departure time, travel time limit, area and demand
        description: Bases, departure time, travel time limit, area and demand
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-EvaluateFleetPlacementResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-any'
          description: Invalid request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-any'
          description: Missing or invalid API key
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-any'
          description: API key type is not secret
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-any'
          description: Rate limit, daily usage limit, or trial request limit exceeded
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-any'
          description: Internal server error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-any'
          description: Fleet placement service unavailable
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response-any'
          description: Fleet placement evaluation timed out
      security:
        - BearerAuth: []
components:
  schemas:
    EvaluateFleetPlacementRequest:
      properties:
        model:
          $ref: '#/components/schemas/CoverageModel'
      required:
        - model
      type: object
    Response-EvaluateFleetPlacementResponse:
      properties:
        code:
          description: Error code, present on 429 responses to tell the limits apart
          example: ''
          type: string
        data:
          $ref: '#/components/schemas/EvaluateFleetPlacementResponse'
        error:
          description: Error message (only present when ok is false)
          example: ''
          type: string
        ok:
          description: Whether the request was successful
          example: true
          type: boolean
      type: object
    Response-any:
      properties:
        code:
          description: Error code, present on 429 responses to tell the limits apart
          example: ''
          type: string
        data:
          description: Response payload
        error:
          description: Error message (only present when ok is false)
          example: ''
          type: string
        ok:
          description: Whether the request was successful
          example: true
          type: boolean
      type: object
    CoverageModel:
      properties:
        area:
          type: object
        bases:
          items:
            $ref: '#/components/schemas/CoverageBase'
          type: array
          uniqueItems: false
        demand:
          $ref: '#/components/schemas/CoverageDemand'
        departure_time:
          example: '2026-11-01T14:30:00Z'
          type: string
        max_travel_duration_seconds:
          example: 900
          type: integer
      required:
        - area
        - bases
        - departure_time
        - max_travel_duration_seconds
      type: object
    EvaluateFleetPlacementResponse:
      description: Response payload
      properties:
        cells:
          items:
            $ref: '#/components/schemas/CoverageCell'
          type: array
          uniqueItems: false
        points:
          items:
            $ref: '#/components/schemas/CoveragePoint'
          type: array
          uniqueItems: false
        summary:
          $ref: '#/components/schemas/CoverageSummary'
      type: object
    CoverageBase:
      properties:
        id:
          example: station-1
          type: string
        location:
          $ref: '#/components/schemas/GeoPoint'
        routing_profile:
          $ref: '#/components/schemas/FleetPlacementRoutingProfile'
      required:
        - id
        - location
        - routing_profile
      type: object
    CoverageDemand:
      properties:
        points:
          items:
            $ref: '#/components/schemas/CoverageDemandPoint'
          type: array
          uniqueItems: false
      type: object
    CoverageCell:
      properties:
        covering_base_count:
          type: integer
        h3_cell:
          example: 8853add715fffff
          type: string
        nearest_bases:
          items:
            $ref: '#/components/schemas/CoverageBaseTravel'
          type: array
          uniqueItems: false
        weight:
          type: number
      type: object
    CoveragePoint:
      properties:
        covering_base_count:
          type: integer
        nearest_bases:
          items:
            $ref: '#/components/schemas/CoverageBaseTravel'
          type: array
          uniqueItems: false
      type: object
    CoverageSummary:
      properties:
        reached_weight:
          type: number
        total_weight:
          type: number
      type: object
    GeoPoint:
      description: A geographic coordinate in WGS84 decimal degrees
      properties:
        lat:
          example: 24.7136
          format: double
          type: number
        lon:
          example: 46.6753
          format: double
          type: number
      required:
        - lat
        - lon
      type: object
    FleetPlacementRoutingProfile:
      enum:
        - car
        - motorcycle
      example: car
      type: string
      x-enum-varnames:
        - FleetPlacementRoutingProfileCar
        - FleetPlacementRoutingProfileMotorcycle
    CoverageDemandPoint:
      properties:
        location:
          $ref: '#/components/schemas/GeoPoint'
        weight:
          example: 1
          type: number
      required:
        - location
      type: object
    CoverageBaseTravel:
      properties:
        base_id:
          example: station-1
          type: string
        travel_duration_seconds:
          example: 420
          type: number
      type: object
  securitySchemes:
    BearerAuth:
      description: >-
        JWT Bearer token for authentication. Example: "Bearer
        YOUR_API_TOKEN_HERE"
      in: header
      name: Authorization
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.