Nash Delivery Windows API

Delivery Windows

OpenAPI Specification

nash-delivery-windows-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Nash AI Functions Delivery Windows API
  version: 1.0.0
  description: LLM-backed domain tools
servers:
- url: https://api.sandbox.usenash.com
  description: Sandbox API
- url: https://api.sandbox.ap-southeast-2.usenash.com
  description: Sandbox API (Australia)
- url: https://api.usenash.com
  description: Production API
- url: https://api.ap-southeast-2.usenash.com
  description: Production API (Australia)
tags:
- name: Delivery Windows
  description: Delivery Windows
  x-nash-topic: config
paths:
  /v1/delivery-window:
    post:
      tags:
      - Delivery Windows
      summary: Create a single delivery window
      description: Create a delivery window defining an available time slot for scheduled deliveries. Delivery windows are associated with a store location and have capacity limits.
      operationId: create_delivery_window_v1_delivery_window_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDeliveryWindowInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowOutput'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-window/{id}:
    get:
      tags:
      - Delivery Windows
      summary: Get a delivery window
      description: Retrieve a single delivery window by ID, including its time slot, capacity, and status.
      operationId: get_delivery_window_v1_delivery_window__string_id__get
      parameters:
      - name: id
        in: path
        description: The id of the delivery window
        required: true
        schema:
          title: Id
          type: string
          description: The id of the delivery window
          example: dlw_abc|10:00|12:00|2025-10-22
        example: dlw_abc|10:00|12:00|2025-10-22
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowOutput'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
    delete:
      tags:
      - Delivery Windows
      summary: Delete a delivery window
      description: Delete a delivery window by ID. Deleted windows can be restored using the restore endpoint.
      operationId: delete_delivery_window_v1_delivery_window__string_id__delete
      parameters:
      - name: id
        in: path
        description: The id of the delivery window
        required: true
        schema:
          title: Id
          type: string
          description: The id of the delivery window
          example: dlw_abc|10:00|12:00|2025-10-22
        example: dlw_abc|10:00|12:00|2025-10-22
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowOutput'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-window/{id}/disable:
    patch:
      tags:
      - Delivery Windows
      summary: Disable a delivery window
      description: Disable a delivery window so it is no longer available for new bookings. Existing bookings are not affected.
      operationId: disable_delivery_window_v1_delivery_window__string_id__disable_patch
      parameters:
      - name: id
        in: path
        description: The id of the delivery window
        required: true
        schema:
          title: Id
          type: string
          description: The id of the delivery window
          example: dlw_abc|10:00|12:00|2025-10-22
        example: dlw_abc|10:00|12:00|2025-10-22
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowOutput'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-window/{id}/enable:
    patch:
      tags:
      - Delivery Windows
      summary: Enable a delivery window
      description: Enable a previously disabled delivery window, making it available for booking.
      operationId: enable_delivery_window_v1_delivery_window__string_id__enable_patch
      parameters:
      - name: id
        in: path
        description: The id of the delivery window
        required: true
        schema:
          title: Id
          type: string
          description: The id of the delivery window
          example: dlw_abc|10:00|12:00|2025-10-22
        example: dlw_abc|10:00|12:00|2025-10-22
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowOutput'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-window/{id}/restore:
    patch:
      tags:
      - Delivery Windows
      summary: Restore a delivery window
      description: Restore a previously deleted delivery window, making it active again.
      operationId: restore_delivery_window_v1_delivery_window__string_id__restore_patch
      parameters:
      - name: id
        in: path
        description: The id of the delivery window
        required: true
        schema:
          title: Id
          type: string
          description: The id of the delivery window
          example: dlw_abc|10:00|12:00|2025-10-22
        example: dlw_abc|10:00|12:00|2025-10-22
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowOutput'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-windows:
    post:
      tags:
      - Delivery Windows
      summary: Create multiple delivery windows
      description: Create multiple delivery windows in a single request. Each window defines an available time slot with capacity for a store location.
      operationId: create_delivery_windows_v1_delivery_windows_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDeliveryWindowsInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowsResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
    delete:
      tags:
      - Delivery Windows
      summary: Delete multiple delivery windows
      description: Delete multiple delivery windows in a single request. Deleted windows can be restored using the restore endpoint.
      operationId: delete_delivery_windows_v1_delivery_windows_delete
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveryWindowsOperationInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowOutput'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
    patch:
      tags:
      - Delivery Windows
      summary: Update multiple delivery windows
      description: Update multiple existing delivery windows in a single request. Only provided fields are updated for each window.
      operationId: update_delivery_windows_v1_delivery_windows_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDeliveryWindowsInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowsResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-windows/disable:
    patch:
      tags:
      - Delivery Windows
      summary: Disable multiple delivery windows
      description: Disable multiple delivery windows in a single request so they are no longer available for new bookings.
      operationId: disable_delivery_windows_v1_delivery_windows_disable_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveryWindowsOperationInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowsResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-windows/enable:
    patch:
      tags:
      - Delivery Windows
      summary: Enable multiple delivery windows
      description: Enable multiple previously disabled delivery windows in a single request.
      operationId: enable_delivery_windows_v1_delivery_windows_enable_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveryWindowsOperationInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowsResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-windows/restore:
    patch:
      tags:
      - Delivery Windows
      summary: Restore multiple delivery windows
      description: Restore multiple previously deleted delivery windows in a single request.
      operationId: restore_delivery_windows_v1_delivery_windows_restore_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveryWindowsOperationInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowsResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/delivery-windows/upsert:
    post:
      tags:
      - Delivery Windows
      summary: Upsert multiple delivery windows
      description: Create or update multiple delivery windows in a single request. Existing windows are matched by ID for updates; new windows are created.
      operationId: upsert_delivery_windows_v1_delivery_windows_upsert_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDeliveryWindowsInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryWindowsResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/eligible_delivery_windows:
    get:
      tags:
      - Delivery Windows
      summary: Get eligible delivery windows for order
      description: Find delivery windows available for a specific order based on the order's store location and requirements. Requires either order_id or external_order_id. Optionally filter by time range and requested capacity.
      operationId: get_eligible_delivery_windows_v1_eligible_delivery_windows_get
      parameters:
      - name: orderId
        in: query
        description: The order for which to return eligible delivery windows.
        required: false
        schema:
          title: Orderid
          anyOf:
          - type: string
          - type: 'null'
          description: The order for which to return eligible delivery windows.
          default: null
          example: ord_1234567890
        example: ord_1234567890
      - name: externalOrderId
        in: query
        description: The external order id for which to return eligible delivery windows.
        required: false
        schema:
          title: Externalorderid
          anyOf:
          - type: string
          - type: 'null'
          description: The external order id for which to return eligible delivery windows.
          default: null
          example: ext_1234567890
        example: ext_1234567890
      - name: startTime
        in: query
        description: The range start for delivery windows.
        required: true
        schema:
          title: Starttime
          type: string
          description: The range start for delivery windows.
          format: date-time
          example: '2024-10-06T00:00:00Z'
        example: '2024-10-06T00:00:00Z'
      - name: endTime
        in: query
        description: The range end for delivery windows.
        required: true
        schema:
          title: Endtime
          type: string
          description: The range end for delivery windows.
          format: date-time
          example: '2024-10-07T00:00:00Z'
        example: '2024-10-07T00:00:00Z'
      - name: requestedCapacity
        in: query
        description: Optionally specify the requested capacity for the delivery windows.
        required: false
        schema:
          title: Requestedcapacity
          anyOf:
          - type: number
          - type: 'null'
          description: Optionally specify the requested capacity for the delivery windows.
          default: null
          example: 10.0
        example: 10.0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EligibleDeliveryWindowsResponse'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/order/external-identifier/{externalId}/delivery-window/book:
    post:
      tags:
      - Delivery Windows
      summary: Book a delivery window for order
      description: Reserve a delivery window for an order identified by external ID. The booking holds capacity in the window until confirmed or revoked.
      operationId: book_delivery_window_v1_order_external_identifier__string_externalId__delivery_window_book_post
      parameters:
      - name: externalId
        in: path
        description: The external id of the order to update
        required: true
        schema:
          title: Externalid
          type: string
          description: The external id of the order to update
          example: '1234567890'
        example: '1234567890'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BookDeliveryWindowInputSerializer'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderOutputExample'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/order/external-identifier/{externalId}/delivery-window/confirm:
    post:
      tags:
      - Delivery Windows
      summary: Confirm a delivery window for order
      description: Confirm a previously booked delivery window for an order. Finalizes the booking and commits the capacity reservation.
      operationId: confirm_delivery_window_v1_order_external_identifier__string_externalId__delivery_window_confirm_post
      parameters:
      - name: externalId
        in: path
        description: The external id of the order to update
        required: true
        schema:
          title: Externalid
          type: string
          description: The external id of the order to update
          example: '1234567890'
        example: '1234567890'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderOutputExample'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
  /v1/order/external-identifier/{externalId}/delivery-window/revoke:
    post:
      tags:
      - Delivery Windows
      summary: Revoke a delivery window for order
      description: Revoke a previously booked delivery window for an order. Releases the capacity reservation and disassociates the window from the order.
      operationId: revoke_delivery_window_v1_order_external_identifier__string_externalId__delivery_window_revoke_post
      parameters:
      - name: externalId
        in: path
        description: The external id of the order to update
        required: true
        schema:
          title: Externalid
          type: string
          description: The external id of the order to update
          example: '1234567890'
        example: '1234567890'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderOutputExample'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NashValidationError'
