Quote routes: request, send, supersede
The Quote Verbs request, send, supersede as api.sb routes, with inputs, result, refusals and an example.
Reference for Quote, one group of Quote routes.
Quote.request
Request asks a Startup for terms on one or more Offers, with the volume, term or scope wanted. Verb page.
POST /{namespace}/ quotes/ requestBody, as JSON: the inputs. Emits Quote.requested.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
offers | list of Offer | required | The Offers wanted. |
deal | Deal | The open Deal the terms are for; without one, a new Deal opens. | |
volume | integer | Units wanted, such as seats or calls a month. | |
term | string | Contract length wanted, such as 12 months. | |
brief | json | A Service buyer’s scope, sizes and due dates, such as 82,000 words in three weeks. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
deal | Deal | required | The Deal, waiting on a Quote. |
quote | Quote | required | The Quote requested, in draft. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| An Offer that is not open to the requesting party, such as one behind a Waitlist | refused | Clear what the check names, then call it again. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ quotes/ request \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"offers": ["offer_2hzYe1ERo0"]}'{
"api": "https: //api.sb/ leaseline.app",
"deal": {
"$id": "https: //api.sb/ leaseline.app/ deals/ deal_NgACZ6DcII",
"$type": "Deal",
"status": "Open"
},
"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.request",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Quote.send
Send presents a drafted Quote to its buyer and freezes its lines, total and payment terms. Verb page.
POST /{namespace}/ quotes/ {quote}/ sendPath: quote. Emits Quote.sent.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The draft Quote. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The sent Quote. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ quotes/ qt_GZnH5OK100/ send \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"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": "sent",
"lines": {}
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Quote.send",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Quote.supersede
Supersede replaces a sent Quote with a newer one on the same Deal; only the newest Quote can be accepted. Verb page.
POST /{namespace}/ quotes/ {quote}/ supersedePath: quote. Body, as JSON: the other inputs. Emits Quote.superseded.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The Quote being replaced. |
by | Quote | required | The newer Quote that replaces it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
quote | Quote | required | The superseded Quote, kept on record. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ quotes/ qt_GZnH5OK100/ supersede \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"by": "qt_GZnH5OK100"}'{
"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": "superseded",
"lines": {}
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Quote.supersede",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}