{"openapi":"3.1.0","info":{"title":"Reading List Seat Holds","version":"1.0.0","description":"Plan simultaneous license capacity for overlapping course reading windows and report the exact shortages.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/reading-list-seat-holds/v1/check":{"post":{"operationId":"reading_list_seat_holds","summary":"Plan simultaneous license capacity for overlapping course reading windows and report the exact shortages.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capacity":{"type":"integer","minimum":0,"maximum":1000000},"windows":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"class_id":{"type":"string","minLength":1,"maxLength":80},"first_day":{"type":"integer","minimum":0,"maximum":1000000},"last_day":{"type":"integer","minimum":0,"maximum":1000000},"seats":{"type":"integer","exclusiveMinimum":0,"maximum":1000000}},"required":["class_id","first_day","last_day","seats"],"additionalProperties":false}}},"required":["capacity","windows"],"additionalProperties":false},"example":{"capacity":30,"windows":[{"class_id":"art","first_day":1,"last_day":3,"seats":18},{"class_id":"music","first_day":3,"last_day":5,"seats":20}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"peak_seats":38,"shortages":[{"first_day":3,"last_day":3,"seats_needed":38,"extra_seats":8,"classes":["art","music"]}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}