Skip to main content
POST
/
orders
cURL
curl --request POST \
  --url https://api.unihop.app/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "pickup_address_street": "<string>",
  "pickup_address_city": "<string>",
  "pickup_address_country": "<string>",
  "pickup_name": "<string>",
  "dropoff_name": "<string>",
  "email": "[email protected]",
  "currency": "<string>",
  "pickup_address_number": "<string>",
  "pickup_address_secondary_number": "<string>",
  "pickup_address_county": "<string>",
  "pickup_address_state": "<string>",
  "pickup_address_postal_code": "<string>",
  "pickup_address_latitude": 123,
  "pickup_address_longitude": 123,
  "pickup_phone_number": "<string>",
  "pickup_instructions": "<string>",
  "dropoff_start_time": "2023-11-07T05:31:56Z",
  "pickup_start_time": "2023-11-07T05:31:56Z",
  "weight": 1,
  "dimensions": {
    "length": 1,
    "width": 1,
    "height": 1
  },
  "dropoff_address_street": "<string>",
  "dropoff_address_city": "<string>",
  "dropoff_address_country": "<string>",
  "dropoff_address_number": "<string>",
  "dropoff_address_secondary_number": "<string>",
  "dropoff_address_county": "<string>",
  "dropoff_address_state": "<string>",
  "dropoff_address_postal_code": "<string>",
  "dropoff_address_latitude": 123,
  "dropoff_address_longitude": 123,
  "dropoff_phone_number": "<string>",
  "dropoff_instructions": "<string>",
  "dropoff_email": "[email protected]",
  "package_minimum_vehicle_size": "BIKE",
  "package_delivery_mode": "NOW",
  "package_description": "<string>",
  "package_requirements": [
    "PHOTO_PROOF_OF_DELIVERY"
  ],
  "package_pickup_start_time": "<string>",
  "items": [
    {
      "name": "<string>",
      "quantity": 123,
      "description": "<string>",
      "external_id": "<string>",
      "external_instance_id": "<string>",
      "price": 123,
      "barcode": "<string>"
    }
  ],
  "items_count": 123,
  "delivery_date": "2023-12-25",
  "delivery_start_time": "<string>",
  "delivery_end_time": "<string>",
  "package_value": 1,
  "tip": 1,
  "partner_reference": "<string>",
  "quote": true,
  "partner_payload": {}
}
'
{
  "message": "Order created successfully",
  "uid": "ord_123456",
  "data": {
    "status": "created",
    "price": {
      "value": 29.99,
      "currency": "USD"
    },
    "distance": {
      "value": 5.5,
      "unit": "miles"
    },
    "quote": false,
    "partner_reference": "partner_xyz_001"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Order to add to the system

pickup_address_street
string
required

Street name of the pickup address.

pickup_address_city
string
required

City of the pickup address.

pickup_address_country
string
required

Country of the pickup address.

pickup_name
string
required

Name of the contact person at the pickup location.

dropoff_name
string
required

Name of the contact person at the dropoff location.

email
string<email>
required

Customer email address for notifications.

currency
string
required

The intended currency.

Maximum string length: 3
pickup_address_number
string

Street number of the pickup address.

pickup_address_secondary_number
string

Apartment or suite number for the pickup address.

pickup_address_county
string

County of the pickup address.

pickup_address_state
string

State of the pickup address.

pickup_address_postal_code
string

Postal or ZIP code of the pickup address.

pickup_address_latitude
number

Latitude coordinate of the pickup address.

pickup_address_longitude
number

Longitude coordinate of the pickup address.

pickup_phone_number
string

Phone number of the pickup contact person.

Maximum string length: 15
pickup_instructions
string

Additional instructions for the pickup.

Maximum string length: 512
dropoff_start_time
string<date-time>

Preferred start time for dropoff in ISO 8601 format (YYYY-MM-DDTHH:MM:SS±HH:MM).

pickup_start_time
string<date-time>

Preferred start time for pickup in ISO 8601 format (YYYY-MM-DDTHH:MM:SS±HH:MM).

weight
number

Weight of the package in lbs.

Required range: x >= 0
dimensions
object

Dimensions of the package.

dropoff_address_street
string

Street name of the dropoff address.

dropoff_address_city
string

City of the dropoff address.

dropoff_address_country
string

Country of the dropoff address.

dropoff_address_number
string

Street number of the dropoff address.

dropoff_address_secondary_number
string

Apartment or suite number for the dropoff address.

dropoff_address_county
string

County of the dropoff address.

dropoff_address_state
string

State of the dropoff address.

dropoff_address_postal_code
string

Postal or ZIP code of the dropoff address.

dropoff_address_latitude
number

Latitude coordinate of the dropoff address.

dropoff_address_longitude
number

Longitude coordinate of the dropoff address.

dropoff_phone_number
string

Phone number of the dropoff contact person.

Maximum string length: 15
dropoff_instructions
string

Additional instructions for the dropoff.

Maximum string length: 512
dropoff_email
string<email>

Email address of the dropoff contact person.

package_minimum_vehicle_size
enum<string>

Minimum vehicle type required to transport the package.

Available options:
BIKE,
MOTORBIKE,
CARGOBIKECARGO,
SEDAN,
CAR,
SUV,
PICKUP_TRUCK,
PICKUP,
VAN,
TRUCK,
ANY
package_delivery_mode
enum<string>

Mode of delivery (NOW or SCHEDULED).

Available options:
NOW,
SCHEDULED
package_description
string

Description of the package contents.

Maximum string length: 512
package_requirements
enum<string>[]

Special delivery or pickup requirements.

Available options:
PHOTO_PROOF_OF_DELIVERY,
SIGNATURE_PROOF_OF_DELIVERY,
PHOTO_PROOF_OF_PICKUP,
SIGNATURE_PROOF_OF_PICKUP,
AGE_VERIFICATION_ON_DELIVERY,
ID_VERIFICATION_ON_DELIVERY,
BARCODE_SCAN_ON_PICKUP,
BARCODE_SCAN_ON_DROPOFF,
MEET_ON_DELIVERY,
SHIPPING_LABEL,
TWO_PERSON_TEAM,
PINCODE_VERIFICATION,
SCHEDULE_II_CONTROLLED_SUBSTANCES,
ALCOHOL,
PARKING_CHECK_IN,
DISPLAY_BARCODE_ON_PICKUP
package_pickup_start_time
string<time>

Preferred pickup time for the package (HH:MM:SS).

items
object[]

List of items included in the delivery.

items_count
integer

Total count of items.

delivery_date
string<date>

Preferred delivery date (YYYY-MM-DD).

delivery_start_time
string<time>

Start time of the delivery window (HH:MM:SS).

delivery_end_time
string<time>

End time of the delivery window (HH:MM:SS).

package_value
number

Monetary value of the package.

Required range: x >= 0
tip
number

Optional tip for the delivery.

Required range: x >= 0
partner_reference
string

Custom reference provided by the partner.

Maximum string length: 256
quote
boolean

Indicates whether this is a quote request.

partner_payload
object

Optional custom payload for partner systems.

Response

Order created successfully

Successful response returned after an order is created.

message
string
required
Example:

"Order created successfully"

uid
string
required

Unique identifier of the created order

Example:

"ord_123456"

data
object
required