# API: Packs

| Method | Path | What it does | Scope |
|---|---|---|---|
| GET | `/v1/packs` | Vertical packs: what each includes and whether it's installed here | `packs:read` |
| GET | `/v1/packs/:key/dashboards/:dash` | One of a pack's dashboards, computed now | `packs:read` |
| POST | `/v1/packs/:key/disable` | Turn a pack off (owners): its jobs and feeds stop; every record stays | `settings:write` |
| POST | `/v1/packs/:key/enable` | Turn a pack back on (owners) | `settings:write` |
| GET | `/v1/packs/:key/feeds` | A pack's data feeds, each with its last file | `packs:read` |
| POST | `/v1/packs/:key/feeds` | Add a data feed (owners): files by upload, email to the agent inbox (from named senders), a drop folder, or a connector | `settings:write` |
| POST | `/v1/packs/:key/install` | Install (or upgrade) a pack (owners): adds its objects and fields, and its agents, sequences and signal monitors as drafts to review | `settings:write` |
| PATCH | `/v1/packs/:key/settings` | Change a pack's settings (owners) | `settings:write` |
| PATCH | `/v1/packs/feeds/:id` | Pause, resume or remap a feed (owners) | `settings:write` |
| POST | `/v1/packs/feeds/:id/files` | Upload a file to a feed (CSV text, or a CSV/XLSX file as base64); each file is read once | `packs:write` |
| GET | `/v1/packs/industrial/items` | Catalog items (search by SKU, description or grade) | `packs:read` |
| GET | `/v1/packs/industrial/items/:id/availability` | An item's availability by location (asks the connected ERP now, else the latest snapshot and its age) | `packs:read` |
| POST | `/v1/packs/industrial/price-check` | Netback price for an item, quantity, buyer and ship-to ZIP (with the history behind it) | `packs:read` |
| PATCH | `/v1/packs/industrial/rfq-lines/:id` | Pick the item for an RFQ line or change its quantity (re-checks stock and re-prices) | `packs:write` |
| GET | `/v1/packs/industrial/rfqs` | RFQs (newest first), by status | `packs:read` |
| POST | `/v1/packs/industrial/rfqs` | Capture an RFQ typed or pasted in (an email, a phone note): its lines are read, matched, checked against stock and priced | `packs:write` |
| GET | `/v1/packs/industrial/rfqs/:id` | An RFQ with its lines: the matched item and alternatives, availability by location, and the netback price with its evidence | `packs:read` |
| POST | `/v1/packs/industrial/rfqs/:id/close` | Close an RFQ without a quote (no bid, lost, duplicate) | `packs:write` |
| POST | `/v1/packs/industrial/rfqs/:id/quote` | Turn a reviewed RFQ into a CPQ quote at the netback prices (a deal is created for a known customer); approvals and sending are CPQ's | `packs:write` |
| GET | `/v1/packs/industrial/slow-movers` | Slow-moving stock by value, each with the accounts that bought that item or that grade and size | `packs:read` |
| POST | `/v1/packs/industrial/slow-movers/:item_id/outreach` | Draft emails offering a slow mover to its past buyers; each waits for the account owner to approve and send it | `packs:write` |

## Examples

### GET /v1/packs

Vertical packs: what each includes and whether it's installed here

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

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

### GET /v1/packs/$KEY/dashboards/$DASH

One of a pack's dashboards, computed now

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

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

### POST /v1/packs/$KEY/disable

Turn a pack off (owners): its jobs and feeds stop; every record stays

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/${key}/disable`, {
  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/$KEY/enable

Turn a pack back on (owners)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/${key}/enable`, {
  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/$KEY/feeds

A pack's data feeds, each with its last file

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

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

### POST /v1/packs/$KEY/feeds

Add a data feed (owners): files by upload, email to the agent inbox (from named senders), a drop folder, or a connector

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/${key}/feeds`, {
  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/$KEY/install

Install (or upgrade) a pack (owners): adds its objects and fields, and its agents, sequences and signal monitors as drafts to review

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/${key}/install`, {
  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();
```

### PATCH /v1/packs/$KEY/settings

Change a pack's settings (owners)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/${key}/settings`, {
  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();
```

### PATCH /v1/packs/feeds/$ID

Pause, resume or remap a feed (owners)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/feeds/${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();
```

### POST /v1/packs/feeds/$ID/files

Upload a file to a feed (CSV text, or a CSV/XLSX file as base64); each file is read once

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/feeds/${id}/files`, {
  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/industrial/items

Catalog items (search by SKU, description or grade)

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

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

### GET /v1/packs/industrial/items/$ID/availability

An item's availability by location (asks the connected ERP now, else the latest snapshot and its age)

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

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

### POST /v1/packs/industrial/price-check

Netback price for an item, quantity, buyer and ship-to ZIP (with the history behind it)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/industrial/price-check`, {
  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();
```

### PATCH /v1/packs/industrial/rfq-lines/$ID

Pick the item for an RFQ line or change its quantity (re-checks stock and re-prices)

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/industrial/rfq-lines/${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/industrial/rfqs

RFQs (newest first), by status

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

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

### POST /v1/packs/industrial/rfqs

Capture an RFQ typed or pasted in (an email, a phone note): its lines are read, matched, checked against stock and priced

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/industrial/rfqs`, {
  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/industrial/rfqs/$ID

An RFQ with its lines: the matched item and alternatives, availability by location, and the netback price with its evidence

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

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

### POST /v1/packs/industrial/rfqs/$ID/close

Close an RFQ without a quote (no bid, lost, duplicate)

```bash
curl -s -X POST "https://api.closefinch.com/v1/packs/industrial/rfqs/$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/industrial/rfqs/${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();
```

### POST /v1/packs/industrial/rfqs/$ID/quote

Turn a reviewed RFQ into a CPQ quote at the netback prices (a deal is created for a known customer); approvals and sending are CPQ's

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/industrial/rfqs/${id}/quote`, {
  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/industrial/slow-movers

Slow-moving stock by value, each with the accounts that bought that item or that grade and size

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

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

### POST /v1/packs/industrial/slow-movers/$ITEM_ID/outreach

Draft emails offering a slow mover to its past buyers; each waits for the account owner to approve and send it

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

```js
const res = await fetch(`https://api.closefinch.com/v1/packs/industrial/slow-movers/${item_id}/outreach`, {
  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).
