Integrate Orders

To integrate your POS for ordering we have 1 health endpoint that you must integrate and three optional endpoints for orders that you can support. We recommend that you do these all as seperate endpoints, but you can do it as one endpoint and use the "Type" field to determine the type of data sent to you.

Delivery By Deliery 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).

Headers
AccessToken : XXX (provided by you to Flyt)

Body
{
  "type":"delivery-by-delivery-partner",
  "posLocationId" : "BBBBBBBBB", // This is your locationId
  "driver" : // If no driver information exists this section will be removed.
  {
    "first_name" : "John", 
    "last_name" : "Driver",
    "phone_number" : "+447910575785"
  },
  "items":
  [{
      "name" : "Fish and Chips",
      "description" : "The tastiest Fish in the whole world",
      "plu" : "11212121", // The POS unique id for this item
      "price" : 750 //Price as an integer (no decimal places)
      "children" : [
      {
        "name" : "Extra Sauce",
        "description" : "The greatest sauce in the world",
        "plu" : "11211", // The POS unique id for this item
        "price" : 150 //Price as an integer (no decimal places)
        "children": [etc.]

      }]
    }],
    "created_at" : "2018-08-20T18:00:00Z",
    "channel":
    {
      "name":"Uber Eats", //The name of the partner sending the order
    },
    "collect_at" : "2018-08-20T18:30:00Z",
    "collection_notes" : "Notes about the collection",
    "kitchen_notes" : "Notes for the kitchen",
    "third_party_order_reference" : "Uber order Id",
    "total" : 355, //Total of the order in cents.
    "payment_method": "CARD", // The method of payment from the customer 
    "tender_type" : "Uber Eats"// An identifier the POS uses to reconcile payment.
}

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).

Headers
AccessToken : XXX (provided by POS)

Body
{
  "type":"collection-by-customer",
  "posLocationId" : "BBBBBBBBB", // Value stored in Flyt config
  "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", // The POS unique id for this item
      "price" : 750 //Price as an integer (no decimal places)
      "children" : [
      {
        "name" : "Extra Sauce",
        "description" : "The greatest sauce in the world",
        "plu" : "11211", // The POS unique id for this item
        "price" : 150 //Price as an integer (no decimal places)
        "children": [etc.]

      }]
    }
  ],
    "created_at" : "2018-08-20T18:00:00Z",
    "channel":
    {
      "name":"Uber Eats", //The name of the partner sending the order
    },
    "collect_at" : "2018-08-20T18:30:00Z",
    "collection_notes" : "Notes about the collection",
    "kitchen_notes" : "Notes for the kitchen",
    "third_party_order_reference" : "Uber order Id",
    "total" : 355, //Total of the order in cents.
    "payment_method": "CARD", // The method of payment from the customer 
    "tender_type" : "Uber Eats",// An identifier for the tender that the POS should use for the order.
}

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).

Headers
AccessToken : XXX (provided by POS)

Body
{
  "type":"delivery-by-merchant",
  "posLocationId" : "BBBBBBBBB", // Value stored in Flyt config
  "delivery" :
  {
    "first_name" : "John", 
    "last_name" : "Driver",
    "phone_number" : "+447910575785",
    "line_one" : "Address Line 1",        // First line of the customer delivery address
    "line_two" : "Address Line 2",        // Second line of the customer delivery address
    "city" : "City",            // City the customer lives in
    "postcode" : "12335"
  },
  "items":
  [{
    "name" : "Fish and Chips",
    "description" : "The tastiest Fish in the whole world",
    "plu" : "11212121", // The POS unique id for this item
    "price" : 750 //Price as an integer (no decimal places)
    "children" : [
      {
        "name" : "Extra Sauce",
        "description" : "The greatest sauce in the world",
        "plu" : "11211", // The POS unique id for this item
        "price" : 150 //Price as an integer (no decimal places)
        "children": [etc.]

      }]
    }],
    "created_at" : "2018-08-20T18:00:00Z",
    "channel":
    {
      "name":"Uber Eats", //The name of the partner sending the order
    },
    "deliver_at" : "2018-08-20T18:30:00Z",
    "delivery_notes" : "Notes about the delivery",
    "kitchen_notes" : "Notes for the kitchen",
    "third_party_order_reference" : "Uber order Id",
    "total" : 355, //Total of the order in cents.
    "payment_method": "CARD", // The method of payment from the customer 
    "tender_type" : "Uber Eats" // An identifier for the tender that the POS should use for the order.
}

response 200 OK
{ 
    "OrderId": 1234
}

Get Tax, Discounts and Totals

If you support the ability for an order to be sent to you (but not accepted), and the POS calculates the tax, totals and discounts you can implement the following endpoint.

Flyt will call this endpoint with a POST, expecting to get back the order object with the data added..

Headers
AccessToken : XXX (provided by POS)

 {
	"orderId": "String",
	"posLocationId": "String", // Only change to Skip, we will use the POS location id
	"cart": [{
    "quantity": 1,
    "id": "String",  // PLU from the POS
    "name": "String",
    "modifiers": [{
      "quantity": 1,
      "id": "String", //PLU from the POS
      "name": "String"
    }]
  }],
}

Response 200 OK

{
  "orderId": "String",
  "posLocationId": "String", // Only change to Skip, we will use the POS location id
  "id": "String", // A value you can give to this as unique
  "cart": [{
    "quantity": 1,
    "id": "String",
    "price": 250,  // In cents
    "childItems": [{
      "quantity": 1,
      "id": "String",
      "price": 100,  // In cents
      "childItems": "[repeat]"
    }]
  }],
  "subTotal": 350,
  "savings" : 0,
  "total": 450,
  "taxes": [{
    "id": "String",
    "description": "String",
    "amount": 100
  }],
  "errorMessage": "String"	,
  "unavailableProductNumbers": ["string"],
  "receivedat": "datetime",
  "processedat": "datetime",
  "returnedat": "datetime"
}

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)