> ## Documentation Index
> Fetch the complete documentation index at: https://viewerdocs.planpoint.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Holds and pre-reservations

> Acquire and release temporary checkout holds without confusing them with paid reservations.

A hold changes inventory availability to `Onhold` temporarily. It is not a charge or a saved paid reservation. Read the [Payments API overview](https://viewerdocs.planpoint.io/api-documentation/payments/overview.md).

## Hold a unit

`POST /api/units/{id}/reserve-temp` — **Public**, optional Portal bearer token

Path `id` identifies a floor-based unit or its variant. No body fields are required; send `{}` when using JSON.

```bash theme={null}
curl -X POST 'https://app.planpoint.io/api/units/000000000000000000000002/reserve-temp' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <PORTAL_TOKEN>' \
  -d '{}'
```

Returns `201` with the updated inventory document and an additional `holdToken`. Relevant fields include `_id`, `availability: "Onhold"`, `onHoldExpiresAt`, and `tempHoldedBy` (buyer ID or null). Keep the opaque hold token private; it is returned only when the hold is created.

The project must enable holds and checkout for the item. Duration comes from the project's settings, with a five-minute fallback, not a client-supplied duration. A valid Portal session associates the hold with that buyer; otherwise the request is anonymous. Current caps are three active holds per buyer and ten per IP, with both limits applying to a signed-in buyer.

Only available items or expired temporary holds can be claimed. For a unit variant, the parent must also be claimable.

Errors: `400` invalid ID, `403` holds/checkout disabled, `404` missing item/project context, `423` item unavailable to hold, `429` rate or active-hold limit, and `500` failure.

## Hold a commercial space

`POST /api/commercialSpaces/{id}/reserve-temp` — **Public**, optional Portal bearer token

Use this path for a commercial space or its variant, including inventory in projects without a floor step. Path `id`, empty JSON body, eligibility, duration, caps, and status codes follow the hold-unit contract above.

Returns `201` with the updated space/variant document plus `holdToken`. Related available space variants can join the same hold.

## Release a unit hold

`POST /api/units/{id}/reset-availability` — **Hold token**

Send the inventory ID in **both the path and body**. The implementation reads the body ID.

```json Request theme={null}
{
  "id": "000000000000000000000002",
  "holdToken": "<HOLD_TOKEN>"
}
```

A successful release returns `201` with the updated inventory document (`availability: "Available"`). The corresponding parent unit is released only if it is still in the same hold.

If the item is no longer on hold, returns `200`, for example:

```json Response (200) theme={null}
{ "message": "Nothing to release", "availability": "Reserved" }
```

If the hold changes during the request, `200` may contain only `"Nothing to release"`. A release must not be interpreted as cancellation of a paid reservation. Do not attempt to release a different or newly acquired hold with an old token.

Errors: `403` wrong hold token, `404` missing inventory, `429` rate limit, or `500` failure. Use valid 24-character IDs; do not rely on malformed IDs producing `400`.

## Release a commercial-space hold

`POST /api/commercialSpaces/{id}/reset-availability` — **Hold token**

Send matching path/body `id` and `holdToken`, as above. Success returns `201` with the updated document. The parent and sibling space variants are released only where they still share this hold.

No-op `200` responses and `403`, `404`, `429`, and `500` errors follow the unit release contract.

## Restricted pre-reservation

`POST /api/units/{id}/pre-reserve` — **Customer dashboard, specially enabled account only**

This launch-management operation is not available to ordinary accounts or Portal buyers. The caller must also own or administer the unit's project. Confirm eligibility with support before integrating it.

```json Request theme={null}
{ "action": "pre-reserve" }
```

`action` is required and must be `pre-reserve` or `release`. Path `id` identifies a floor-based unit.

```json Response (200) theme={null}
{
  "message": "Unit pre-reserved successfully",
  "unit": {
    "_id": "000000000000000000000002",
    "name": "A-101",
    "availability": "Pre-reserved"
  }
}
```

`release` only applies to a `Pre-reserved` unit and returns `"Pre-reservation released"` with the unit set to `Available`. This is not temporary-hold release and does not charge a buyer.

Errors: `400` invalid ID/action or incompatible current availability, `401` no customer authentication, `403` account not enabled/access denied, `404` missing unit/floor/project, and `500` failure.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.