---
title: "ResourceShark claims"
description: "Learn how claims record holds, permanent takes, estimates, and bookings."
url: "https://agentpost.tools/docs/resourceshark/concepts/claims"
kind: concept
---

# Claims

A claim records what one line holds or takes from a [resource](/docs/resourceshark/concepts/resources.md) and its [scope](/docs/resourceshark/concepts/scopes.md). Each line of a [hold](/docs/resourceshark/concepts/holds.md) starts as a claim of kind `hold`. Its status changes as the hold resolves.

## Consumption

`POST /consume` takes supply in one write. It takes all the lines or takes none. A take from a running balance creates a `consumption` claim with status `committed`. When a resource keeps its [supply](/docs/resourceshark/concepts/supply.md) entries apart, the claim’s `pegs` record how much it took from each entry.

## Estimates and settlement

A consume with `estimate: true` takes the estimated quantity immediately. The amount is an estimate on the claim until it is settled. A settle sets the final quantity once. It takes the difference if the final quantity is greater and gives back the difference if it is smaller. If a resource’s shortage rule refuses a line, the settle changes none of the lines. Estimates apply to consumptions of counted units without time buckets.

## Bookings

A line on a resource that counts time names a finite `span`. The span starts and ends at [bucket boundaries](/docs/resourceshark/concepts/schedules.md). It takes the same quantity in every bucket, including the start and excluding the end. A consume creates a `booking` claim directly. Committing a hold over the span also makes its claim a booking.

A room or court tracked as an individual unit has one calendar. Its resource sets `scope.places` and `scope.holders` to `false`. At the ResourceShark API root, `GET /resources/:id/free-instances` takes `from` and `to` to find units free for the whole span. Your app chooses one and sends `scope.instanceId` with quantity `1`. If the unit is unavailable for that span, the write answers [`assignment_infeasible`](/docs/resourceshark/errors.md#assignment_infeasible) and takes nothing.

A booking made by committing a hold can be given back by [canceling the hold’s line](/docs/resourceshark/concepts/holds.md#resolution). The claim then reads `cancelled`.

A reschedule moves a hold’s line to another span, to another resource that counts in the same unit, with the same code and precision, or to another scope of its resource. The claim keeps its ID and its status. A line that changes resource or scope sends `resourceId` and its full scope there, including `scope.instanceId` for a named unit. A booking made by committing a hold can move, and a booking taken by a consume stays where it is. [Book time slots](/docs/resourceshark/guides/bookings.md) moves and swaps bookings, and [Reschedule a hold](/docs/resourceshark/reference/holds.md#reschedule-a-hold) has the request.

## Limits

-   A consume or settle takes 1 to 50 lines.
-   A settle takes claims from different resources. A consume can repeat a resource if it counts time in buckets or tracks individual units. On a bucketed resource, the spans of lines in the same scope cannot overlap.

## Where to act on it

-   [Sell prepaid credits](/docs/resourceshark/guides/prepaid-credits.md) takes and settles estimated usage. [Book time slots](/docs/resourceshark/guides/bookings.md) books capacity over a span. [Take a payment after a hold expired](/docs/resourceshark/guides/late-payment.md) uses a consume when stock is still available.
-   [Holds](/docs/resourceshark/reference/holds.md) commits and cancels held lines. [Claims](/docs/resourceshark/reference/claims.md) takes supply, settles estimates, and reads claim records.
