> ## Documentation Index
> Fetch the complete documentation index at: https://docs.series.hr/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Order

> Create a new F&B order

Create a new F\&B order. The API validates that all menu items exist and are available, checks gamepass ownership requirements, and auto-assigns a table for dine-in orders when no specific table is requested.

## Request

```bash theme={null}
curl -X POST https://api.series.hr/fnb/create-order \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "CustomerTarget": "714760171",
    "OrderType": "dine-in",
    "TableNumber": "T1",
    "Items": [
      {
        "MenuItemId": "item-1",
        "Quantity": 2,
        "Notes": "Extra hot"
      },
      {
        "MenuItemId": "item-3",
        "Quantity": 1
      }
    ]
  }'
```

## Body

<ParamField body="CustomerTarget" type="string" required>
  Roblox user ID or username of the customer.
</ParamField>

<ParamField body="Items" type="array" required>
  Array of order items. Each item requires a `MenuItemId` and optionally `Quantity` (default 1, max 100) and `Notes` (max 500 characters).
</ParamField>

<ParamField body="OrderType" type="string">
  Order type: `dine-in` (default) or `to-go`.
</ParamField>

<ParamField body="TableNumber" type="string">
  Specific table number for dine-in orders. If omitted, an available table is auto-assigned when possible.
</ParamField>

<ParamField body="OrderNumber" type="string">
  Custom order number. If omitted, auto-increments from the last order.
</ParamField>

## Response

<ResponseField status={200} name="200">
  ```json theme={null}
  {
    "success": true,
    "data": {
      "WorkspaceId": "a7d5339a-5531-4336-99c6-6f3249c9ac20",
      "OrderNumber": "13",
      "Action": "create",
      "Order": {
        "Id": "1717027200000",
        "Customer": {
          "UserId": 714760171,
          "Username": "builderman",
          "DisplayName": "Builderman",
          "AvatarUrl": "https://tr.rbxcdn.com/..."
        },
        "OrderType": "dine-in",
        "TableNumber": "T1",
        "OrderNumber": "13",
        "Items": [
          {
            "MenuItemId": "item-1",
            "Name": "Espresso",
            "Quantity": 2,
            "Price": 25,
            "Notes": "Extra hot"
          },
          {
            "MenuItemId": "item-3",
            "Name": "Croissant",
            "Quantity": 1,
            "Price": 15,
            "Notes": ""
          }
        ],
        "Status": "pending",
        "ClaimStatus": "not-claimed",
        "ClaimedBy": null,
        "Total": 65,
        "CreatedAt": "2026-04-05T11:30:00.000Z",
        "CreatedBy": "714760171"
      }
    }
  }
  ```
</ResponseField>

## Status Codes

* `200`: Order created successfully
* `400`: Invalid input, menu item not found or unavailable, gamepass check failed, or table not found
* `401`: API key is required or invalid
* `403`: F\&B module is disabled or workspace access is denied


## OpenAPI

````yaml POST /fnb/create-order
openapi: 3.0.0
info:
  title: Series API
  version: 1.0.0
  description: >-
    Series API — a free REST API by Sailboat Games, LLC that lets Roblox
    communities programmatically manage workspaces, staff, sessions, time-off
    and activity data.
  contact:
    name: Sailboat Games, LLC.
    email: admin@sailboatgames.com
servers:
  - url: https://api.series.hr
    description: Production API
security:
  - ApiKeyAuth: []
paths:
  /fnb/create-order:
    post:
      tags:
        - Food & Beverage
      summary: Create an order
      description: >-
        Create a new F&B order. Validates menu items, checks gamepass ownership
        requirements, and auto-assigns tables for dine-in orders.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - CustomerTarget
                - Items
              properties:
                CustomerTarget:
                  type: string
                  description: Roblox user ID or username of the customer
                Items:
                  type: array
                  description: Array of order items
                  items:
                    type: object
                    required:
                      - MenuItemId
                    properties:
                      MenuItemId:
                        type: string
                      Quantity:
                        type: integer
                        minimum: 1
                        maximum: 100
                      Notes:
                        type: string
                OrderType:
                  type: string
                  enum:
                    - dine-in
                    - to-go
                  description: 'Order type (default: dine-in)'
                TableNumber:
                  type: string
                  description: Specific table number for dine-in orders
                OrderNumber:
                  type: string
                  description: Custom order number (auto-increments if omitted)
      responses:
        '200':
          description: Order created
        '400':
          description: Invalid input, item unavailable, or gamepass check failed
        '401':
          description: API key is required
        '403':
          description: F&B module disabled or access denied
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Pass your API key in the `apikey` header. Alternatively, the `x-api-key`
        header is also accepted.

````