GET /ext/dispatch/{id}

Fetch a dispatch

Path parameters

  • id string Required

    ID of the dispatch to use

Responses

  • 200 application/json

    successful operation

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id string

        uniques identifier for a dispatch

      • created_at string

        dispatch created at timestamp

      • modified_at string

        dispatch modified at timestamp

      • r_id string

        short/readable identifier for a dispatch

      • assigned_driver_id string

        unique identifier of a driver assigned to a dispatch

      • pickup object
        Hide pickup attributes Show pickup attributes object
        • ref_id string

          Unique identifier for an address

        • lat number(double) Required
        • lng number(double) Required
        • address_line string
      • destination object
        Hide destination attributes Show destination attributes object
        • ref_id string

          Unique identifier for an address

        • lat number(double) Required
        • lng number(double) Required
        • address_line string
      • user_metadata object
        Hide user_metadata attributes Show user_metadata attributes object
        • id string Required

          unique identifier for a user

        • username string
        • firstName string
        • lastName string
        • email string Required
        • phone string Required
      • vendor_logo_url string

        restaurant logo url

      • vendor_id string

        Restaurant unique identifier

      • vendor_name object

        locale based text objects

        Hide vendor_name attribute Show vendor_name attribute object
        • * string Additional properties

          locale based text objects

      • vendor_oid string

        unique order identifier

      • vendor_sid string

        unique short readable identifier

      • vendor_bid string

        unique restaurant branch identifier

      • media_url object

        media urls for any photos/videos taken by the driver upon delivery

        Hide media_url attribute Show media_url attribute object
        • * string Additional properties

          media urls for any photos/videos taken by the driver upon delivery

      • vendor_payload object
        Hide vendor_payload attributes Show vendor_payload attributes object
        • pickup_wait_time integer

          wait time in minutes at the pickup/restaurant

        • order_price number(float)
        • currency string

          ISO-4217 three letter currency code

        • payment_type string

          payment type used

          Values are AMEX, CASH, VISA, MASTERCARD, or MASTER.

        • order_details array[object]

          order details of a dispatch

          Hide order_details attributes Show order_details attributes object
          • item_name object

            locale based order item name

            Hide item_name attribute Show item_name attribute object
            • * string Additional properties

              locale based order item name

          • count integer

            quantiy of the order item

          • price number(float)

            price of the order item

      • status array[object]
        Hide status attributes Show status attributes object
        • status string

          status of a dispatch

          Values are accepted, new, picked_up, assigned, ready_for_pickup, dispatch_rejected, dispatch_accepted, cancelled, qa_qc, or delivered.

        • status_captured_time string

          timestamp of when the dispatch was updated

        • ref_id string

          unique identifier represented by ref_type

        • ref_type string

          actor/resource type

  • 401 application/json

    Unauthorized if incorrect api_key is given

    Hide response attributes Show response attributes object
    • error string

      generic information about the error

    • error_desc string

      error information for the developer

  • 500 application/json

    any other errors from the server

    Hide response attributes Show response attributes object
    • error string

      generic information about the error

    • error_desc string

      error information for the developer

GET /ext/dispatch/{id}
curl \
 --request GET 'https://dev.hubz.nyotek.com/ext/dispatch/{id}'
Response examples (200)
{
  "data": {
    "id": "01HQ0PV32FMRA1XGT609QFV2VJ",
    "created_at": "string",
    "modified_at": "string",
    "r_id": "DYJ7XZ7",
    "assigned_driver_id": "01HQ0PV32FMRA1XGT609QFV2VJ",
    "pickup": {
      "ref_id": "b93d16aa-e34d-4c65-b6ef-acdcca470615",
      "lat": 24.712181,
      "lng": 46.679747,
      "address_line": "ابي البدر الموسوي, As Sulimaniyah, Riyadh 12244, Saudi Arabia"
    },
    "destination": {
      "ref_id": "b93d16aa-e34d-4c65-b6ef-acdcca470615",
      "lat": 24.712181,
      "lng": 46.679747,
      "address_line": "ابي البدر الموسوي, As Sulimaniyah, Riyadh 12244, Saudi Arabia"
    },
    "user_metadata": {
      "id": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
      "username": "theUser",
      "firstName": "John",
      "lastName": "James",
      "email": "john@email.com",
      "phone": 9669876654321
    },
    "vendor_logo_url": "https://picsum.photos/200/300",
    "vendor_id": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
    "vendor_name": {
      "ar-sa": "جملة عربية",
      "en-us": "English based text"
    },
    "vendor_oid": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
    "vendor_sid": "15EEDFRG",
    "vendor_bid": "15ed2668-f118-40c3-a52c-8ad90fe11ed7",
    "media_url": {
      "1": "https://picsum.photos/200/300",
      "2": "https://picsum.photos/200/400"
    },
    "vendor_payload": {
      "pickup_wait_time": 20,
      "order_price": 123.65,
      "currency": "SAR",
      "payment_type": "AMEX",
      "order_details": [
        {
          "item_name": {
            "ar-sa": "جملة عربية",
            "en-us": "English based text"
          },
          "count": 2,
          "price": 23.45
        }
      ]
    },
    "status": [
      {
        "status": "accepted",
        "status_captured_time": "2024-02-28 12:05:24.992",
        "ref_id": "01HQ0PV32FMRA1XGT609QFV2VJ",
        "ref_type": "user"
      }
    ]
  }
}
Response examples (401)
{
  "error": "generic error",
  "error_desc": "identifier 45 not found"
}
Response examples (500)
{
  "error": "generic error",
  "error_desc": "identifier 45 not found"
}