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

# Revel Systems

> Orders, products, customers, inventory, employees, and POS management.

The Revel Systems connector lets your workflows manage orders, products, customers, inventory, and employees through the Revel Systems POS API.

<Note>
  For the full API reference, see the [Revel Systems API documentation](https://developer.revelsystems.com/).
</Note>

<Snippet file="connection-note.mdx" />

## Connection setup

<Steps>
  <Step title="Get your API credentials">
    Log in to your Revel Systems account and navigate to the developer settings to obtain your **API Key** and **API Secret**. You'll also need your account **subdomain** (the part before `.revelup.com`).
  </Step>

  <Step title="Add the connection in Spojit">
    Go to **Connections** in Spojit, click **Add Connection**, select **Revel Systems**, and enter:

    * **Subdomain**: Your Revel subdomain (e.g., `mystore`)
    * **API Key**: Your Revel API key
    * **API Secret**: Your Revel API secret
  </Step>
</Steps>

## Tools

### Orders

<AccordionGroup>
  <Accordion title="list-orders: List orders with filters">
    <ParamField body="limit" type="number" default="20">Number of results to return.</ParamField>
    <ParamField body="offset" type="number">Offset for pagination.</ParamField>
    <ParamField body="created_date__gte" type="string">Filter orders created on or after this date (ISO 8601).</ParamField>
    <ParamField body="created_date__lte" type="string">Filter orders created on or before this date (ISO 8601).</ParamField>
    <ParamField body="establishment" type="number">Filter by establishment ID.</ParamField>
    <ParamField body="ordering" type="string">Sort field (e.g., `-created_date`).</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "limit": 5,
      "created_date__gte": "2024-06-01T00:00:00",
      "ordering": "-created_date"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "meta": {
        "limit": 5,
        "next": "/resources/Order/?limit=5&offset=5",
        "offset": 0,
        "previous": null,
        "total_count": 142
      },
      "objects": [
        {
          "id": 10542,
          "created_date": "2024-06-15T14:32:00",
          "closed_date": "2024-06-15T14:45:00",
          "establishment": "/enterprise/Establishment/1/",
          "dining_option": 0,
          "subtotal": 28.50,
          "tax": 2.85,
          "total": 31.35,
          "discount_amount": 0,
          "orderitem_set": [
            "/resources/OrderItem/45321/",
            "/resources/OrderItem/45322/"
          ]
        }
      ]
    }
    ```
  </Accordion>

  <Accordion title="get-order: Get order by ID">
    <ParamField body="id" type="number" required>Revel order ID.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "id": 10542
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 10542,
      "created_date": "2024-06-15T14:32:00",
      "closed_date": "2024-06-15T14:45:00",
      "establishment": "/enterprise/Establishment/1/",
      "dining_option": 0,
      "subtotal": 28.50,
      "tax": 2.85,
      "total": 31.35,
      "discount_amount": 0,
      "notes": "Extra napkins",
      "customer": "/resources/Customer/456/",
      "orderitem_set": [
        "/resources/OrderItem/45321/",
        "/resources/OrderItem/45322/"
      ],
      "payments": [
        "/resources/Payment/7890/"
      ]
    }
    ```
  </Accordion>

  <Accordion title="create-order: Create an order">
    <ParamField body="order" type="object" required>Order object with establishment, items, dining\_option, etc.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "order": {
        "establishment": "/enterprise/Establishment/1/",
        "dining_option": 0,
        "notes": "Gluten-free",
        "items": [
          {
            "product": "/resources/Product/101/",
            "quantity": 2,
            "price": 12.99
          }
        ]
      }
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 10543,
      "created_date": "2024-06-15T15:00:00",
      "establishment": "/enterprise/Establishment/1/",
      "dining_option": 0,
      "subtotal": 25.98,
      "tax": 2.60,
      "total": 28.58,
      "resource_uri": "/resources/Order/10543/"
    }
    ```
  </Accordion>
</AccordionGroup>

### Products

<AccordionGroup>
  <Accordion title="list-products: List products">
    <ParamField body="limit" type="number" default="20">Number of results.</ParamField>
    <ParamField body="offset" type="number">Offset for pagination.</ParamField>
    <ParamField body="name" type="string">Filter by product name.</ParamField>
    <ParamField body="active" type="boolean">Filter by active status.</ParamField>
    <ParamField body="ordering" type="string">Sort field.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "active": true,
      "limit": 3
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "meta": { "limit": 3, "total_count": 85 },
      "objects": [
        {
          "id": 101,
          "name": "Margherita Pizza",
          "price": 14.99,
          "cost": 4.50,
          "barcode": "123456789",
          "active": true,
          "category": "/resources/ProductCategory/5/",
          "tax_class": "/resources/TaxClass/1/"
        },
        {
          "id": 102,
          "name": "Caesar Salad",
          "price": 10.99,
          "cost": 3.20,
          "active": true,
          "category": "/resources/ProductCategory/6/"
        }
      ]
    }
    ```
  </Accordion>

  <Accordion title="get-product: Get product by ID">
    <ParamField body="id" type="number" required>Revel product ID.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "id": 101
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 101,
      "name": "Margherita Pizza",
      "price": 14.99,
      "cost": 4.50,
      "barcode": "123456789",
      "active": true,
      "description": "Classic margherita with fresh mozzarella and basil",
      "category": "/resources/ProductCategory/5/",
      "tax_class": "/resources/TaxClass/1/",
      "resource_uri": "/resources/Product/101/"
    }
    ```
  </Accordion>

  <Accordion title="create-product: Create a product">
    <ParamField body="product" type="object" required>Product object with name, price, cost, barcode, category, etc.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "product": {
        "name": "Tiramisu",
        "price": 8.99,
        "cost": 2.50,
        "barcode": "987654321",
        "active": true,
        "category": "/resources/ProductCategory/7/",
        "description": "Classic Italian dessert"
      }
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 201,
      "name": "Tiramisu",
      "price": 8.99,
      "active": true,
      "resource_uri": "/resources/Product/201/"
    }
    ```
  </Accordion>
