🛎️Send orders

This page provides a full description of all the routes available for handling orders. Each route is explained with its parameters, required headers, possible responses and examples of use.

➡️ Push an order

💡 Models

Order

Parameter
Type
Explanation
Mandatory

total

number

Total including discounts and charges.

currency

string

Currency code ISO 4217

items

See OrderItem model below

private_ref

string

The ID of the order in the partner system (Must be unique)

created_at

Date

Date and time when the order was created format ISO 8601

subtotal

number

Total without discounts and charges.

table_ref

string

ID of the table in the partner system

table_name

string

Name of the table in the partner system

service_type

If not provided, default value "eat_in" will be used.

guest_count

number

Number of guests for the order, if not provided default value "1" will be set.

OrderItem

Parameter
Type
Explanation
Mandatory

ref

string

ID of the item within the order

product_ref

string

Item ID in the partner system

product_name

string

Item name

price

number

Price of the item

subtotal

number

Sum of the price of the item and its options, multiplied by the quantity

quantity

number

Item quantity

options

Item options

category_ref

string

Category ID of the item

category_name

string

Category name of the item

tax_rate

number

Tax rate in percent (0 - 100)

tax_price

number

Tax price for the item

OrderOption

Parameter
Type
Explanation
Mandatory

ref

string

ID of the option in the partner system

name

string

Name of the option

price

number

Price of the option

quantity

number

Quantity of the option

SupportedServiceType Enum

Value
Explanation

view

Menu consultation only

eat_in

Eat directly at the restaurant

collection

Order pick-up at the restaurant

delivery

Order in delivery

checkout

Payment only after eating in the restaurant

🧾 Push an order

This route is dedicated to sending orders to Fyre. It enables your orders to be integrated easily and securely directly into our system. Using this route, you can transmit the details of your orders, which will then be processed by our API.

POST https://api.fyre.app/api/v1/locations/{fyre_id}/orders

Requires permission:

  • orders.create

HTTP headers: X-API-KEY: <your token>

Payload ⬇️

{
    order: Order
}

📤 Responses

200 - Success

Order created successfully.

401 - Unauthorized

Unauthorized

Message: error

📖 Payload example

{
  total: 8,
  currency: "EUR",
  items: [
    {
      ref: "Cheese123",
      product_ref: "CheeseBurg",
      product_name: "Cheeseburger",
      price: 7,
      subtotal: 8,
      quantity: 1,
      options: [
        {
          ref: "Ketchup1",
          name: "Ketchup",
          price: 1,
          quantity: 1,
        },
      ],
      category_ref: "Burgers-456",
      category_name: "Burgers",
      tax_rate: 20,
      tax_price: 1.6,
    },
  ],
  private_ref: "ABZQK4904",
  subtotal: 8,
  table_ref: "108",
  table_name: "eat_in_table",
  service_type: "eat_in",
  guest_count: 1,
  created_at: "2024-07-24T14:39:39.445Z",
}

🗃️ Import orders

To transmit large volumes of sales data, we use CSV files.

CSV files must comply with the RFC 4180 standard format:

  • Field Separation: Data fields should be separated by commas.

  • Value Escaping: Values containing reserved characters (such as commas, double quotes, etc.) must be enclosed in double-quotes.

To optimize performance and minimize data loss, the CSV file contents should be organized as follows:

  • Each row represents an individual order item.

  • Rows must be sorted by the order_id column to determine the start and end of each order.

  • Files should generally not exceed 20MB but can be smaller, depending on how you can chunk the data (e.g., daily sales, weekly sales, etc.).

POST https://api.fyre.app/api/v1/locations/{fyre_id}/orders/import

Requires permission:

  • orders.import

Payload ⬇️

{
    file: File
}

File structure

Column
Type
Mandatory
Explanation

location_ref

string

Unique identifier for a location in the external system

order_id

string

Unique identifier for a order in the external system. Must be unique when combined with location_ref

source_id

string

Unique identifier of the individual order item. Must be unique when combined with location_ref

parent_source_id

string

If the item is part of a combo (e.g., meal deals, topings, modifiers, cocktails), this field holds the source_id of the parent item

product_ref

string

Product identifier in the external system

product_name

string

Product name

category_ref

string

Category identifier in an external system

category_name

string

Category name

cost

number

Purchase price of the product in the order, if available

quantity

number

Quantity of ordered items

price

number

Price of individual item

options_price

number

Total price of child items that share the same parent_source_id

subtotal

number

Cost of an order item including options:

(price + options_price) * quantity

currency

string

Currency in ISO 4217 format. If not provided it will use the location currency

tax_price

number

Total tax amount for the ordered item, rounded to two decimal places.

tax_rate

number

The tax rate for an ordered item is a percentage between 0 and 100.

guests_count

number

Number of guests. If not provided it will default to 1

timezone

string

Timezone name in ISO-8601 format. If not provided it will use the location timezone

created_at

string

Order creation date in ISO 8601 format, expressed in UTC.

Below is a sample CSV file that follows the specified standard.

Last updated