Shift Coverage Gap

Find exact understaffed intervals and uncovered person-minutes using already normalized shift timestamps.

Custom requests cost 0.04 USDC on Base.

Download example JSON · OpenAPI · Source and usage

Pay with a browser wallet · Open example in checkout

POST a JSON request to /shift-coverage-gap/v1/check with an x402 V2 client.

Worked example

Request

{
  "starts": 540,
  "ends": 600,
  "required": 2,
  "shifts": [
    {
      "worker": "a",
      "starts": 540,
      "ends": 600
    },
    {
      "worker": "b",
      "starts": 555,
      "ends": 585
    }
  ]
}

Result

{
  "gaps": [
    {
      "starts": 540,
      "ends": 555,
      "on_duty": 1
    },
    {
      "starts": 585,
      "ends": 600,
      "on_duty": 1
    }
  ],
  "uncovered_person_minutes": 30
}

Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter