Create a Delivery Job

The Create a Delivery Job API is a powerful tool to allow businesses to utilize their delivery fleet for various purposes beyond traditional food delivery. If a restaurant does not have its own delivery fleet, it can leverage an external last-mile delivery service through the Delivery Manager integration. This feature is especially useful for creating ad-hoc or customized delivery jobs and providing flexibility in fleet management.

The Create a Delivery Job API enables users to create standalone delivery jobs, independent of food orders. By leveraging this API, businesses can:

  • Use their delivery fleet irrespective of the order type. (e.g., courier services, document delivery, or retail orders).
  • Create scheduled or on-demand delivery jobs.
  • Seamlessly integrate delivery services into external platforms or workflows.
  • This API is ideal for businesses looking to extend the functionality of their delivery fleet, enhance operational efficiency, and meet diverse customer demands.

For more details refer Create a Delivery Job API Reference.

Use For

  • Ad-hoc Deliveries: Create delivery jobs for a variety of orders.
  • Integration with External Systems: Use this API to integrate delivery fleet management into third-party applications or workflows.

NOTE

  • Ensure that the applicationId provided by Grubtech is correctly included in the URL to associate the request with the proper Grubtech integration.
  • The X-API-KEY must be securely stored and used only in authorized requests. Refer API Key Authentication for more details.
  • If encountering persistent errors, verify the request body format, header values, and applicationId.

Delivery Creation Example

{
  "id": "string",
  "storeId": "string",
  "orderReffrenceId": "string",
  "item": [
    {
      "name": "string",
      "quantity": "string"
    }
  ],
  "pickup": {
    "contactName": "string",
    "contactPhone": "string",
    "location": {
      "address1": "string",
      "address2": "string",
      "area": "string",
      "city": "string",
      "country": "string",
      "formattedAddress": "string",
      "coordinates": {
        "latitude": "string",
        "longitude": "string"
      }
    },
    "notes": "string"
  },
  "dropOff": {
    "contactName": "string",
    "contactPhone": "string",
    "location": {
      "address1": "string",
      "address2": "string",
      "area": "string",
      "city": "string",
      "country": "string",
      "formattedAddress": "string",
      "coordinates": {
        "latitude": "string",
        "longitude": "string"
      }
    },
    "notes": "string",
    "payment": {
      "mode": "CASH_ON_DELIVERY",
      "amount": 0,
      "currencyCode": "string"
    }
  },
  "preparedAt": "string",
  "scheduledAt": "string"
}