Integrate Orders

To integrate you POS ordering you need to implement one endpoint. This endpoint uses type field which helps to differentiate order types.

Data types passed in the request

  • time - Timestamp of when the order is expected to be collected (in Unix time)
  • price - an integer (no decimal places)
  • item - can have many level of children
  • thirdpartyorder_reference - this fields contains id of the third party, can be string or number
  • payment_method - allows values CASH or CARD
  • plu - unique POS identifier

Delivery By Delivery Partner Orders

To accept an order from a delivery partner who picks up the delivery from the restaurant (Uber Eats, Skip the Dishes, etc.) you will need to create the following endpoint.

Flyt will call this endpoint with a POST, expecting to be able to create a new order.

As a response, Flyt will expect a response with the internal identifier for the order on your system (e.g. OrderId).

Body
{
  "type":"delivery-by-delivery-partner",
  "posLocationId" : "BBBBBBBBB",
  "driver" :
  {
    "first_name" : "John",
    "last_name" : "Driver",
    "phone_number" : "+447910575785"
  },
  "items":
  [{
      "name" : "Fish and Chips",
      "description" : "The tastiest Fish in the whole world",
      "plu" : "11212121",
      "price" : 750,
      "children" : [
      {
        "name" : "Extra Sauce",
        "description" : "The greatest sauce in the world",
        "plu" : "11211",
        "price" : 150
        "children": [etc.]

      }]
    }],
    "created_at" : "1553495441",
    "channel":
    {
      "name":"Uber Eats",
    },
    "collect_at" : "1553495441",
    "collection_notes" : "Notes about the collection",
    "kitchen_notes" : "Notes for the kitchen",
    "third_party_order_reference" : "Uber order Id",
    "total" : 355,
    "payment_method": "CARD",
    "tender_type" : "Uber Eats"
}

response 200 OK
{
    "OrderId": 1234
}

Collection By Customer Orders

To accept an order where a customer can collect an order the following endpoint needs to be implemented.

Flyt will call this endpoint with a POST, expecting to be able to create a new order.

As a response, Flyt will expect a response with the internal identifier for the order on your system (e.g. OrderId).

Body
{
  "type":"collection-by-customer",
  "posLocationId" : "BBBBBBBBB",
  "collector" :
  {
    "first_name" : "John",
    "last_name" : "Smith",
    "phone_number" : "+447910575785"
  },
  "items":
  [
    {
      "name" : "Fish and Chips",
      "description" : "The tastiest Fish in the whole world",
      "plu" : "11212121",
      "price" : 750,
      "children": [
      {
        "name" : "Extra Sauce",
        "description" : "The greatest sauce in the world",
        "plu" : "11211",
        "price" : 150,
        "children": [
          // etc.
        ]
      }]
    }
  ],
    "created_at" : "1553495441",
    "channel":
    {
      "name":"Uber Eats",
    },
    "collect_at" : "1553495441",
    "collection_notes" : "Notes about the collection",
    "kitchen_notes" : "Notes for the kitchen",
    "third_party_order_reference" : "Uber order Id",
    "total" : 355,
    "payment_method": "CARD",
    "tender_type" : "Uber Eats",
}

response 200 OK
{
    "OrderId": 1234
}

Delivery By Merchant

To accept an order where the restaurant handles the delivery themselves you need to implement this endpoint.

Flyt will call this endpoint with a POST, expecting to be able to create a new order.

As a response, Flyt will expect a response with the internal identifier for the order on your system (e.g. OrderId).

Body
{
  "type":"delivery-by-merchant",
  "posLocationId" : "BBBBBBBBB",
  "delivery" :
  {
    "first_name" : "John",
    "last_name" : "Driver",
    "phone_number" : "+447910575785",
    "line_one" : "Address Line 1",
    "line_two" : "Address Line 2",
    "city" : "City",
    "postcode" : "12335"
  },
  "items":
  [{
    "name" : "Fish and Chips",
    "description" : "The tastiest Fish in the whole world",
    "plu" : "11212121",
    "price" : 750,
    "children": [
      {
        "name" : "Extra Sauce",
        "description" : "The greatest sauce in the world",
        "plu" : "11211",
        "price" : 150,
        "children": [
          // etc.
        ]
      }]
    }],
    "created_at" : "1553495441",
    "channel":
    {
      "name":"Uber Eats",
    },
    "deliver_at" : "1553495441",
    "delivery_notes" : "Notes about the delivery",
    "kitchen_notes" : "Notes for the kitchen",
    "third_party_order_reference" : "Uber order Id",
    "total" : 355,
    "payment_method": "CARD",
    "tender_type" : "Uber Eats"
}

response 200 OK
{
    "OrderId": 1234
}

Error Response Example In the case of an error we would receive the normal POS to Pricing Response Structure shown above with the following messages in the errorMessage variable.

Case: Wrong id provided errorMessage: “Could not find {id} for {name}” Case: Store is closed errorMessage: “The store {storeId} is currently closed”

Case: Cant connect errorMessage: “The terminal is off at {storeId} and cant be connected to at this time”

Case: Store out of stock for that item errorMessage: “{storeId} is currently out of stock for {name}: {id}”

408 timeout response after 20 seconds (subject to change)