Install
openclaw skills install wol-catering-api-v2Access the Wake-up On LAN catering API to list menu items, place orders by product ID and quantity, and view order history with account balance.
openclaw skills install wol-catering-api-v2Interact with the Wake-up On LAN catering system via its REST API using curl.
Run these two shell commands to check for environment variables:
echo "${WOL_API_TOKEN}"
echo "${WOL_BASE_URL}"
WOL_API_TOKEN is empty, ask the user:
"Please paste your API token, or configure the WOL_API_TOKEN environment variable. You can generate one at
/user/api-tokenson the WOL site."
WOL_BASE_URL is empty, asume https://wollan.nl as the base url.Store the resolved values as TOKEN and BASE_URL for use in the commands below.
Look at $ARGUMENTS and the user's message to determine which action to take.
Trigger: $ARGUMENTS contains products, or the user asks what is available / what's on the menu.
curl -s \
-H "Authorization: Bearer $TOKEN" \
"$BASE_URL/api/v1/catering/products"
Present the result grouped by category. For each product show:
€X.XX (response values are in euro cents — divide by 100)inStock / out of stock)Trigger: $ARGUMENTS contains order, or the user says they want to order something.
Parse items from $ARGUMENTS in the format productId:quantity,... (e.g. order 3:2,5:1 means product 3 qty 2, product 5 qty 1). If no items are provided in $ARGUMENTS, ask the user which products and quantities they want (show the menu first if needed).
Assume a quantity of 1 if the user provides a product or list of products without quantities.
Build the JSON body and POST:
curl -s -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"items": [{"productId": PRODUCT_ID, "quantity": QUANTITY}]}' \
"$BASE_URL/api/v1/catering/orders"
On 201 Created: show a confirmation with the order ID, items, and total cost (sum of quantity × productPrice for all items, formatted as €X.XX).
Trigger: $ARGUMENTS contains history, is empty, or the user asks about their orders / balance.
curl -s \
-H "Authorization: Bearer $TOKEN" \
"$BASE_URL/api/v1/catering/orders"
Present the account summary as a table:
| Amount | |
|---|---|
| Total spent | €X.XX |
| Total paid | €X.XX |
| Balance (owed) | €X.XX |
| Pending (in progress) | €X.XX |
Then list each order with its ID, date, status, and items. Only show the detailed order list if the user asks for it.
Order status meanings:
accepted — received, being preparedwaiting — queued behind other ordersready — ready for pick-upcomplete — picked up / donecancelled / rejected — not fulfilled| HTTP status | Meaning | Action |
|---|---|---|
401 Unauthorized | Token invalid or expired | Ask the user to generate a new token at /user/api-tokens and set WOL_API_TOKEN |
403 Forbidden | Not registered / not paid for the active event, | User needs to register for the active event and pay on the WOL site |
422 Unprocessable Entity | Invalid product ID, quantity < 1, or out of stock, or ordering has been disabled by crew | Check the error message: if it mentions "disabled by crew", inform the user that ordering is temporarily paused and they should try again later; If out of stock: Inform the user that the product is out of stock and suggest an alternative product from the same category if available. If other message: Show the error message from the response; suggest running the products command to check availability |
503 Service Unavailable | No active catering event configured | Inform the user the catering system has no active event; contact the site admin |
500 Internal server error | Something is wrong with the service, nothing the user can fix. | Inform the user that there is a problem with the service, this is nothing the user can fix; contact the site admin |
250 → €2.50).curl -s flag suppresses progress output. Pipe through | python3 -m json.tool or similar if you want to inspect raw JSON./user/api-tokens (web UI, requires login). Each token can have a name and optional expiry date.