---
title: "Create deliveries in bulk"
method: POST
path: "/deliveries/bulk"
tags: ["deliveries"]
---

# Create deliveries in bulk

`POST /deliveries/bulk`

## Request

- Base URL: `https://api.vepathos.com`
- URL: `https://api.vepathos.com/deliveries/bulk`
- Auth: API key in header `Authorization`

Accepts a JSON array of deliveries, or an object with a `deliveries` array. Every row is validated on its own: valid rows are created and listed in `success`, invalid rows are reported in `failure` with their index and errors.

Bulk rows may send `lat` and `lng` instead of `destination`, and time windows as `{ "start": "...", "end": "..." }` ISO timestamps. Schedule entries that cannot be parsed are dropped from the row.

## Request body

- union
  - DeliveryCreate[]
    - `destination` string, required: Stop location. Coordinates in ISO 6709 decimal degrees, latitude then longitude with signs, e.g. `+40.7128-74.0060`.
    - `method` 'DELIVERY' | 'PICKUP' | 'SIGNATURE'
    - `schedules` string[], nullable: Time windows. RFC 5545 VEVENT: `DTSTART` plus `DTEND` or `DURATION`, optionally `RRULE`. Join lines with `\n`.
    - `width` integer, nullable: Package width, in `length_unit`. Integer.
    - `height` integer, nullable: Package height, in `length_unit`. Integer.
    - `depth` integer, nullable: Package depth, in `length_unit`. Integer.
    - `length_unit` 'CENTIMETER' | 'METER' | 'KILOMETER' | 'INCH' | 'FEET' | 'MILE'
    - `volume` integer, nullable: Package volume, in `volume_unit`. Integer.
    - `volume_unit` 'CUBIC_CENTIMETER' | 'CUBIC_METER' | 'LITER' | 'CUBIC_INCH' | 'CUBIC_FEET' | 'GALLON'
    - `weight` integer, nullable: Package weight, in `weight_unit`. Integer; use `GRAMS` for fractional kilograms.
    - `weight_unit` 'GRAMS' | 'KILOGRAMS' | 'OUNCES' | 'POUNDS'
    - `packaging` 'BOX' | 'ENVELOPE' | 'BAG' | 'CARTON' | 'PALLET' | 'SHRINK_WRAP'
    - `handling` SpecialHandling[], nullable
    - `value_cents` integer, nullable: Declared value in minor units (`5000` is 50.00).
    - `value_currency` string, nullable: ISO 4217 currency code.
    - `extra` unknown
    - `milestone_id` string, required: Milestone the package leaves from.
  - object
    - `deliveries` DeliveryCreate[], required
      - `destination` string, required: Stop location. Coordinates in ISO 6709 decimal degrees, latitude then longitude with signs, e.g. `+40.7128-74.0060`.
      - `method` 'DELIVERY' | 'PICKUP' | 'SIGNATURE'
      - `schedules` string[], nullable: Time windows. RFC 5545 VEVENT: `DTSTART` plus `DTEND` or `DURATION`, optionally `RRULE`. Join lines with `\n`.
      - `width` integer, nullable: Package width, in `length_unit`. Integer.
      - `height` integer, nullable: Package height, in `length_unit`. Integer.
      - `depth` integer, nullable: Package depth, in `length_unit`. Integer.
      - `length_unit` 'CENTIMETER' | 'METER' | 'KILOMETER' | 'INCH' | 'FEET' | 'MILE'
      - `volume` integer, nullable: Package volume, in `volume_unit`. Integer.
      - `volume_unit` 'CUBIC_CENTIMETER' | 'CUBIC_METER' | 'LITER' | 'CUBIC_INCH' | 'CUBIC_FEET' | 'GALLON'
      - `weight` integer, nullable: Package weight, in `weight_unit`. Integer; use `GRAMS` for fractional kilograms.
      - `weight_unit` 'GRAMS' | 'KILOGRAMS' | 'OUNCES' | 'POUNDS'
      - `packaging` 'BOX' | 'ENVELOPE' | 'BAG' | 'CARTON' | 'PALLET' | 'SHRINK_WRAP'
      - `handling` SpecialHandling[], nullable
      - `value_cents` integer, nullable: Declared value in minor units (`5000` is 50.00).
      - `value_currency` string, nullable: ISO 4217 currency code.
      - `extra` unknown
      - `milestone_id` string, required: Milestone the package leaves from.

## Response `200`

Per-row result of the batch.

- DeliveryBulkResponse
  - `success` Success[], required
    - `idx` integer, required
    - `id` string, required
  - `failure` Failure[], required
    - `idx` integer, required
    - `err` Error[], required
      - `msg` string, required
      - `inp` unknown, required
      - `loc` unknown[], required
        - unknown

## Other responses

- `401`: Missing, expired or invalid access token.
- `422`: The body or a parameter does not match the schema.

---

[API](https://skmtc.dev/vepathos/apis/vepathos-route-optimization-api.md) · [All operations](https://skmtc.dev/vepathos/apis/vepathos-route-optimization-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vepathos/apis/vepathos-route-optimization-api/revisions/00caa1ca62d9?raw)
