---
title: "POST set rental on-rent (M2M)"
method: POST
path: "/machine-to-machine/rentals/{rental_id}/on-rent"
tags: ["Machine to Machine"]
---

# POST set rental on-rent (M2M)

`POST /machine-to-machine/rentals/{rental_id}/on-rent`

## Request

- Base URL: `https://api.equipmentshare.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.equipmentshare.com/machine-to-machine/rentals/{rental_id}/on-rent`
- Auth: HTTP bearer

Transitions the given rental to on_rent by calling the current SetRentalStatus command inside a UnitOfWork, so the Rental Service Provider (RSP) guard and order_audit_history write both apply. Idempotent: calling this on a rental already on_rent is a no-op that still returns 200.

## Path parameters

- `rental_id` integer, required

## Response `200`

Rental is on_rent (freshly transitioned or already there); empty body other than rental_id/rental_status_id confirmation.

## Other responses

- `401`: Unauthorized — valid machine Bearer token required.
- `404`: `type: EntityNotFound` means the rental does not exist. `type: PartNotFound` means the part rental's part has no store-inventory record at the order's branch - a distinct, non-transient rejection, not a missing rental.
- `409`: Domain rule violated. `type: RSPNotAssigned` means the asset has no Rental Service Provider assigned — this must be treated as a distinct, non-transient rejection rather than a generic error. Any other `type` (e.g. `InvariantViolated`) is a different domain rule violation. `type: ReRentIncomplete` (only while the re-rent On Rent gate is on) means the rental's re-rent asset is missing vendor details (`reason: details_required`) or a vendor PO (`reason: po_needed`); the body also carries `rental_id`.

---

[API](https://skmtc.dev/equipmentshare/apis/es-api.md) - [All operations](https://skmtc.dev/equipmentshare/apis/es-api/llms.txt) - [OpenAPI document](https://skmtc.dev/equipmentshare/apis/es-api/revisions/40651e1558ac?raw)