</AccordionGroup>

### Customers

<AccordionGroup>
  <Accordion title="list-customers: List customers">
    <ParamField body="limit" type="number" default="20">Number of results.</ParamField>
    <ParamField body="offset" type="number">Offset for pagination.</ParamField>
    <ParamField body="email" type="string">Filter by email.</ParamField>
    <ParamField body="phone_number" type="string">Filter by phone number.</ParamField>
    <ParamField body="ordering" type="string">Sort field.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "limit": 2
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "meta": { "limit": 2, "total_count": 340 },
      "objects": [
        {
          "id": 456,
          "first_name": "John",
          "last_name": "Smith",
          "email": "john.smith@example.com",
          "phone_number": "+15005550001",
          "address": "123 Main St, New York, NY 10001",
          "loyalty_points": 250
        },
        {
          "id": 457,
          "first_name": "Jane",
          "last_name": "Doe",
          "email": "jane.doe@example.com",
          "phone_number": "+15005550002",
          "loyalty_points": 180
        }
      ]
    }
    ```
  </Accordion>

  <Accordion title="get-customer: Get customer by ID">
    <ParamField body="id" type="number" required>Revel customer ID.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "id": 456
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 456,
      "first_name": "John",
      "last_name": "Smith",
      "email": "john.smith@example.com",
      "phone_number": "+15005550001",
      "address": "123 Main St, New York, NY 10001",
      "loyalty_points": 250,
      "created_date": "2024-01-15T09:00:00",
      "resource_uri": "/resources/Customer/456/"
    }
    ```
  </Accordion>

  <Accordion title="create-customer: Create a customer">
    <ParamField body="customer" type="object" required>Customer object with first\_name, last\_name, email, phone\_number, address, etc.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "customer": {
        "first_name": "Emily",
        "last_name": "Chen",
        "email": "emily.chen@example.com",
        "phone_number": "+15005550003",
        "address": "456 Oak Ave, San Francisco, CA 94102"
      }
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": 789,
      "first_name": "Emily",
      "last_name": "Chen",
      "email": "emily.chen@example.com",
      "resource_uri": "/resources/Customer/789/"
    }
    ```
  </Accordion>
</AccordionGroup>

### Inventory

<AccordionGroup>
  <Accordion title="list-inventory: Check stock levels">
    <ParamField body="limit" type="number" default="20">Number of results.</ParamField>
    <ParamField body="offset" type="number">Offset for pagination.</ParamField>
    <ParamField body="product" type="number">Filter by product ID.</ParamField>
    <ParamField body="establishment" type="number">Filter by establishment ID.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "establishment": 1,
      "limit": 3
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "meta": { "limit": 3, "total_count": 85 },
      "objects": [
        {
          "id": 1001,
          "product": "/resources/Product/101/",
          "establishment": "/enterprise/Establishment/1/",
          "qty": 45.0,
          "updated_date": "2024-06-15T08:00:00"
        },
        {
          "id": 1002,
          "product": "/resources/Product/102/",
          "establishment": "/enterprise/Establishment/1/",
          "qty": 12.0,
          "updated_date": "2024-06-15T08:00:00"
        }
      ]
    }
    ```
  </Accordion>
</AccordionGroup>

### Employees

<AccordionGroup>
  <Accordion title="list-employees: List employees">
    <ParamField body="limit" type="number" default="20">Number of results.</ParamField>
    <ParamField body="offset" type="number">Offset for pagination.</ParamField>
    <ParamField body="establishment" type="number">Filter by establishment ID.</ParamField>
    <ParamField body="ordering" type="string">Sort field.</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "establishment": 1
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "meta": { "limit": 20, "total_count": 15 },
      "objects": [
        {
          "id": 301,
          "first_name": "Alice",
          "last_name": "Johnson",
          "email": "alice@restaurant.com",
          "role": "/resources/Role/2/",
          "establishment": "/enterprise/Establishment/1/",
          "status": 0,
          "hire_date": "2023-06-01"
        },
        {
          "id": 302,
          "first_name": "Bob",
          "last_name": "Williams",
          "email": "bob@restaurant.com",
          "role": "/resources/Role/3/",
          "establishment": "/enterprise/Establishment/1/",
          "status": 0,
          "hire_date": "2024-01-15"
        }
      ]
    }
    ```
  </Accordion>
</AccordionGroup>

### Advanced

<AccordionGroup>
  <Accordion title="raw-api-request: Make an arbitrary API request">
    Send a request to any Revel Systems API endpoint.
    <ParamField body="method" type="string" required>HTTP method: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`.</ParamField>
    <ParamField body="path" type="string" required>API path (e.g., `/resources/Discount/` or `/resources/Tax/`).</ParamField>
    <ParamField body="body" type="object">Request body (for POST/PUT/PATCH).</ParamField>

    **Example request:**

    ```json theme={null}
    {
      "method": "GET",
      "path": "/resources/Discount/",
      "body": null
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "meta": { "limit": 20, "total_count": 3 },
      "objects": [
        {
          "id": 1,
          "name": "Happy Hour 20%",
          "type": 0,
          "value": 20.0,
          "active": true
        },
        {
          "id": 2,
          "name": "Employee Discount",
          "type": 0,
          "value": 50.0,
          "active": true
        }
      ]
    }
    ```
  </Accordion>
</AccordionGroup>
