Skip to content
Fourohtwo

prop.halowerk.com/v1/occupancy-optimize

Sorts groups by size, then assigns each to the available room that has all required features and minimizes unused capacity, hourly cost and room identifier in that order. This fast heuristic is not guaranteed globally optimal and does not handle time overlap, accessibility beyond supplied features, movement, privacy or building-code constraints.

BaseAnswering
POSThttps://prop.halowerk.com/v1/occupancy-optimize

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://prop.halowerk.com/v1/occupancy-optimize", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"groups":[{"group_id":"design","people":12,"required_features":["video"]},{"group_id":"review","people":7,"required_features":["screen"]}],"rooms":[{"capacity":8,"features":["screen"],"hourly_cost":40,"room_id":"r-101"},{"capacity":14,"features":["screen","video"],"hourly_cost":65,"room_id":"r-202"},{"capacity":20,"features":["screen","video","accessible"],"hourly_cost":72,"room_id":"r-303"}]}),
});
console.log(await res.json());

Example input

{
  "groups": [
    {
      "group_id": "design",
      "people": 12,
      "required_features": [
        "video"
      ]
    },
    {
      "group_id": "review",
      "people": 7,
      "required_features": [
        "screen"
      ]
    }
  ],
  "rooms": [
    {
      "capacity": 8,
      "features": [
        "screen"
      ],
      "hourly_cost": 40,
      "room_id": "r-101"
    },
    {
      "capacity": 14,
      "features": [
        "screen",
        "video"
      ],
      "hourly_cost": 65,
      "room_id": "r-202"
    },
    {
      "capacity": 20,
      "features": [
        "screen",
        "video",
        "accessible"
      ],
      "hourly_cost": 72,
      "room_id": "r-303"
    }
  ]
}