# Quote routes: update, delete

URL: /code/api/quote/records-update · Id: `page:code/api/quote/records-update`

> The Quote Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for [Quote](/business/nouns/quote), one group of [Quote routes](/code/api/quote).

### Quote.update
Changes the given properties of a Quote. [Verb page](/business/nouns/quote/update?interface=api).

```text
PATCH /{namespace}/quotes/{id}
```

Path: `id`. Body, as JSON: the other inputs. Emits `Quote.updated`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Quote. |
| `total` | `money` | No | The quoted total. |
| `validUntil` | `date` | No | The last day it may be accepted. |
| `lines` | `json` | No | One line per Offer: quantity, list Price, discount percent, net amount, term, and start, one line per ramp year. |
| `concessions` | `string[]` | No | Concessions granted, each from the Startup’s fixed concession list, such as a 60-day termination for convenience. |
| `paymentTerms` | `json` | No | The `collection`, `terms` and `purchaseOrder` every Invoice from the accepted Quote carries. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `quote` | [Quote](/business/nouns/quote) | Yes | The Quote. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X PATCH https://api.sb/leaseline.app/quotes/qt_GZnH5OK100 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"total":{"amount":29,"currency":"USD"}}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "quote": {
    "$id": "https://api.sb/leaseline.app/quotes/qt_GZnH5OK100",
    "$type": "Quote",
    "total": {
      "amount": 29,
      "currency": "USD"
    },
    "validUntil": "2026-10-22",
    "status": "draft",
    "lines": {}
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Quote.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Quote.delete
Deletes a Quote: a soft delete that keeps its history, undone by `Thing.restore`. [Verb page](/business/nouns/quote/delete?interface=api).

```text
DELETE /{namespace}/quotes/{id}
```

Path: `id`. Emits `Quote.deleted`.

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The id of the Quote. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `quote` | [Quote](/business/nouns/quote) | Yes | The Quote. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X DELETE https://api.sb/leaseline.app/quotes/qt_GZnH5OK100 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "quote": {
    "$id": "https://api.sb/leaseline.app/quotes/qt_GZnH5OK100",
    "$type": "Quote",
    "total": {
      "amount": 29,
      "currency": "USD"
    },
    "validUntil": "2026-10-22",
    "status": "draft",
    "lines": {}
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Quote.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```