---
title: List stops
description: List stops
url: /api/v0.2b/stops/listStops
---

# List stops

`GET /plans/{planId}/stops`

````yaml
openapi: 3.1.0
info:
  title: Spoke API
  version: v0.2b
servers:
  - url: https://api.spoke.com/public/v0.2b
security:
  - BasicAuth: []
paths:
  /plans/{planId}/stops:
    get:
      operationId: listStops
      summary: List stops
      tags:
        - Stops
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 255
          in: query
          name: pageToken
          required: false
          description: The page token, if any.
        - schema:
            default: 10
            type: number
            minimum: 1
            maximum: 10
          in: query
          name: maxPageSize
          required: false
          description: The max page size.
        - schema:
            type: object
            properties:
              externalId:
                description: Filter by the `recipient.externalId` field, exact match
                type: string
                minLength: 1
                maxLength: 255
            additionalProperties: false
          in: query
          name: filter
          required: false
          description: "The filter to apply to the list of stops. The filter params are passed like this: `?filter[externalId]=foo` or like this: `?filter.externalId=foo`"
        - schema:
            type: string
            pattern: ^[a-zA-Z0-9---_]{1,50}$
          in: path
          name: planId
          required: true
          description: The plan id
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  stops:
                    type: array
                    items:
                      $ref: "#/components/schemas/stopSchema"
                    description: The stops list.
                  nextPageToken:
                    description: The next page token.
                    type:
                      - "null"
                      - string
                required:
                  - stops
                  - nextPageToken
                definitions:
                  stopSchema:
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^plans\/[a-zA-Z0-9---_]{1,50}\/stops\/[a-zA-Z0-9---_]{1,50}$
                        description: The id of the stop, in the format `plans/<id>/stops/<id>`.
                      address:
                        type: object
                        properties:
                          address:
                            type: string
                            description: The address of the stop.
                          addressLineOne:
                            type: string
                            description: The first line of the address.
                          addressLineTwo:
                            type: string
                            description: The second line of the address.
                          latitude:
                            anyOf:
                              - type: number
                                minimum: -90
                                maximum: 90
                              - type: "null"
                            description: The latitude of the address in decimal degrees.
                          longitude:
                            anyOf:
                              - type: number
                                minimum: -180
                                maximum: 180
                              - type: "null"
                            description: The longitude of the address in decimal degrees.
                          placeId:
                            description: The identifier of the place corresponding to this stop on Google Places
                            type:
                              - "null"
                              - string
                          placeTypes:
                            type: array
                            items:
                              type: string
                            description: Array of strings that is provided by the Google AutoCompleteAPI
                        required:
                          - address
                          - addressLineOne
                          - addressLineTwo
                          - latitude
                          - longitude
                          - placeId
                          - placeTypes
                        additionalProperties: false
                        description: The address of the stop.
                      barcodes:
                        type: array
                        items:
                          type: string
                        description: List of Barcode IDs associated with the stop.
                      driverIdentifier:
                        description: The driver identifier. This field is deprecated, prefer using `allowedDriversIdentifiers`.
                        type:
                          - "null"
                          - string
                      allowedDriversIdentifiers:
                        type: array
                        items:
                          type: string
                        description: The allowed drivers that can be assigned to this stop, replaces the `driverIdentifier` field.
                      estimatedTravelDuration:
                        description: Estimated time that the driver will take to arrive at this stop from the previous stop in seconds.
                        type:
                          - "null"
                          - number
                      estimatedTravelDistance:
                        description: The distance in meters between the previous stop and this stop.
                        type:
                          - "null"
                          - number
                      notes:
                        description: Notes for the stop.
                        type:
                          - "null"
                          - string
                      packageCount:
                        description: The number of packages.
                        type:
                          - "null"
                          - number
                      weight:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                type: number
                                minimum: 0
                                description: The weight amount for this stop.
                              unit:
                                type: string
                                enum:
                                  - kilogram
                                  - pound
                                  - metric-ton
                                description: The weight unit in which the amount is specified (defined at team's capacity unit).
                            required:
                              - amount
                              - unit
                            additionalProperties: false
                            description: Weight information for the stop.
                          - type: "null"
                      type:
                        type: string
                        enum:
                          - start
                          - stop
                          - end
                        description: The type of the stop. `start` is the first stop of the route, `stop` is a stop in the middle of the route, and `end` is the last stop of the route.
                      packageLabel:
                        description: The label of the package.
                        type:
                          - "null"
                          - string
                      stopPosition:
                        description: The position of the stop in the route.
                        type:
                          - "null"
                          - number
                      trackingLink:
                        description: The recipient tracking link.
                        type:
                          - "null"
                          - string
                      webAppLink:
                        type: string
                        description: The web app link.
                      orderInfo:
                        type: object
                        properties:
                          products:
                            type: array
                            items:
                              type: string
                            description: The products of the stop.
                          sellerName:
                            description: Name of the seller where the order is from.
                            type:
                              - "null"
                              - string
                          sellerOrderId:
                            description: Id of the seller where the order is from.
                            type:
                              - "null"
                              - string
                          sellerWebsite:
                            description: Website of the seller where the order is from.
                            type:
                              - "null"
                              - string
                        required:
                          - products
                          - sellerName
                          - sellerOrderId
                          - sellerWebsite
                        additionalProperties: false
                        description: The order information of the stop.
                      placeInVehicle:
                        anyOf:
                          - type: object
                            properties:
                              x:
                                anyOf:
                                  - type: string
                                    enum:
                                      - left
                                      - right
                                  - type: "null"
                                description: The x position of the package.
                              y:
                                anyOf:
                                  - type: string
                                    enum:
                                      - front
                                      - back
                                      - middle
                                  - type: "null"
                                description: The y position of the package.
                              z:
                                anyOf:
                                  - type: string
                                    enum:
                                      - floor
                                      - shelf
                                  - type: "null"
                                description: The z position of the package.
                            required:
                              - x
                              - y
                              - z
                            additionalProperties: false
                            description: The position of the package in the vehicle.
                          - type: "null"
                      recipient:
                        type: object
                        properties:
                          name:
                            description: The name of the recipient.
                            type:
                              - "null"
                              - string
                          email:
                            description: The email of the recipient.
                            type:
                              - "null"
                              - string
                          phone:
                            description: The phone of the recipient.
                            type:
                              - "null"
                              - string
                          externalId:
                            description: The external id of the recipient.
                            type:
                              - "null"
                              - string
                        required:
                          - name
                          - email
                          - phone
                          - externalId
                        additionalProperties: false
                        description: The recipient of the stop.
                      activity:
                        default: delivery
                        type: string
                        enum:
                          - delivery
                          - pickup
                      deliveryInfo:
                        anyOf:
                          - type: object
                            properties:
                              attempted:
                                type: boolean
                                description: Whether the stop was attempted.
                              attemptedAt:
                                description: When the stop was attempted in seconds since epoch.
                                type:
                                  - number
                                  - "null"
                              arrivedAt:
                                description: When the driver arrived at the stop in seconds since epoch. This field is deprecated, prefer `timeAtStopInfo.arrivedAt`.
                                type:
                                  - number
                                  - "null"
                              timeAtStopInfo:
                                anyOf:
                                  - type: object
                                    properties:
                                      arrivedAt:
                                        description: When the driver arrived at the stop in seconds since epoch.
                                        type:
                                          - number
                                          - "null"
                                      departedAt:
                                        description: When the driver departed from the stop in seconds since epoch.
                                        type:
                                          - number
                                          - "null"
                                      isEstimated:
                                        description: Whether the time at stop was estimated rather than directly measured.
                                        type:
                                          - boolean
                                          - "null"
                                    required:
                                      - arrivedAt
                                      - departedAt
                                      - isEstimated
                                  - type: "null"
                                description: Grouped time-at-stop data.
                              timeAtStopInfoNullReason:
                                anyOf:
                                  - type: object
                                    properties:
                                      reason:
                                        type: string
                                        enum:
                                          - subscription_not_supported
                                      message:
                                        type: string
                                      url:
                                        type:
                                          - string
                                          - "null"
                                    required:
                                      - reason
                                      - message
                                      - url
                                  - type: "null"
                                description: Reason why time-at-stop data was not provided.
                              attemptedLocation:
                                anyOf:
                                  - type: object
                                    properties:
                                      latitude:
                                        type: number
                                        description: The latitude of the location.
                                      longitude:
                                        type: number
                                        description: The longitude of the location.
                                    required:
                                      - latitude
                                      - longitude
                                    additionalProperties: false
                                    description: A location.
                                  - type: "null"
                                description: Where the stop was attempted.
                              driverProvidedInternalNotes:
                                description: Internal notes provided by the driver.
                                type:
                                  - string
                                  - "null"
                              driverProvidedRecipientNotes:
                                description: Recipient notes provided by the driver.
                                type:
                                  - string
                                  - "null"
                              photoUrls:
                                type: array
                                items:
                                  type: string
                                description: URLs of proof of delivery photos.
                              recipientProvidedNotes:
                                description: Notes from recipient
                                type:
                                  - string
                                  - "null"
                              signatureUrl:
                                description: URL of the signature.
                                type:
                                  - string
                                  - "null"
                              signeeName:
                                description: Name of the signee.
                                type:
                                  - string
                                  - "null"
                              succeeded:
                                type: boolean
                                description: Whether the stop was succeeded.
                              state:
                                type: string
                                enum:
                                  - delivered_to_recipient
                                  - delivered_to_third_party
                                  - delivered_to_mailbox
                                  - delivered_to_safe_place
                                  - delivered_to_pickup_point
                                  - delivered_other
                                  - picked_up_from_customer
                                  - picked_up_unmanned
                                  - picked_up_from_locker
                                  - picked_up_other
                                  - failed_not_home
                                  - failed_cant_find_address
                                  - failed_no_parking
                                  - failed_no_time
                                  - failed_package_not_available
                                  - failed_other
                                  - failed_missing_required_proof
                                  - failed_payment_not_received
                                  - unattempted
                                description: The state of the delivery.
                            required:
                              - attempted
                              - attemptedAt
                              - arrivedAt
                              - timeAtStopInfo
                              - timeAtStopInfoNullReason
                              - attemptedLocation
                              - driverProvidedInternalNotes
                              - driverProvidedRecipientNotes
                              - photoUrls
                              - recipientProvidedNotes
                              - signatureUrl
                              - signeeName
                              - succeeded
                              - state
                            additionalProperties: false
                            description: The delivery information of the stop.
                          - type: "null"
                      paymentOnDelivery:
                        anyOf:
                          - type: object
                            properties:
                              amount:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: "null"
                                description: The amount *in minor units* (e.g. cents) to be collected upon delivery.
                              currency:
                                type: string
                                description: The payment's currency in ISO 4217 standard.
                            required:
                              - amount
                              - currency
                            additionalProperties: false
                            description: The payment due upon delivery also known as "Cash on Delivery".
                          - type: "null"
                      proofOfAttemptRequirements:
                        type: object
                        properties:
                          enabled:
                            description: Whether the proof of attempt is enabled.This only works if the team subscription has access to proof of delivery
                            type:
                              - "null"
                              - boolean
                        required:
                          - enabled
                        additionalProperties: false
                        description: The proof of attempt requirements of the stop.
                      plan:
                        type: string
                        pattern: ^plans\/[a-zA-Z0-9---_]{1,50}$
                        description: The id of the plan, in the format `plans/<id>`.
                      route:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                pattern: ^routes\/[a-zA-Z0-9---_]{1,50}$
                                description: The id of the route, in the format `routes/<id>`.
                              title:
                                type: string
                                description: The title of the route.
                              stopCount:
                                type: number
                                description: The number of stops in the route.
                              driver:
                                anyOf:
                                  - type: string
                                    pattern: ^drivers\/[a-zA-Z0-9---_]{1,50}$
                                  - type: "null"
                                description: The id of the driver.
                              state:
                                anyOf:
                                  - type: object
                                    properties:
                                      completed:
                                        type: boolean
                                        description: Whether the route is completed.
                                      completedAt:
                                        description: The timestamp the route was completed at.
                                        type:
                                          - number
                                          - "null"
                                      distributed:
                                        type: boolean
                                        description: Whether the route is distributed.
                                      distributedAt:
                                        description: The timestamp the route was distributed at.
                                        type:
                                          - number
                                          - "null"
                                      notifiedRecipients:
                                        type: boolean
                                        description: Whether the recipients were notified.
                                      notifiedRecipientsAt:
                                        description: The timestamp the recipients were notified at.
                                        type:
                                          - number
                                          - "null"
                                      started:
                                        type: boolean
                                        description: Whether the route is started.
                                      startedAt:
                                        description: The timestamp the route was started at.
                                        type:
                                          - number
                                          - "null"
                                    required:
                                      - completed
                                      - completedAt
                                      - distributed
                                      - distributedAt
                                      - notifiedRecipients
                                      - notifiedRecipientsAt
                                      - started
                                      - startedAt
                                    additionalProperties: false
                                    description: The state of a route.
                                  - type: "null"
                                description: The state of the route.
                              plan:
                                anyOf:
                                  - type: string
                                    pattern: ^plans\/[a-zA-Z0-9---_]{1,50}$
                                  - type: "null"
                                description: The id of the related plan.
                            required:
                              - id
                              - title
                              - stopCount
                              - driver
                              - state
                              - plan
                            additionalProperties: false
                            description: A route.
                          - type: "null"
                        description: The route of the stop, if any.
                      eta:
                        anyOf:
                          - type: object
                            properties:
                              estimatedArrivalAt:
                                type: number
                                description: The estimated time in seconds since epoch.
                              estimatedLatestArrivalAt:
                                type: number
                                description: The latest estimated time in seconds since epoch.
                              estimatedEarliestArrivalAt:
                                type: number
                                description: The earliest estimated time in seconds since epoch.
                            required:
                              - estimatedArrivalAt
                              - estimatedLatestArrivalAt
                              - estimatedEarliestArrivalAt
                            additionalProperties: false
                            description: The estimated time of arrival data of the stop.
                          - type: "null"
                      etaNullReason:
                        anyOf:
                          - type: object
                            properties:
                              reason:
                                type: string
                                enum:
                                  - not_optimized
                                  - subscription_not_supported
                              message:
                                type: string
                              url:
                                type:
                                  - string
                                  - "null"
                            required:
                              - reason
                              - message
                              - url
                            additionalProperties: false
                            description: The reason why the ETA data is null, if it is.
                          - type: "null"
                      timing:
                        type: object
                        properties:
                          estimatedAttemptDuration:
                            description: Time that the driver estimates to spend on the stop to do his job (deliver a parcel, visit a client, etc) in seconds.
                            type:
                              - "null"
                              - number
                          earliestAttemptTime:
                            anyOf:
                              - type: object
                                properties:
                                  hour:
                                    type: integer
                                    minimum: 0
                                    maximum: 23
                                    description: Hour of the day
                                  minute:
                                    type: integer
                                    minimum: 0
                                    maximum: 59
                                    description: Minute of the hour
                                required:
                                  - hour
                                  - minute
                                additionalProperties: false
                                description: Time of day in hours and minutes. Uses a 24 hour clock.
                              - type: "null"
                            description: The earliest time that the driver should arrive at the stop
                          latestAttemptTime:
                            anyOf:
                              - type: object
                                properties:
                                  hour:
                                    type: integer
                                    minimum: 0
                                    maximum: 23
                                    description: Hour of the day
                                  minute:
                                    type: integer
                                    minimum: 0
                                    maximum: 59
                                    description: Minute of the hour
                                required:
                                  - hour
                                  - minute
                                additionalProperties: false
                                description: Time of day in hours and minutes. Uses a 24 hour clock.
                              - type: "null"
                            description: The latest time that the driver should arrive at the stop.
                        required:
                          - estimatedAttemptDuration
                          - earliestAttemptTime
                          - latestAttemptTime
                        additionalProperties: false
                        description: The timing data of the stop.
                      optimizationOrder:
                        default: default
                        type: string
                        enum:
                          - first
                          - last
                          - default
                      customProperties:
                        anyOf:
                          - type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type:
                                - string
                                - "null"
                          - type: "null"
                        description: Custom properties of the stop, can be used to store additional information.
                      circuitClientId:
                        description: The associated Client ID of the Spoke Connect
                        type:
                          - "null"
                          - string
                    required:
                      - id
                      - address
                      - barcodes
                      - driverIdentifier
                      - allowedDriversIdentifiers
                      - estimatedTravelDuration
                      - estimatedTravelDistance
                      - notes
                      - packageCount
                      - weight
                      - type
                      - packageLabel
                      - stopPosition
                      - trackingLink
                      - webAppLink
                      - orderInfo
                      - placeInVehicle
                      - recipient
                      - deliveryInfo
                      - paymentOnDelivery
                      - proofOfAttemptRequirements
                      - plan
                      - route
                      - eta
                      - etaNullReason
                      - timing
                      - customProperties
                      - circuitClientId
                    additionalProperties: false
                    description: A stop of a plan, can be related to a route.
                description: Success
        "400":
          description: Query parameters are invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Query parameters are invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Unauthorized
        "403":
          description: Plan is no longer accessible due to data access restrictions. Upgrade to a plan that supports a longer delivery history period to access it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Plan is no longer accessible due to data access restrictions. Upgrade to a plan that supports a longer delivery history period to access it.
                  code:
                    type: string
                    enum:
                      - plan_inaccessible
                  url:
                    type: string
                    enum:
                      - https://dispatch.spoke.com/paywall
                required:
                  - message
                  - code
                  - url
                description: Plan is no longer accessible due to data access restrictions. Upgrade to a plan that supports a longer delivery history period to access it.
        "404":
          description: The provided plan id does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Plan not found
                required:
                  - message
                description: The provided plan id does not exist
                title: Plan not found
        "500":
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: An internal server error occurred
        default:
          description: The default error model
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: The default error model
components:
  schemas:
    driverIdSchema:
      type: string
      pattern: ^drivers\/[a-zA-Z0-9---_]{1,50}$
    planIdSchema:
      type: string
      pattern: ^plans\/[a-zA-Z0-9---_]{1,50}$
    routeIdSchema:
      type: string
      pattern: ^routes\/[a-zA-Z0-9---_]{1,50}$
    routeSchema:
      type: object
      properties:
        id:
          allOf:
            - $ref: "#/components/schemas/routeIdSchema"
          description: The id of the route, in the format `routes/<id>`.
        title:
          type: string
          description: The title of the route.
        stopCount:
          type: number
          description: The number of stops in the route.
        driver:
          anyOf:
            - $ref: "#/components/schemas/driverIdSchema"
            - type: "null"
          description: The id of the driver.
        state:
          anyOf:
            - type: object
              properties:
                completed:
                  type: boolean
                  description: Whether the route is completed.
                completedAt:
                  description: The timestamp the route was completed at.
                  type:
                    - number
                    - "null"
                distributed:
                  type: boolean
                  description: Whether the route is distributed.
                distributedAt:
                  description: The timestamp the route was distributed at.
                  type:
                    - number
                    - "null"
                notifiedRecipients:
                  type: boolean
                  description: Whether the recipients were notified.
                notifiedRecipientsAt:
                  description: The timestamp the recipients were notified at.
                  type:
                    - number
                    - "null"
                started:
                  type: boolean
                  description: Whether the route is started.
                startedAt:
                  description: The timestamp the route was started at.
                  type:
                    - number
                    - "null"
              required:
                - completed
                - completedAt
                - distributed
                - distributedAt
                - notifiedRecipients
                - notifiedRecipientsAt
                - started
                - startedAt
              additionalProperties: false
              description: The state of a route.
            - type: "null"
          description: The state of the route.
        plan:
          anyOf:
            - $ref: "#/components/schemas/planIdSchema"
            - type: "null"
          description: The id of the related plan.
      required:
        - id
        - title
        - stopCount
        - driver
        - state
        - plan
      additionalProperties: false
      description: A route.
    stopIdSchema:
      type: string
      pattern: ^plans\/[a-zA-Z0-9---_]{1,50}\/stops\/[a-zA-Z0-9---_]{1,50}$
    stopSchema:
      type: object
      properties:
        id:
          allOf:
            - $ref: "#/components/schemas/stopIdSchema"
          description: The id of the stop, in the format `plans/<id>/stops/<id>`.
        address:
          type: object
          properties:
            address:
              type: string
              description: The address of the stop.
            addressLineOne:
              type: string
              description: The first line of the address.
            addressLineTwo:
              type: string
              description: The second line of the address.
            latitude:
              anyOf:
                - type: number
                  minimum: -90
                  maximum: 90
                - type: "null"
              description: The latitude of the address in decimal degrees.
            longitude:
              anyOf:
                - type: number
                  minimum: -180
                  maximum: 180
                - type: "null"
              description: The longitude of the address in decimal degrees.
            placeId:
              description: The identifier of the place corresponding to this stop on Google Places
              type:
                - "null"
                - string
            placeTypes:
              type: array
              items:
                type: string
              description: Array of strings that is provided by the Google AutoCompleteAPI
          required:
            - address
            - addressLineOne
            - addressLineTwo
            - latitude
            - longitude
            - placeId
            - placeTypes
          additionalProperties: false
          description: The address of the stop.
        barcodes:
          type: array
          items:
            type: string
          description: List of Barcode IDs associated with the stop.
        driverIdentifier:
          description: The driver identifier. This field is deprecated, prefer using `allowedDriversIdentifiers`.
          type:
            - "null"
            - string
        allowedDriversIdentifiers:
          type: array
          items:
            type: string
          description: The allowed drivers that can be assigned to this stop, replaces the `driverIdentifier` field.
        estimatedTravelDuration:
          description: Estimated time that the driver will take to arrive at this stop from the previous stop in seconds.
          type:
            - "null"
            - number
        estimatedTravelDistance:
          description: The distance in meters between the previous stop and this stop.
          type:
            - "null"
            - number
        notes:
          description: Notes for the stop.
          type:
            - "null"
            - string
        packageCount:
          description: The number of packages.
          type:
            - "null"
            - number
        weight:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                  minimum: 0
                  description: The weight amount for this stop.
                unit:
                  type: string
                  enum:
                    - kilogram
                    - pound
                    - metric-ton
                  description: The weight unit in which the amount is specified (defined at team's capacity unit).
              required:
                - amount
                - unit
              additionalProperties: false
              description: Weight information for the stop.
            - type: "null"
        type:
          type: string
          enum:
            - start
            - stop
            - end
          description: The type of the stop. `start` is the first stop of the route, `stop` is a stop in the middle of the route, and `end` is the last stop of the route.
        packageLabel:
          description: The label of the package.
          type:
            - "null"
            - string
        stopPosition:
          description: The position of the stop in the route.
          type:
            - "null"
            - number
        trackingLink:
          description: The recipient tracking link.
          type:
            - "null"
            - string
        webAppLink:
          type: string
          description: The web app link.
        orderInfo:
          type: object
          properties:
            products:
              type: array
              items:
                type: string
              description: The products of the stop.
            sellerName:
              description: Name of the seller where the order is from.
              type:
                - "null"
                - string
            sellerOrderId:
              description: Id of the seller where the order is from.
              type:
                - "null"
                - string
            sellerWebsite:
              description: Website of the seller where the order is from.
              type:
                - "null"
                - string
          required:
            - products
            - sellerName
            - sellerOrderId
            - sellerWebsite
          additionalProperties: false
          description: The order information of the stop.
        placeInVehicle:
          anyOf:
            - type: object
              properties:
                x:
                  anyOf:
                    - type: string
                      enum:
                        - left
                        - right
                    - type: "null"
                  description: The x position of the package.
                y:
                  anyOf:
                    - type: string
                      enum:
                        - front
                        - back
                        - middle
                    - type: "null"
                  description: The y position of the package.
                z:
                  anyOf:
                    - type: string
                      enum:
                        - floor
                        - shelf
                    - type: "null"
                  description: The z position of the package.
              required:
                - x
                - y
                - z
              additionalProperties: false
              description: The position of the package in the vehicle.
            - type: "null"
        recipient:
          type: object
          properties:
            name:
              description: The name of the recipient.
              type:
                - "null"
                - string
            email:
              description: The email of the recipient.
              type:
                - "null"
                - string
            phone:
              description: The phone of the recipient.
              type:
                - "null"
                - string
            externalId:
              description: The external id of the recipient.
              type:
                - "null"
                - string
          required:
            - name
            - email
            - phone
            - externalId
          additionalProperties: false
          description: The recipient of the stop.
        activity:
          default: delivery
          type: string
          enum:
            - delivery
            - pickup
        deliveryInfo:
          anyOf:
            - type: object
              properties:
                attempted:
                  type: boolean
                  description: Whether the stop was attempted.
                attemptedAt:
                  description: When the stop was attempted in seconds since epoch.
                  type:
                    - number
                    - "null"
                arrivedAt:
                  description: When the driver arrived at the stop in seconds since epoch. This field is deprecated, prefer `timeAtStopInfo.arrivedAt`.
                  type:
                    - number
                    - "null"
                timeAtStopInfo:
                  anyOf:
                    - type: object
                      properties:
                        arrivedAt:
                          description: When the driver arrived at the stop in seconds since epoch.
                          type:
                            - number
                            - "null"
                        departedAt:
                          description: When the driver departed from the stop in seconds since epoch.
                          type:
                            - number
                            - "null"
                        isEstimated:
                          description: Whether the time at stop was estimated rather than directly measured.
                          type:
                            - boolean
                            - "null"
                      required:
                        - arrivedAt
                        - departedAt
                        - isEstimated
                    - type: "null"
                  description: Grouped time-at-stop data.
                timeAtStopInfoNullReason:
                  anyOf:
                    - type: object
                      properties:
                        reason:
                          type: string
                          enum:
                            - subscription_not_supported
                        message:
                          type: string
                        url:
                          type:
                            - string
                            - "null"
                      required:
                        - reason
                        - message
                        - url
                    - type: "null"
                  description: Reason why time-at-stop data was not provided.
                attemptedLocation:
                  anyOf:
                    - type: object
                      properties:
                        latitude:
                          type: number
                          description: The latitude of the location.
                        longitude:
                          type: number
                          description: The longitude of the location.
                      required:
                        - latitude
                        - longitude
                      additionalProperties: false
                      description: A location.
                    - type: "null"
                  description: Where the stop was attempted.
                driverProvidedInternalNotes:
                  description: Internal notes provided by the driver.
                  type:
                    - string
                    - "null"
                driverProvidedRecipientNotes:
                  description: Recipient notes provided by the driver.
                  type:
                    - string
                    - "null"
                photoUrls:
                  type: array
                  items:
                    type: string
                  description: URLs of proof of delivery photos.
                recipientProvidedNotes:
                  description: Notes from recipient
                  type:
                    - string
                    - "null"
                signatureUrl:
                  description: URL of the signature.
                  type:
                    - string
                    - "null"
                signeeName:
                  description: Name of the signee.
                  type:
                    - string
                    - "null"
                succeeded:
                  type: boolean
                  description: Whether the stop was succeeded.
                state:
                  type: string
                  enum:
                    - delivered_to_recipient
                    - delivered_to_third_party
                    - delivered_to_mailbox
                    - delivered_to_safe_place
                    - delivered_to_pickup_point
                    - delivered_other
                    - picked_up_from_customer
                    - picked_up_unmanned
                    - picked_up_from_locker
                    - picked_up_other
                    - failed_not_home
                    - failed_cant_find_address
                    - failed_no_parking
                    - failed_no_time
                    - failed_package_not_available
                    - failed_other
                    - failed_missing_required_proof
                    - failed_payment_not_received
                    - unattempted
                  description: The state of the delivery.
              required:
                - attempted
                - attemptedAt
                - arrivedAt
                - timeAtStopInfo
                - timeAtStopInfoNullReason
                - attemptedLocation
                - driverProvidedInternalNotes
                - driverProvidedRecipientNotes
                - photoUrls
                - recipientProvidedNotes
                - signatureUrl
                - signeeName
                - succeeded
                - state
              additionalProperties: false
              description: The delivery information of the stop.
            - type: "null"
        paymentOnDelivery:
          anyOf:
            - type: object
              properties:
                amount:
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    - type: "null"
                  description: The amount *in minor units* (e.g. cents) to be collected upon delivery.
                currency:
                  type: string
                  description: The payment's currency in ISO 4217 standard.
              required:
                - amount
                - currency
              additionalProperties: false
              description: The payment due upon delivery also known as "Cash on Delivery".
            - type: "null"
        proofOfAttemptRequirements:
          type: object
          properties:
            enabled:
              description: Whether the proof of attempt is enabled.This only works if the team subscription has access to proof of delivery
              type:
                - "null"
                - boolean
          required:
            - enabled
          additionalProperties: false
          description: The proof of attempt requirements of the stop.
        plan:
          allOf:
            - $ref: "#/components/schemas/planIdSchema"
          description: The id of the plan, in the format `plans/<id>`.
        route:
          anyOf:
            - $ref: "#/components/schemas/routeSchema"
            - type: "null"
          description: The route of the stop, if any.
        eta:
          anyOf:
            - type: object
              properties:
                estimatedArrivalAt:
                  type: number
                  description: The estimated time in seconds since epoch.
                estimatedLatestArrivalAt:
                  type: number
                  description: The latest estimated time in seconds since epoch.
                estimatedEarliestArrivalAt:
                  type: number
                  description: The earliest estimated time in seconds since epoch.
              required:
                - estimatedArrivalAt
                - estimatedLatestArrivalAt
                - estimatedEarliestArrivalAt
              additionalProperties: false
              description: The estimated time of arrival data of the stop.
            - type: "null"
        etaNullReason:
          anyOf:
            - type: object
              properties:
                reason:
                  type: string
                  enum:
                    - not_optimized
                    - subscription_not_supported
                message:
                  type: string
                url:
                  type:
                    - string
                    - "null"
              required:
                - reason
                - message
                - url
              additionalProperties: false
              description: The reason why the ETA data is null, if it is.
            - type: "null"
        timing:
          type: object
          properties:
            estimatedAttemptDuration:
              description: Time that the driver estimates to spend on the stop to do his job (deliver a parcel, visit a client, etc) in seconds.
              type:
                - "null"
                - number
            earliestAttemptTime:
              anyOf:
                - $ref: "#/components/schemas/timeOfDaySchema"
                - type: "null"
              description: The earliest time that the driver should arrive at the stop
            latestAttemptTime:
              anyOf:
                - $ref: "#/components/schemas/timeOfDaySchema"
                - type: "null"
              description: The latest time that the driver should arrive at the stop.
          required:
            - estimatedAttemptDuration
            - earliestAttemptTime
            - latestAttemptTime
          additionalProperties: false
          description: The timing data of the stop.
        optimizationOrder:
          default: default
          type: string
          enum:
            - first
            - last
            - default
        customProperties:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties:
                type:
                  - string
                  - "null"
            - type: "null"
          description: Custom properties of the stop, can be used to store additional information.
        circuitClientId:
          description: The associated Client ID of the Spoke Connect
          type:
            - "null"
            - string
      required:
        - id
        - address
        - barcodes
        - driverIdentifier
        - allowedDriversIdentifiers
        - estimatedTravelDuration
        - estimatedTravelDistance
        - notes
        - packageCount
        - weight
        - type
        - packageLabel
        - stopPosition
        - trackingLink
        - webAppLink
        - orderInfo
        - placeInVehicle
        - recipient
        - deliveryInfo
        - paymentOnDelivery
        - proofOfAttemptRequirements
        - plan
        - route
        - eta
        - etaNullReason
        - timing
        - customProperties
        - circuitClientId
      additionalProperties: false
      description: A stop of a plan, can be related to a route.
    timeOfDaySchema:
      type: object
      properties:
        hour:
          type: integer
          minimum: 0
          maximum: 23
          description: Hour of the day
        minute:
          type: integer
          minimum: 0
          maximum: 59
          description: Minute of the hour
      required:
        - hour
        - minute
      additionalProperties: false
      description: Time of day in hours and minutes. Uses a 24 hour clock.
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: Use the API key as the username and leave the password empty.
````