Dock Detention Charges
Calculate dock detention from supplied appointment, arrival and departure times, combining overlapping exclusions before applying free time, increments and a cap.
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 /dock-detention-charges/v1/check with an x402 V2 client.
Worked example
Request
{
"appointment_minute": 100,
"arrival_minute": 90,
"departure_minute": 230,
"free_minutes": 60,
"interval_minutes": 15,
"interval_cents": 2500,
"cap_cents": 7000,
"excluded": [
[
110,
120
],
[
115,
130
]
]
}Result
{
"clock_start_minute": 100,
"dwell_minutes": 130,
"excluded_minutes": 20,
"detention_minutes": 50,
"billable_intervals": 4,
"uncapped_cents": 10000,
"charge_cents": 7000
}Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter