Skip to content
New

Wireless docking & charging is now available for Model C2 Large, PartPorter, and Heavy. Learn more

For developers

Model C2 API guides.

Two ways to program Model C2: a WebSocket API that talks to each robot over your local network, and a REST API through Cloud Connect®. Both guides come in one e-mail.

  • Two free PDFs
  • WebSocket and REST
  • Examples in both

Get both guides

Fill in the form and we’ll e-mail you both PDFs.

    What’s inside

    Two APIs, one download.

    Pick the API that fits your project, or use both. Which one fits?

    On your local network

    WebSocket API guide

    Talk to one robot directly over your Wi-Fi, with no Cloud Connect or internet needed. Every message is shown as JSON.

    • Waypoints and routes

      List them, send a cart to a Waypoint, or start and cancel a route. navigateToWaypoint

    • Live status

      Battery, position, speed, and the distance and time left to go. robotStatus

    • Trip results

      Know when a trip or route starts, finishes, or stops short. navigationResult

    • Map and zones

      The facility map with its no-go, speed, sound & light, door, and slope zones. zones

    • Sensors and camera

      Time-of-Flight readings, and a live camera stream on software 3.2 and later. tofs

    Through Cloud Connect®

    API Programming Guide (REST)

    Work with the carts on your Cloud Connect account over HTTPS, with a complete Ruby example for each call.

    • Authentication

      Sign in with a username and password to start a session. Quasi::User.authenticate

    • Listing carts

      Get every cart available to the signed-in user. Cart.list

    • Finding a cart

      Look up a cart by serial number, with its Waypoints and routes. Cart.find_by_sn

    • Navigating a cart

      Send a cart to a Waypoint and follow its progress. navigate_to

    • Starting a route

      Start one of a cart’s pre-defined routes. start_route

    A first look

    Send a cart to a Waypoint in a few lines.

    Over WebSocket, connect to the cart’s address on your network and send JSON. Over REST, sign in through Cloud Connect and find the cart by its serial number.

    // navigate_cart.js: send a cart to its first Waypoint
    const ws = new WebSocket('ws://192.168.1.50:8002'); // the cart's address
    
    ws.onopen = () => ws.send(JSON.stringify({ type: 'waypointsList' }));
    
    ws.onmessage = (event) => {
      const msg = JSON.parse(event.data);
      if (msg.waypoints) {
        ws.send(JSON.stringify({ type: 'navigateToWaypoint', value: 0 }));
      }
      const nav = msg.robotStatus?.navigationFeedback;
      if (nav?.destination) {
        console.log(nav.destination, nav.distance_remaining, 'm to go');
      }
      if (msg.type === 'navigationResult') {
        console.log(msg.value.status); // Succeeded, Canceled, or Aborted
        ws.close();
      }
    };

    Planning an integration?

    For questions or a free virtual demo, contact our team or e-mail sales@quasi.ai.