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,
  "tracking_code": null,
  "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": {
    "hub_id": null,
    "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": {
    "custom_delivery_code": null,
    "delivery_code": false,
    "delivery_code_mandatory": false,
    "pod_photo": false,
    "pod_photo_mandatory": false
  },
  "assignment": {
    "type": "capacity_aware",
    "courier_id": null
  },
  "assignment_options": {
    "team_id": null,
    "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,
  "tracking_code": null,
  "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": {
    "hub_id": null,
    "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": {
    "custom_delivery_code": null,
    "delivery_code": false,
    "delivery_code_mandatory": false,
    "pod_photo": false,
    "pod_photo_mandatory": false
  },
  "assignment": {
    "type": "slot",
    "courier_id": null
  },
  "assignment_options": {
    "team_id": null,
    "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"
  }
}
Language
Authorization
Header
Click Try It! to start a request and see the response here!