Order feed guide
Prepline reads WooCommerce stores directly. Any other site, whether custom-built, headless or anything else, can share its orders through one private address. This page is for whoever builds your site. Adding it usually takes about an hour.
How it works
Your site adds one address, for example https://yourkitchen.com/api/prepline/orders. When the kitchen opens the prep sheet, Prepline asks it for a week of orders:
GET https://yourkitchen.com/api/prepline/orders?from=2026-10-12&to=2026-10-18
Authorization: Bearer <your feed key>- from and to are dates in your store's time zone. Include every order placed on those days, the last day included.
- The feed key is a long random password you make (at least 16 characters, for example from
openssl rand -hex 24). Store it on your site, check it on every request, and paste the same key into Prepline. Reject anything without it. - Only answer over https. Prepline only reads; the address never changes anything.
What to send back
JSON, in this shape:
{
"orders": [
{
"id": "1042",
"status": "paid",
"createdAt": "2026-10-12T09:41:00-06:00",
"items": [
{
"productId": "bulgogi-chicken",
"name": "Bulgogi Chicken",
"size": "Medium 6oz",
"quantity": 2,
"options": { "Extras": "Extra Protein (+2oz)", "Substitutes": "Sweet potato" },
"note": "No sesame, allergy"
},
{
"name": "7 Meal Special",
"size": "Large 8oz",
"quantity": 1
}
]
}
],
"products": [
{
"id": "bulgogi-chicken",
"name": "Bulgogi Chicken",
"categories": ["Current Menu"],
"protein": "Chicken",
"prepType": "Grilled",
"starch": "Jasmine Rice",
"sides": ["Broccoli"]
}
],
"next": null
}| Field | Meaning | |
|---|---|---|
| id | Required | Your order number. |
| status | Required | paid, processing, completed or on-hold are cooked. Anything else (pending, refunded, cancelled) is skipped. |
| createdAt | Required | When it was ordered, ISO 8601. Use your store's local offset, so the date part is your local date. |
| items[].name | Required | The dish or product name, as on your menu. |
| items[].size | Recommended | The meal size the customer picked, with ounces: "Small 4oz", "Medium 6oz", "Large 8oz". |
| items[].quantity | Required | How many. |
| items[].productId | Recommended | Matches products[].id, so renaming a dish doesn't break anything. |
| items[].options | Optional | Other choices: { "Extras": "...", "Substitutes": "...", "Sauces": "..." }. |
| items[].note | Optional | Customer notes. Shown on the sheet, so allergy notes reach the kitchen. |
| products[] | Recommended | Your current dishes, with protein and prepType, so Prepline knows what to pull. Tag this week's dishes with a category such as "Current Menu". |
| next | Optional | If there are many orders, a link to the next page on the same site. Prepline follows it. |
Privacy
Don't send customer names, emails, phone numbers or addresses. Prepline doesn't need them to count what to cook.
Example
A minimal version for a Next.js site. Other frameworks work the same way.
// app/api/prepline/orders/route.ts (Next.js example)
import { NextResponse } from "next/server";
import { db } from "@/lib/db"; // your database
export async function GET(req: Request) {
// 1) Only Prepline, holding your key, may read this.
const auth = req.headers.get("authorization") || "";
if (auth !== `Bearer ${process.env.PREPLINE_FEED_KEY}`) {
return NextResponse.json({ error: "unauthorized" }, { status: 401 });
}
// 2) Orders placed from..to (inclusive), in your store's time zone.
const { searchParams } = new URL(req.url);
const from = searchParams.get("from"); // "2026-10-12"
const to = searchParams.get("to"); // "2026-10-18"
const orders = await db.orders.findBetween(from, to);
// 3) Answer in Prepline's format. No customer names, emails or addresses.
return NextResponse.json({
orders: orders.map((o) => ({
id: o.id,
status: o.paid ? "paid" : o.status,
createdAt: o.createdAt.toISOString(), // or with your local offset
items: o.items.map((i) => ({
productId: i.productId,
name: i.productName,
size: i.sizeLabel,
quantity: i.quantity,
options: i.options,
note: i.note,
})),
})),
products: await db.products.forPrepline(),
});
}Connecting it
In Prepline, the kitchen owner goes to Connect your store → Custom site and pastes the feed address and key. Prepline requests the last seven days to check the feed answers before saving.
Questions: hello@getprepline.com