Create New Order
curl --request POST \
--url 'https://api.example.com/{{orders_api_base_url}}/orders/create/' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": "<string>",
"customer": {
"customer_name": "<string>",
"contact_phone": "<string>",
"email": "<string>",
"delivery_address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"apartment": "<string>",
"delivery_instructions": "<string>"
}
},
"order_items": [
{
"item_id": "<string>",
"quantity": 123,
"special_instructions": "<string>",
"modifiers": [
{}
]
}
],
"order_type": "<string>",
"partner": "<string>",
"payment_method": "<string>",
"special_instructions": "<string>",
"scheduled_time": "<string>",
"created_by": "<string>"
}
'import requests
url = "https://api.example.com/{{orders_api_base_url}}/orders/create/"
payload = {
"store_id": "<string>",
"customer": {
"customer_name": "<string>",
"contact_phone": "<string>",
"email": "<string>",
"delivery_address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"apartment": "<string>",
"delivery_instructions": "<string>"
}
},
"order_items": [
{
"item_id": "<string>",
"quantity": 123,
"special_instructions": "<string>",
"modifiers": [{}]
}
],
"order_type": "<string>",
"partner": "<string>",
"payment_method": "<string>",
"special_instructions": "<string>",
"scheduled_time": "<string>",
"created_by": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
store_id: '<string>',
customer: {
customer_name: '<string>',
contact_phone: '<string>',
email: '<string>',
delivery_address: {
street: '<string>',
city: '<string>',
state: '<string>',
zip_code: '<string>',
apartment: '<string>',
delivery_instructions: '<string>'
}
},
order_items: [
{
item_id: '<string>',
quantity: 123,
special_instructions: '<string>',
modifiers: [{}]
}
],
order_type: '<string>',
partner: '<string>',
payment_method: '<string>',
special_instructions: '<string>',
scheduled_time: '<string>',
created_by: '<string>'
})
};
fetch('https://api.example.com/{{orders_api_base_url}}/orders/create/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{orders_api_base_url}}/orders/create/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'store_id' => '<string>',
'customer' => [
'customer_name' => '<string>',
'contact_phone' => '<string>',
'email' => '<string>',
'delivery_address' => [
'street' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip_code' => '<string>',
'apartment' => '<string>',
'delivery_instructions' => '<string>'
]
],
'order_items' => [
[
'item_id' => '<string>',
'quantity' => 123,
'special_instructions' => '<string>',
'modifiers' => [
[
]
]
]
],
'order_type' => '<string>',
'partner' => '<string>',
'payment_method' => '<string>',
'special_instructions' => '<string>',
'scheduled_time' => '<string>',
'created_by' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{orders_api_base_url}}/orders/create/"
payload := strings.NewReader("{\n \"store_id\": \"<string>\",\n \"customer\": {\n \"customer_name\": \"<string>\",\n \"contact_phone\": \"<string>\",\n \"email\": \"<string>\",\n \"delivery_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\",\n \"apartment\": \"<string>\",\n \"delivery_instructions\": \"<string>\"\n }\n },\n \"order_items\": [\n {\n \"item_id\": \"<string>\",\n \"quantity\": 123,\n \"special_instructions\": \"<string>\",\n \"modifiers\": [\n {}\n ]\n }\n ],\n \"order_type\": \"<string>\",\n \"partner\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"special_instructions\": \"<string>\",\n \"scheduled_time\": \"<string>\",\n \"created_by\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/{{orders_api_base_url}}/orders/create/")
.header("Content-Type", "application/json")
.body("{\n \"store_id\": \"<string>\",\n \"customer\": {\n \"customer_name\": \"<string>\",\n \"contact_phone\": \"<string>\",\n \"email\": \"<string>\",\n \"delivery_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\",\n \"apartment\": \"<string>\",\n \"delivery_instructions\": \"<string>\"\n }\n },\n \"order_items\": [\n {\n \"item_id\": \"<string>\",\n \"quantity\": 123,\n \"special_instructions\": \"<string>\",\n \"modifiers\": [\n {}\n ]\n }\n ],\n \"order_type\": \"<string>\",\n \"partner\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"special_instructions\": \"<string>\",\n \"scheduled_time\": \"<string>\",\n \"created_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{orders_api_base_url}}/orders/create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"store_id\": \"<string>\",\n \"customer\": {\n \"customer_name\": \"<string>\",\n \"contact_phone\": \"<string>\",\n \"email\": \"<string>\",\n \"delivery_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\",\n \"apartment\": \"<string>\",\n \"delivery_instructions\": \"<string>\"\n }\n },\n \"order_items\": [\n {\n \"item_id\": \"<string>\",\n \"quantity\": 123,\n \"special_instructions\": \"<string>\",\n \"modifiers\": [\n {}\n ]\n }\n ],\n \"order_type\": \"<string>\",\n \"partner\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"special_instructions\": \"<string>\",\n \"scheduled_time\": \"<string>\",\n \"created_by\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"order": {
"id": "<string>",
"order_number": "<string>",
"subtotal": "<string>",
"tax_amount": "<string>",
"total_price": "<string>",
"status": "<string>",
"estimated_ready_time": "<string>",
"createdAt": "<string>",
"fulfillment_id": "<string>"
}
}Orders
Create New Order
Create a new order manually through the system, typically for in-store purchases, phone orders, or direct customer orders.
POST
{orders_api_base_url}
/
orders
/
create
/
Create New Order
curl --request POST \
--url 'https://api.example.com/{{orders_api_base_url}}/orders/create/' \
--header 'Content-Type: application/json' \
--data '
{
"store_id": "<string>",
"customer": {
"customer_name": "<string>",
"contact_phone": "<string>",
"email": "<string>",
"delivery_address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"apartment": "<string>",
"delivery_instructions": "<string>"
}
},
"order_items": [
{
"item_id": "<string>",
"quantity": 123,
"special_instructions": "<string>",
"modifiers": [
{}
]
}
],
"order_type": "<string>",
"partner": "<string>",
"payment_method": "<string>",
"special_instructions": "<string>",
"scheduled_time": "<string>",
"created_by": "<string>"
}
'import requests
url = "https://api.example.com/{{orders_api_base_url}}/orders/create/"
payload = {
"store_id": "<string>",
"customer": {
"customer_name": "<string>",
"contact_phone": "<string>",
"email": "<string>",
"delivery_address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>",
"apartment": "<string>",
"delivery_instructions": "<string>"
}
},
"order_items": [
{
"item_id": "<string>",
"quantity": 123,
"special_instructions": "<string>",
"modifiers": [{}]
}
],
"order_type": "<string>",
"partner": "<string>",
"payment_method": "<string>",
"special_instructions": "<string>",
"scheduled_time": "<string>",
"created_by": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
store_id: '<string>',
customer: {
customer_name: '<string>',
contact_phone: '<string>',
email: '<string>',
delivery_address: {
street: '<string>',
city: '<string>',
state: '<string>',
zip_code: '<string>',
apartment: '<string>',
delivery_instructions: '<string>'
}
},
order_items: [
{
item_id: '<string>',
quantity: 123,
special_instructions: '<string>',
modifiers: [{}]
}
],
order_type: '<string>',
partner: '<string>',
payment_method: '<string>',
special_instructions: '<string>',
scheduled_time: '<string>',
created_by: '<string>'
})
};
fetch('https://api.example.com/{{orders_api_base_url}}/orders/create/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{orders_api_base_url}}/orders/create/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'store_id' => '<string>',
'customer' => [
'customer_name' => '<string>',
'contact_phone' => '<string>',
'email' => '<string>',
'delivery_address' => [
'street' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip_code' => '<string>',
'apartment' => '<string>',
'delivery_instructions' => '<string>'
]
],
'order_items' => [
[
'item_id' => '<string>',
'quantity' => 123,
'special_instructions' => '<string>',
'modifiers' => [
[
]
]
]
],
'order_type' => '<string>',
'partner' => '<string>',
'payment_method' => '<string>',
'special_instructions' => '<string>',
'scheduled_time' => '<string>',
'created_by' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{orders_api_base_url}}/orders/create/"
payload := strings.NewReader("{\n \"store_id\": \"<string>\",\n \"customer\": {\n \"customer_name\": \"<string>\",\n \"contact_phone\": \"<string>\",\n \"email\": \"<string>\",\n \"delivery_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\",\n \"apartment\": \"<string>\",\n \"delivery_instructions\": \"<string>\"\n }\n },\n \"order_items\": [\n {\n \"item_id\": \"<string>\",\n \"quantity\": 123,\n \"special_instructions\": \"<string>\",\n \"modifiers\": [\n {}\n ]\n }\n ],\n \"order_type\": \"<string>\",\n \"partner\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"special_instructions\": \"<string>\",\n \"scheduled_time\": \"<string>\",\n \"created_by\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/{{orders_api_base_url}}/orders/create/")
.header("Content-Type", "application/json")
.body("{\n \"store_id\": \"<string>\",\n \"customer\": {\n \"customer_name\": \"<string>\",\n \"contact_phone\": \"<string>\",\n \"email\": \"<string>\",\n \"delivery_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\",\n \"apartment\": \"<string>\",\n \"delivery_instructions\": \"<string>\"\n }\n },\n \"order_items\": [\n {\n \"item_id\": \"<string>\",\n \"quantity\": 123,\n \"special_instructions\": \"<string>\",\n \"modifiers\": [\n {}\n ]\n }\n ],\n \"order_type\": \"<string>\",\n \"partner\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"special_instructions\": \"<string>\",\n \"scheduled_time\": \"<string>\",\n \"created_by\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{orders_api_base_url}}/orders/create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"store_id\": \"<string>\",\n \"customer\": {\n \"customer_name\": \"<string>\",\n \"contact_phone\": \"<string>\",\n \"email\": \"<string>\",\n \"delivery_address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip_code\": \"<string>\",\n \"apartment\": \"<string>\",\n \"delivery_instructions\": \"<string>\"\n }\n },\n \"order_items\": [\n {\n \"item_id\": \"<string>\",\n \"quantity\": 123,\n \"special_instructions\": \"<string>\",\n \"modifiers\": [\n {}\n ]\n }\n ],\n \"order_type\": \"<string>\",\n \"partner\": \"<string>\",\n \"payment_method\": \"<string>\",\n \"special_instructions\": \"<string>\",\n \"scheduled_time\": \"<string>\",\n \"created_by\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"order": {
"id": "<string>",
"order_number": "<string>",
"subtotal": "<string>",
"tax_amount": "<string>",
"total_price": "<string>",
"status": "<string>",
"estimated_ready_time": "<string>",
"createdAt": "<string>",
"fulfillment_id": "<string>"
}
}This endpoint allows stores to create new orders directly in the system, bypassing delivery platforms. This is useful for in-store purchases, phone orders, catering orders, or any direct customer transactions.
This endpoint creates orders that are immediately available for fulfillment and can be integrated with your existing POS system or used for direct customer service.
Request Body
string
required
The unique identifier of the store creating the order
object
required
Customer information for the order
Show Customer Object
Show Customer Object
string
required
Customer’s full name
string
required
Customer’s contact phone number
string
Customer’s email address
array
required
string
required
Type of order: “pickup”, “delivery”, “dine_in”
string
default:"LulaDirect"
Source platform (defaults to “LulaDirect” for manual orders)
string
required
Payment method: “cash”, “card”, “online”, “corporate_account”
string
General order-level special instructions
string
Scheduled pickup/delivery time (ISO 8601 format). If not provided, order is for immediate fulfillment
string
required
Employee ID who created the order
Response
boolean
Indicates whether the order was successfully created
string
Confirmation message or error details
object
Complete order object with all calculated values
Show Created Order Object
Show Created Order Object
string
Unique order identifier
string
Human-readable order number for customer reference
string
Order subtotal before taxes and fees
string
Calculated tax amount
string
Final total price including all fees and taxes
string
Initial order status (typically “pending” or “confirmed”)
string
Estimated time when order will be ready
string
Order creation timestamp
string
Unique identifier for fulfillment tracking
Request Example
{
"store_id": "449235c1-3d04-4519-998b-40d2a621e5e0",
"customer": {
"customer_name": "John Smith",
"contact_phone": "+1 555-123-4567",
"email": "[email protected]",
"delivery_address": {
"street": "123 Main Street",
"city": "Chicago",
"state": "IL",
"zip_code": "60601",
"apartment": "Apt 4B",
"delivery_instructions": "Ring doorbell twice"
}
},
"order_items": [
{
"item_id": "prod_12345",
"quantity": 2,
"special_instructions": "Extra hot",
"modifiers": [
{
"modifier_id": "size_large",
"value": "Large"
}
]
},
{
"item_id": "prod_67890",
"quantity": 1,
"special_instructions": "No ice"
}
],
"order_type": "delivery",
"partner": "LulaDirect",
"payment_method": "card",
"special_instructions": "Please call when arriving",
"scheduled_time": "2024-01-15T18:30:00Z",
"created_by": "emp_abc123"
}
Response Example
{
"success": true,
"message": "Order successfully created and added to fulfillment queue",
"order": {
"id": "ord_new_123456",
"order_number": "LD-2024-001234",
"subtotal": "28.50",
"tax_amount": "2.28",
"total_price": "30.78",
"status": "confirmed",
"estimated_ready_time": "2024-01-15T18:30:00Z",
"createdAt": "2024-01-15T17:45:00Z",
"fulfillment_id": "ful_abc789",
"customer": {
"customer_name": "John Smith",
"contact_phone": "+1 555-123-4567",
"email": "[email protected]"
},
"order_items": [
{
"id": "oi_item1",
"item_name": "Large Coffee",
"quantity": 2,
"unit_price": "4.50",
"total_price": "9.00",
"special_instructions": "Extra hot"
},
{
"id": "oi_item2",
"item_name": "Iced Tea",
"quantity": 1,
"unit_price": "3.25",
"total_price": "3.25",
"special_instructions": "No ice"
}
]
}
}
Order Creation Workflow
Order Creation Workflow
When an order is created, the following processes occur automatically:
- Inventory Check: Verify item availability
- Price Calculation: Calculate subtotal, taxes, and total
- Order Number Generation: Create unique customer-facing order number
- Fulfillment Creation: Initialize fulfillment tracking
- Kitchen Notification: Alert preparation staff (if applicable)
- Customer Notification: Send confirmation (if email provided)
- Payment Hold: Initiate payment processing (for card payments)
Order Numbers: The system generates human-readable order numbers (e.g., “LD-2024-001234”) for customer reference, separate from the internal UUID.
Scheduled Orders: Use the scheduled_time parameter for advance orders. The order will automatically enter the fulfillment queue at the appropriate time.
Error Responses
Common Error Scenarios
Common Error Scenarios
Item Not AvailableInvalid Address (for delivery orders)Payment Processing Error
{
"success": false,
"message": "One or more items are not available",
"error_code": "ITEM_UNAVAILABLE",
"unavailable_items": ["prod_12345"]
}
{
"success": false,
"message": "Delivery address is outside service area",
"error_code": "INVALID_DELIVERY_ADDRESS"
}
{
"success": false,
"message": "Payment method could not be processed",
"error_code": "PAYMENT_FAILED"
}
Payment Processing: For card payments, ensure your payment processor is configured correctly. Failed payment processing will prevent order creation.
Use Cases
Common Use Cases
Common Use Cases
Phone Orders
- Customer calls to place order
- Staff member creates order in system
- Customer pays on pickup/delivery
- Walk-in customer orders
- Immediate or scheduled preparation
- Integration with POS system
- Large scheduled orders
- Corporate accounts
- Advance preparation planning
- Pre-orders for events
- Bulk order management
- Custom pricing arrangements
⌘I

