Delivery Notifications

This document is targeted for third-party delivery services integrating with the Paytronix Online Ordering platform.

It is possible to send delivery updates directly to Paytronix Online Ordering's API when key events occur.

Notification API

The API Endpoint is: https://opendining.net/api/v1/notifications/delivery

Updates should be sent via HTTP POST. The Content-Type may be either application/json or application/x-www-form-urlencoded. The following values should be sent in the request body:

Property Type Description
delivery_id string The delivery ID from your system, which will correspond with a delivery ID in the Paytronix Online Ordering system
type string The event/notification type. Current values include:
  • new_courier_name: A new courier has been assigned.
  • new_courier_phone: A new courier has been assigned.
  • status_change: The order/delivery status has changed.
value string The value of the notification, which will vary by type.
  • new_courier_name: The courier name.
  • new_courier_phone: The courier phone number.
  • status_change: The new status of the order/delivery.
date string The date/time of the notification, in ISO 8601 format.

This API is idempotent, so you can send the same notification multiple times, and it will only be logged once.

Authorization

Your Paytronix Online Ordering API Key and Access Token should be provided in the query string when submitting the POST request. These values will be provided upon request from the Paytronix Online Ordering support team; please contact us for details.

Example Requests

In JSON Format

POST /api/v1/notifications/delivery?key=API_KEY&access_token=ACCESS_TOKEN HTTP/1.1
Host: opendining.net
Content-Type: application/json

{
    "delivery_id": "1234",
    "type": "new_courier_name",
    "value": "Test Courier",
    "date": "2012-09-15T15:47:26 -02:00"
}

In Form-Urlencoded Format

POST /api/v1/notifications/delivery?key=API_KEY&access_token=ACCESS_TOKEN HTTP/1.1
Host: opendining.net
Content-Type: application/x-www-form-urlencoded

delivery_id=1234&type=new_courier_name&value=Test+Courier&date=2014-02-01T15%3A47%3A26+-02%3A00

API Response

The API will always respond in JSON format. You will either receive a 400-level error code, or a 200 success response.
{"successful":true}