{
  "$schema": "https://next.mdxui.dev/schema.json",
  "theme": "callboard",
  "frame": "none",
  "template": "directory-product",
  "title": "Dispatch · Vanroster",
  "description": "Dispatch is the Vanroster board: it matches each job to a crew, a van and a drive, and it answers an API.",
  "sections": [
    {
      "kind": "nav",
      "shell": {"inset":"bleed","density":"none","surface":"glass","sticky":true},
      "block": {
        "type": "nav",
        "menu": "push",
        "collapse": 880,
        "brand": {"href":"/","text":"Vanroster","mark":"radar"},
        "links": [
          ["/product/dispatch","Dispatch"],
          ["/pricing","Pricing"],
          ["/changelog","Changelog"],
          ["/security","Security"]
        ],
        "cta": {"href":"/contact","label":"Book a walkthrough"}
      }
    },
    {
      "kind": "section",
      "shell": {"inset":"contained","density":"section"},
      "block": {
        "type": "product-head",
        "mark": "radar",
        "name": "Dispatch",
        "summary": "The board that matches every job to a crew, a van and the *shortest drive*.",
        "chips": [
          {"label":"Scheduling","href":"/pricing"},
          {"label":"Crew phones"},
          {"label":"Customer texts"},
          {"label":"REST API"}
        ],
        "marks": {"openapi":true,"webhooks":true},
        "actions": [
          {"href":"/contact","label":"Book a walkthrough","kind":"solid"},
          {"href":"/pricing","label":"See the plans","kind":"ghost"}
        ]
      }
    },
    {
      "kind": "band",
      "shell": {"inset":"contained","density":"compact"},
      "block": {
        "type": "command-row",
        "command": "curl api.vanroster.example/v1/crews",
        "note": "Any Fleet or Region API key"
      }
    },
    {
      "kind": "section",
      "shell": {"inset":"contained","density":"section"},
      "block": {
        "type": "facts",
        "title": "At a glance",
        "items": [
          {"label":"Crews per board","value":"Up to 400"},
          {"label":"Skills per job","value":"Up to 12"},
          {"label":"Re-plan","value":"One drag, both phones"},
          {"label":"Customer texts","value":"A window, then a departure"},
          {"label":"Change log","value":"1, 3 or 7 years by plan","href":"/pricing"},
          {"label":"API","value":"REST and JSON, with webhooks"},
          {"label":"Base address","value":"api.vanroster.example/v1","code":true},
          {"label":"Data regions","value":"EU or US","href":"/security"}
        ]
      }
    },
    {
      "kind": "section",
      "shell": {"inset":"contained","density":"section"},
      "block": {
        "type": "feature-grid",
        "cellHead": "label",
        "dense": true,
        "head": {"eyebrow":"What Dispatch does","title":"Eight jobs, done by the board."},
        "items": [
          {
            "label": "Match",
            "title": "Skills on every job",
            "text": "A job names its skills. Only crews that hold all of them can take it."
          },
          {
            "label": "Order",
            "title": "Drive order",
            "text": "Each crew list runs in drive order, recomputed when a job moves."
          },
          {
            "label": "Swap",
            "title": "One-drag swaps",
            "text": "Move a job between crews or depots. Both phones update."
          },
          {
            "label": "Warn",
            "title": "Overtime warnings",
            "text": "A day past 10 hours turns amber before it is saved."
          },
          {
            "label": "Notify",
            "title": "Customer windows",
            "text": "One text with a 30-minute window, one when the van leaves."
          },
          {
            "label": "Track",
            "title": "Van positions",
            "text": "Each van reports its position every minute while a job is open."
          },
          {
            "label": "Close",
            "title": "Job sign-off",
            "text": "Crews close a job with a photo count, a note and a signature."
          },
          {
            "label": "Export",
            "title": "Every record out",
            "text": "Crews, jobs and the log export as CSV or JSON."
          }
        ]
      }
    },
    {
      "kind": "section",
      "shell": {"inset":"contained","density":"section","surface":"plate"},
      "block": {
        "type": "api-call",
        "method": "POST",
        "path": "/v1/crews/{crew}/out",
        "note": "Re-plan a sick day",
        "examples": [
          {
            "label": "Crew B-2 out today",
            "request": "curl -X POST https://api.vanroster.example/v1/crews/b-2/out \\\n  -H \"Authorization: Bearer $VANROSTER_KEY\" \\\n  -d '{ \"day\": \"2026-10-13\", \"replan\": true }'",
            "status": "202 Accepted",
            "events": [
              {"at":"07:41:02","name":"crew.out","ref":"B-2","text":"Crew B-2 marked out for 13 Oct"},
              {
                "at": "07:41:03",
                "name": "job.reassigned",
                "ref": "J-1182",
                "text": "Boiler service moved to crew C-3, 6 min drive"
              },
              {
                "at": "07:41:03",
                "name": "job.reassigned",
                "ref": "J-1190",
                "text": "Gas leak check moved to crew D-4, licence checked"
              },
              {"at":"07:41:04","name":"customer.texted","ref":"J-1182","text":"New window 11:30-12:30 sent"},
              {
                "at": "07:41:04",
                "name": "customer.texted",
                "ref": "J-1190",
                "text": "New window 13:00-14:00 sent",
                "open": true
              }
            ]
          }
        ]
      }
    },
    {
      "kind": "section",
      "shell": {"inset":"contained","density":"section"},
      "block": {
        "type": "bento",
        "head": {"eyebrow":"Where it runs","title":"Office, van, agent and API."},
        "panels": [
          {
            "title": "The office board",
            "text": "Drag jobs between crews and depots.",
            "specimen": {
              "type": "terminal",
              "variant": "plain",
              "title": "Board · depot North",
              "lines": [
                "@dim{CREW  JOBS  HOURS}",
                "A-1   3     7 h 10",
                "C-3   4     8 h 05",
                "@acc{D-4   4     9 h 50}",
                "E-5   2     4 h 30",
                "",
                "@pass{No crew past 10 hours}"
              ]
            }
          },
          {
            "title": "The crew phone",
            "text": "One list, in drive order.",
            "specimen": {
              "type": "terminal",
              "variant": "plain",
              "title": "Crew C-3 · today",
              "lines": [
                "1  Panel upgrade   08:00  22 min",
                "2  Boiler service  11:30   6 min",
                "3  Smoke alarms    14:00   9 min",
                "",
                "@dim{Next: 4 Ridge Rd, gate code on file}"
              ]
            }
          },
          {
            "title": "Your agent",
            "text": "Questions about the day, in words.",
            "specimen": {
              "type": "agent-prompt",
              "label": "Ask an agent",
              "lines": ["Which crews finish before 15:00 today, and which jobs could they take?"]
            }
          },
          {
            "title": "Your systems",
            "text": "Jobs in from your booking form.",
            "specimen": {
              "type": "api-call",
              "method": "POST",
              "path": "/v1/jobs",
              "examples": [
                {
                  "label": "New job",
                  "request": "{ \"skills\": [\"gas\"], \"window\": \"13:00-14:00\" }",
                  "status": "201 Created",
                  "response": "{ \"id\": \"J-1204\", \"crew\": null }"
                }
              ]
            }
          }
        ]
      }
    },
    {
      "kind": "section",
      "shell": {"inset":"contained","density":"section"},
      "block": {
        "type": "endpoints",
        "head": {
          "eyebrow": "The Dispatch API",
          "title": "Six routes run the board.",
          "lede": "Fleet and Region plans include the API. Each route answers JSON under /v1."
        },
        "rows": [
          {"method":"GET","path":"/v1/crews","text":"Every crew, with its skills, van and depot"},
          {"method":"GET","path":"/v1/jobs?day={day}","text":"One day of jobs, by crew, in drive order"},
          {"method":"POST","path":"/v1/jobs","text":"Add a job with its window and skills"},
          {
            "method": "POST",
            "path": "/v1/jobs/{job}/assign",
            "text": "Assign a job; refused when a skill is missing"
          },
          {"method":"POST","path":"/v1/crews/{crew}/out","text":"Mark a crew out and re-plan its jobs"},
          {"method":"POST","path":"/v1/webhooks","text":"Receive an event for every change on the board"}
        ],
        "note": "Each key belongs to one depot or to the whole account. Keys rotate from the office board."
      }
    },
    {
      "kind": "section",
      "shell": {"inset":"contained","density":"section"},
      "block": {
        "type": "agent-prompt",
        "label": "Paste into your agent",
        "lines": [
          "Read the Vanroster API at https://api.vanroster.example/v1 with my key.",
          "List tomorrow’s jobs that need a gas licence and have no crew yet.",
          "For each one, name the nearest crew that holds the licence and its drive time.",
          "Ask me before you assign any of them."
        ]
      }
    },
    {
      "kind": "footer",
      "shell": {"inset":"contained","density":"footer"},
      "block": {
        "type": "footer",
        "layout": "areas",
        "brand": {"href":"/","text":"Vanroster","mark":"radar"},
        "blurb": "Crew scheduling for field-service teams: heating, electrical, plumbing, cleaning and grounds.",
        "columns": [
          {
            "title": "Product",
            "links": [["/product/dispatch","Dispatch"],["/pricing","Pricing"],["/changelog","Changelog"]]
          },
          {"title":"Company","links":[["/security","Security"],["/contact","Contact"]]},
          {
            "title": "For agents",
            "links": [["/product/dispatch","The Dispatch API"],["/records.zip","Site records (.zip)"]]
          }
        ],
        "cta": {"href":"/contact","label":"Book a walkthrough","icon":"arrow-right"},
        "note": [
          "Vanroster is a worked example on mdxui.dev, not a customer.",
          "Rendered by @mdxui/site. Forms here do not send."
        ]
      }
    }
  ]
}
