# API: Packs: equipment

| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | `/v1/packs/equipment/accounts/:id/open` | What's open on an account: quotes, rentals, work orders, unpaid invoices with aging, and what's coming up | `packs:read` |
| GET | `/v1/packs/equipment/assets` | Find units by asset number, serial or model (with the rental out or awaiting its return check) | `packs:read` |
| GET | `/v1/packs/equipment/assets/:id/history` | A unit's checks, condition grades and damage over time | `packs:read` |
| GET | `/v1/packs/equipment/availability` | Units of a class free for a date range, by branch | `packs:read` |
| GET | `/v1/packs/equipment/dispatch` | The dispatch board for a day (deliveries, pickups, moves between branches, service calls) by branch | `packs:read` |
| PATCH | `/v1/packs/equipment/dispatch/:id` | Assign a driver or tech, change priority, or move a job along (a delivery done puts the rental out; a pickup done returns it) | `packs:write` |
| GET | `/v1/packs/equipment/fleet` | Fleet utilization by unit, class and branch, with add, remove or reposition advice | `packs:read` |
| POST | `/v1/packs/equipment/inspections` | Record a return, delivery or periodic check: checklist, condition, hours, fuel, damage with photos (damage opens a work order and a charge) | `packs:write` |
| GET | `/v1/packs/equipment/inspections/:id/photos` | The photos of one inspection (ids and captions) | `packs:read` |
| POST | `/v1/packs/equipment/lifecycle/run` | Run the lifecycle check now (renewals, warranties, service, parts, aftermarket; each once per window) (owners) | `settings:write` |
| GET | `/v1/packs/equipment/photos/:id` | An inspection photo (base64) | `packs:read` |
| GET | `/v1/packs/equipment/profitability` | Contribution per unit, or by make and model, or by class (revenue − repairs − depreciation) | `packs:read` |
| GET | `/v1/packs/equipment/rentals` | Bookings and rentals out (reserved first, then out, by start date; overdue ones flagged) | `packs:read` |
| POST | `/v1/packs/equipment/rentals` | Book a rental: a free unit at the branch (else another branch, as a transfer), with delivery and pickup on the dispatch board | `packs:write` |
| POST | `/v1/packs/equipment/rentals/:id/cancel` | Cancel a booking that hasn't gone out: the unit is free again and its jobs come off the board | `packs:write` |
| POST | `/v1/packs/equipment/rentals/:id/checkout` | The customer takes a booked unit at the counter: the rental is out from today (its delivery job comes off the board) | `packs:write` |
| POST | `/v1/packs/equipment/rentals/:id/extend` | Extend a rental (the unit must be free for the new days) | `packs:write` |
| GET | `/v1/packs/equipment/requests` | Requests by department and urgency (newest first) | `packs:read` |
| POST | `/v1/packs/equipment/requests` | A parts, service, rental or sales request typed in (a phone call, a walk-in): sorted by department and urgency and routed to the branch's person | `packs:write` |
| GET | `/v1/packs/equipment/sell-advice` | Each fleet unit's sell advice (sell now, watch, keep) with the reasons | `packs:read` |
| POST | `/v1/packs/equipment/visits` | Log a field visit typed on a phone: read into a note on the account and a task per next step | `packs:write` |
| POST | `/v1/packs/equipment/visits/recording` | Log a recorded field visit: transcribed onto a meeting on the account (the in-person recorder's consent and limits), then read into a note and tasks | `packs:write` |
| GET | `/v1/packs/equipment/work-orders` | Open work orders (repairs, PMs, damage) with their unit and account | `packs:read` |
| POST | `/v1/packs/equipment/work-orders/:id/close` | Close a work order (the repair or PM is done): a PM records the unit's service; with nothing else open, the unit is available again | `packs:write` |

## Examples

### GET /v1/packs/equipment/accounts/$ID/open

What's open on an account: quotes, rentals, work orders, unpaid invoices with aging, and what's coming up

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/accounts/$ID/open" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/accounts/${id}/open`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/packs/equipment/assets

Find units by asset number, serial or model (with the rental out or awaiting its return check)

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/assets" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/assets`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/packs/equipment/assets/$ID/history

A unit's checks, condition grades and damage over time

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/assets/$ID/history" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/assets/${id}/history`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/packs/equipment/availability

Units of a class free for a date range, by branch

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/availability" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/availability`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/packs/equipment/dispatch

The dispatch board for a day (deliveries, pickups, moves between branches, service calls) by branch

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/dispatch" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/dispatch`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### PATCH /v1/packs/equipment/dispatch/$ID

Assign a driver or tech, change priority, or move a job along (a delivery done puts the rental out; a pickup done returns it)

```bash
curl -s -X PATCH "https://api.closefinch.com/v1/packs/equipment/dispatch/$ID" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/dispatch/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/packs/equipment/fleet

Fleet utilization by unit, class and branch, with add, remove or reposition advice

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/fleet" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/fleet`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/packs/equipment/inspections

Record a return, delivery or periodic check: checklist, condition, hours, fuel, damage with photos (damage opens a work order and a charge)

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/inspections" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/inspections`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/packs/equipment/inspections/$ID/photos

The photos of one inspection (ids and captions)

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/inspections/$ID/photos" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/inspections/${id}/photos`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/packs/equipment/lifecycle/run

Run the lifecycle check now (renewals, warranties, service, parts, aftermarket; each once per window) (owners)

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/lifecycle/run" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/lifecycle/run`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/packs/equipment/photos/$ID

An inspection photo (base64)

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/photos/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/photos/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/packs/equipment/profitability

Contribution per unit, or by make and model, or by class (revenue − repairs − depreciation)

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/profitability" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/profitability`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### GET /v1/packs/equipment/rentals

Bookings and rentals out (reserved first, then out, by start date; overdue ones flagged)

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/rentals" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/rentals`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/packs/equipment/rentals

Book a rental: a free unit at the branch (else another branch, as a transfer), with delivery and pickup on the dispatch board

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/rentals" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/rentals`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/packs/equipment/rentals/$ID/cancel

Cancel a booking that hasn't gone out: the unit is free again and its jobs come off the board

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/rentals/$ID/cancel" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/rentals/${id}/cancel`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/packs/equipment/rentals/$ID/checkout

The customer takes a booked unit at the counter: the rental is out from today (its delivery job comes off the board)

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/rentals/$ID/checkout" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/rentals/${id}/checkout`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/packs/equipment/rentals/$ID/extend

Extend a rental (the unit must be free for the new days)

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/rentals/$ID/extend" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/rentals/${id}/extend`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/packs/equipment/requests

Requests by department and urgency (newest first)

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/requests" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/requests`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/packs/equipment/requests

A parts, service, rental or sales request typed in (a phone call, a walk-in): sorted by department and urgency and routed to the branch's person

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/requests" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/requests`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/packs/equipment/sell-advice

Each fleet unit's sell advice (sell now, watch, keep) with the reasons

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/sell-advice" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/sell-advice`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/packs/equipment/visits

Log a field visit typed on a phone: read into a note on the account and a task per next step

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/visits" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/visits`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### POST /v1/packs/equipment/visits/recording

Log a recorded field visit: transcribed onto a meeting on the account (the in-person recorder's consent and limits), then read into a note and tasks

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/visits/recording" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/visits/recording`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

### GET /v1/packs/equipment/work-orders

Open work orders (repairs, PMs, damage) with their unit and account

```bash
curl -s "https://api.closefinch.com/v1/packs/equipment/work-orders" \
  -H "Authorization: Bearer $RA_API_KEY"
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/work-orders`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();
```

### POST /v1/packs/equipment/work-orders/$ID/close

Close a work order (the repair or PM is done): a PM records the unit's service; with nothing else open, the unit is available again

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/equipment/work-orders/$ID/close" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
```

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/equipment/work-orders/${id}/close`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();
```

Request and response schemas: [https://www.closefinch.com/openapi.json](https://www.closefinch.com/openapi.json). All resources: [API reference](https://www.closefinch.com/docs/api).
