Create

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

When you create an order in the system, the "id" value in the returned JSON response is the unique ID value of the order in QDelivery. You must keep this value on your database to be able to take action on the order later.

The action_slug value and the integration_id value are subjected to uniqueness checks together. You cannot create 2 tasks with the same action_slug and integration_id. This way, when you make a request, you will not receive an error; you will receive the current task information.

Sample Request Data

for assignment types: pool, capacity_aware, capacity_unaware and selected_courier

{
  "hub_id": 1,
  "integration_id": 22,
  "action_slug": "drop_off",
  "starts_at": "2022-02-04T10:00:00.000000Z",
  "ends_at": "2022-02-04T11:00:00.000000Z",
  "quantity": 1,
  "unit_quantity": 0,
  "service_time": 10,
  "response_time": 0,
  "notes": "This is a demo order",
  "recipient_notes": "If I am not home, please deliver to my next door neighbor.",
  "priority": 0,
  "locked": false,
  "confirmed": true,
  "origin": {
    "hub_id": 1
  },
  "destination": {
    "address": "Rue des Pirredrittes 17, 3971 Crans-Montana, Switzerland",
    "address_building": "Apartment A",
    "address_floor": "3",
    "address_apartment": "Door 6",
    "address_description": "The small house across the supermarket",
    "lat": 41.04608914,
    "lng": 28.9996297,
    "name": "Natalia Schuler",
    "phone_country": "CH",
    "phone": "4120000000",
    "allow_unresolved": false
  },
  "requirements": {
    "delivery_code": false,
    "delivery_code_mandatory": false,
    "pod_photo": false,
    "pod_photo_mandatory": false
  },
  "assignment": {
    "type": "capacity_aware",
  },
  "assignment_options": {
    "team_id_by_polygon": false,
    "courier_online_status": "all",
    "obligation": "mandatory",
    "courier_duty_status": "idle",
    "distribution": "balanced",
    "min_capacity": 4
  }
}

Sample data for slot assignment type (assignment.type)::

If the slot_starts_at and slot_ends_at values are the same as starts_at and ends_at, you do not need to send them. When you send slot_auto_closing_time (minutes), the slot automatically closes one minute before the starts_at/slot_starts_at time and the tasks are routed and assigned to the drivers. When you send a slot value, the slot_options field in the data is taken into account.

{
  "hub_id": 1,
  "integration_id": 22,
  "action_slug": "drop_off",
  "starts_at": "2022-02-04T10:00:00.000000Z",
  "ends_at": "2022-02-04T11:00:00.000000Z",
  "slot": "2022020410001100",
  "slot_starts_at": "2022-02-04T10:00:00.000000Z",
  "slot_ends_at": "2022-02-04T11:00:00.000000Z",
  "slot_auto_closing_time": 15,
  "quantity": 1,
  "service_time": 10,
  "response_time": 0,
  "notes": "This is a demo order",
  "recipient_notes": "If I am not home, please deliver to my next door neighbor.",
  "priority": 0,
  "locked": false,
  "confirmed": true,
  "origin": {
    "hub_id": 1
  },
  "destination": {
    "address": "Rue des Pirredrittes 17, 3971 Crans-Montana, Switzerland",
    "address_building": "Apartment A",
    "address_floor": "3",
    "address_apartment": "Door 6",
    "address_description": "The small house across the supermarket",
    "lat": 41.04608914,
    "lng": 28.9996297,
    "name": "Natalia Schuler",
    "phone_country": "CH",
    "phone": "5360000000",
    "allow_unresolved": false
  },
  "requirements": {
    "delivery_code": false,
    "delivery_code_mandatory": false,
    "pod_photo": false,
    "pod_photo_mandatory": false
  },
  "assignment": {
    "type": "slot",
  },
  "assignment_options": {
    "team_id_by_polygon": false,
    "courier_online_status": "all",
    "obligation": "mandatory",
    "courier_duty_status": "idle",
    "distribution": "balanced",
    "min_capacity": 4
  },
  "slot_options": {
    "pool": false,
    "tour": true,
    "dispatch_early": false,
    "from_hub": true,
    "accelerate": false,
    "unassigned_strategy": "nearest_plan"
  }
}
Body Params
string
required