components:
  schemas:
    NashErrorDetails:
      title: NashErrorDetails
      required:
      - code
      - message
      type: object
      properties:
        code:
          title: Code
          type: string
        message:
          title: Message
          type: string
        details:
          title: Details
          anyOf:
          - type: object
            additionalProperties: true
          - type: 'null'
          default: null
    EligibleDeliveryWindow:
      title: EligibleDeliveryWindow
      required:
      - id
      - ineligibleReason
      - allowedTags
      - startTime
      - startTimeLocal
      - endTime
      - endTimeLocal
      type: object
      properties:
        id:
          title: Id
          type: string
          description: The id of the delivery window
        name:
          title: Name
          anyOf:
          - type: string
          - type: 'null'
          description: The name of the delivery window
          default: null
          example: S21
        ineligibleReason:
          title: Ineligiblereason
          anyOf:
          - type: string
          - type: 'null'
          description: The ineligibility failure reason
          example: Ineligible due to order tags
        allowedTags:
          title: Allowedtags
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: The list of allowed tags
          example: '[''rapid'', ''oversize'']'
        storeLocationId:
          title: Storelocationid
          anyOf:
          - type: string
          - type: 'null'
          description: The id of the store location object
          default: null
          example: stl_1234567890
        storeLocationExternalId:
          title: Storelocationexternalid
          anyOf:
          - type: string
          - type: 'null'
          description: The external id of the store location object, if applicable
          default: null
          example: '1001'
        zoneId:
          title: Zoneid
          anyOf:
          - type: string
          - type: 'null'
          description: The id of the zone object
          default: null
          example: zone_1234567890
        zoneExternalId:
          title: Zoneexternalid
          anyOf:
          - type: string
          - type: 'null'
          description: The external id of the zone object, if applicable
          default: null
          example: '1001'
        cutoffTime:
          title: Cutofftime
          anyOf:
          - type: string
          - type: 'null'
          description: The cutoff time of the delivery window in UTC
          example: '2024-10-04T00:00:00.000000'
        cutoffTimeLocal:
          title: Cutofftimelocal
          anyOf:
          - type: string
          - type: 'null'
          description: The cutoff time of the delivery window in local timezone
          example: '2024-10-04T00:00:00.000000'
        startTime:
          title: Starttime
          anyOf:
          - type: string
          - type: 'null'
          description: The start time of the delivery window in UTC
          example: '2024-10-06T00:00:00.000000'
        startTimeLocal:
          title: Starttimelocal
          anyOf:
          - type: string
          - type: 'null'
          description: The start time of the delivery window in local timezone
          example: '2024-10-06T00:00:00.000000'
        endTime:
          title: Endtime
          anyOf:
          - type: string
          - type: 'null'
          description: The end time of the delivery window in UTC
          example: '2024-10-07T00:00:00.000000'
        endTimeLocal:
          title: Endtimelocal
          anyOf:
          - type: string
          - type: 'null'
          description: The end time of the delivery window in local timezone
          example: '2024-10-07T00:00:00.000000'
        remainingCapacity:
          title: Remainingcapacity
          anyOf:
          - type: number
          - type: 'null'
          description: The remaining capacity for the delivery window
          default: null
          example: 10.0
        maximumCapacity:
          title: Maximumcapacity
          anyOf:
          - type: number
          - type: 'null'
          description: The maximum capacity for the delivery window
          default: null
          example: 10.0
        minimumOrderValueCents:
          title: Minimumordervaluecents
          anyOf:
          - type: integer
          - type: 'null'
          description: The minimum order value for the delivery window in cents
          default: null
          example: 1000
        timezoneId:
          title: Timezoneid
          anyOf:
          - type: string
          - type: 'null'
          description: The timezone id of the return timestamps, following the TZ database format
          default: null
          example: America/New_York
        priceCents:
          title: Pricecents
          anyOf:
          - type: integer
          - type: 'null'
          description: The price for the delivery window in cents
          default: null
          example: 1000
        score:
          title: Score
          anyOf:
          - type: number
          - type: 'null'
          description: The score for the delivery window
          default: null
          example: 1.0
        windowMetadata:
          title: Windowmetadata
          anyOf:
          - type: object
            additionalProperties: true
          - type: 'null'
          description: Key-value window metadata.
          default: null
          example:
            key: value
    ItemInput:
      title: ItemInput
      type: object
      properties:
        id:
          title: Id
          anyOf:
          - type: string
          - type: 'null'
          description: The merchant ID of the item
          default: null
          example: abc-123
        description:
          title: Description
          anyOf:
          - type: string
          - type: 'null'
          description: The description of the item
          default: null
          example: A box of books
        count:
          title: Count
          anyOf:
          - type: integer
          - type: 'null'
          description: The quantity of the item
          default: null
          example: 2
        dimensions:
          anyOf:
          - $ref: '#/components/schemas/Dimensions'
          - type: 'null'
          description: The dimensions of the item
          default: null
          example:
            depth: 14
            height: 10
            width: 12
        weight:
          title: Weight
          anyOf:
          - type: number
          - type: integer
          - type: 'null'
          description: The weight of the item in kilograms (kg)
          default: null
          example: 1.5
        valueCents:
          title: Valuecents
          anyOf:
          - type: integer
          - type: 'null'
          description: The value of the item in cents
          default: null
          example: 1000
        requirements:
          title: Requirements
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: List of requirements for this item
          default: null
          example:
          - age_verification_on_delivery
        category:
          title: Category
          anyOf:
          - type: string
          - type: 'null'
          description: The category of the item
          default: null
        barcode:
          title: Barcode
          anyOf:
          - type: string
          - type: 'null'
          description: Barcode value for this item.
          default: null
          example: 0199312650999998913643M221872801002010908
        metadata:
          title: Metadata
          anyOf:
          - type: object
            additionalProperties: true
          - type: 'null'
          description: Key-value data to attach to this item.
          default: null
          example:
            packaging_type: CTN
        subItems:
          title: Subitems
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/SubItemInput'
          - type: 'null'
          description: The nested sub-items
          default: null
      description: Item input object for API requests.
    DeliveryWindowsResponse:
      title: DeliveryWindowsResponse
      required:
      - deliveryWindows
      type: object
      properties:
        deliveryWindows:
          title: Deliverywindows
          type: array
          items:
            $ref: '#/components/schemas/DeliveryWindowOutput'
    QuoteSerializer:
      title: QuoteSerializer
      required:
      - id
      - providerId
      - providerName
      - createdTime
      - priceCents
      type: object
      properties:
        id:
          title: Id
          type: string
          description: Quote ID
          example: qot_01234567890
        type:
          title: Type
          anyOf:
          - type: string
          - type: 'null'
          description: Quote type
          default: null
        providerId:
          title: Providerid
          type: string
          description: Provider ID
          example: uber_standard_mini_mart
        providerName:
          title: Providername
          type: string
          description: Provider name
          example: Nash
        providerLogo:
          title: Providerlogo
          anyOf:
          - type: string
          - type: 'null'
          description: Provider logo
          default: null
          example: https://nash.com/logo.png
        providerIsInternal:
          title: Providerisinternal
          anyOf:
          - type: boolean
          - type: 'null'
          description: Is the provider internal
          default: null
        createdTime:
          title: Createdtime
          type: string
          description: Created time
          example: '2021-01-01T00:00:00Z'
        expireTime:
          title: Expiretime
          anyOf:
          - type: string
          - type: 'null'
          description: Expire time
          default: null
          example: '2021-01-01T00:00:00Z'
        priceCents:
          title: Pricecents
          type: integer
          description: Price in cents
          example: 1000
        taxAmountCents:
          title: Taxamountcents
          anyOf:
          - type: integer
          - type: 'null'
          description: Tax amount in cents
          default: null
          example: 100
        tollFeeCents:
          title: Tollfeecents
          anyOf:
          - type: integer
          - type: 'null'
          description: Toll fee in cents
          default: null
          example: 100
        nashFeeCents:
          title: Nashfeecents
          anyOf:
          - type: integer
          - type: 'null'
          description: Nash fee in cents
          default: null
          example: 100
        insuranceFeeCents:
          title: Insurancefeecents
          anyOf:
          - type: integer
          - type: 'null'
          description: Insurance fee in cents
          default: null
          example: 100
        currency:
          title: Currency
          anyOf:
          - type: string
          - type: 'null'
          description: Currency
          default: null
          example: USD
        pickupWindow:
          title: Pickupwindow
          anyOf:
          - type: string
          - type: 'null'
          description: Pickup window
          default: null
          example: '2021-01-01T00:00:00Z'
        dropoffEta:
          title: Dropoffeta
          anyOf:
          - type: string
          - type: 'null'
          description: Dropoff ETA
          default: null
          example: '2021-01-01T00:00:00Z'
        tags:
          title: Tags
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: Tags
          default: null
          example:
          - tag1
          - tag2
          - autodispatch_preferred_quote
        costSplitCustomerCents:
          title: Costsplitcustomercents
          anyOf:
          - type: integer
          - type: 'null'
          description: Cost split customer in cents
 

# --- truncated at 32 KB (81 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/nash/refs/heads/main/openapi/nash-delivery-windows-api-openapi.yml