Admin
Batch cancel rentals
Cancel multiple rentals in one request. Accepts a flat list of rentals
(which may span several orders); the backend groups them by order.
TRANSACTION BEHAVIOR:
- Each rental is cancelled in its own transaction, so one rental failing
does not roll back the others (and never rolls back other orders).
- Cancel is only valid for pre-on-rent rentals (Needs Approval, Draft,
Pending, Scheduled). A rental past that point is reported "failed" with
the invariant message, not aborted for the whole batch.
- An already-cancelled rental is reported "skipped".
RESPONSE:
- Returns a per-rental result ([{rental_id, status, message}]) so the
caller can retry only the rentals that failed.
EMAIL:
- Sends the existing per-rental cancellation email to the order's TAMs
(skipping mobile-tool-trailer rentals), preserving current behaviour.
Consolidating to one email per order is handled separately (sc-551452),
which this endpoint enables by grouping cancelled rentals per order.
post/admin/rentals/batch-cancel
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/admin/rentals/batch-cancel
- Auth: HTTP bearer
Request body
Response
Changes
No recorded changes to this operation across all 1 revision of this API.