This is the ID where the task/order belongs. The location of the order (store, warehouse, etc.) and the outlet store (origin) may be different, and the shipment may be physically in different stores. Therefore, this field represents the main owner of the order. You can get the location list (and ID values) by making a request to the Hubs > Index endpoint.

string

Your order number. The order number must be unique along with the action_slug value. For example, there cannot be two drop_off orders as ORD123, but there can be one drop_off and one pickup. Although this is the case, we recommend that you provide a unique integration_id for each order.

string

The tracking number belongs to you. If you do not send it, it will be created automatically by us. Customers (recipient/destination) will track the delivery via this code.

string
required
Defaults to drop_off

You must provide drop_off for delivery to the customer and pickup for return (pickup from the customer). For return missions, you must give the address where the return will be received as the origin and the address where you will deliver the return as the destination, that is, it should be the opposite of normal delivery.

date
required

The earliest date on which the order will be processed. The date must be in time format. When you do not send with Timezone, UTC is assumed. You can send as ISO, ISO8601, Atom and DateTimeString. Samples; 2019-02-01T03:45:00+03:00, 2019-02-01T03:45:00.612584Z, 2019-02-01 00:45:00

date
required

The latest date by which the order must be delivered and completed. The date must be in time format. When you do not send with Timezone, UTC is assumed. You can send as ISO, ISO8601, Atom and DateTimeString. Samples; 2019-02-01T03:45:00+03:00, 2019-02-01T03:45:00.612584Z, 2019-02-01 00:45:00

string

Sample: 2022041510001100. When you enter a slot value and select that slot as the assignment type, the orders you send are grouped under this slot value and made ready to be routed.

date

If it is different from the starts_at field, provide it. The date format and rules are the same as for the starts_at field. It is activated if the slot area is filled.

date

If it is different from the starts_at field, provide it. The date format and rules are the same as for the starts_at field. It is activated if the slot area is filled.

int32

When a time is given in minutes, the slot is automatically closed a given minute before the start time. For example, if you give the value 30 for an order starting at 2019-02-01T10:00:00+0300, this slot will be closed at 09:30 according to the GMT+3 time zone (routing will take place at 09:30 and routes will be assigned to drivers).

int32

Order quantity. Provide as 1.

int32
Defaults to 0

The unit occupied by the order (weight, volume, etc.). Likewise, when unit capacity is defined on the driver, you limit the orders that the driver can carry according to the given unit. To not use it, provide 0.

int32

The additional time provided to the courier to deliver the order from the delivery point and return to their vehicle after reaching the delivery point. It is included when routing. Especially in large building complexes, it may take 20 minutes for the courier to deliver a small shipment to the customer from the entrance gate and return to their vehicle. For jobs requiring installation, it may take more than 1 hour.

int32

Response time for the courier to answer whether or not to accept a non-mandatory order. If the courier does not respond within this period, the request is transferred to the next courier. This feature is still under development; Send 0.

string

Manager notes (Not seen by customers).

string

Notes entered by the customer.

int32

Order priority. Orders with high priority values are subject to procedures that will ensure their priority delivery. This field may cause undesirable results in routing. So do not use it unless absolutely necessary.

tags
array of strings

You can send it as ["tag1", "tag2"].

tags
origin
object
destination
object

Destination information

requirements
object
assignment
object

Assignment procedures

assignment_options
object
slot_options
object
boolean

If true, the courier cannot perform any transactions. If you do not have a preliminary preparation phase and you want the courier to process the order as soon as it receives it, use false.

boolean

If true, it means the courier confirmed the task. If you don't have a courier confirmation stage, send true.

items
array of objects

task content (products etc.)

items
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain
www.qdelivery.app