Quotes
Update Quote
Update an existing quote. Only quotes in draft status can be modified.
PUT
/
v1
/
quotes
/
{id}
Update a draft quote
curl --request PUT \
--url https://billing.example.com/v1/quotes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"amount": 123
}
],
"currency": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"notes": "<string>",
"terms": "<string>",
"tax_amount": 123,
"discount_amount": 123
}
'import requests
url = "https://billing.example.com/v1/quotes/{id}"
payload = {
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"amount": 123
}
],
"currency": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"notes": "<string>",
"terms": "<string>",
"tax_amount": 123,
"discount_amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
line_items: [{description: '<string>', quantity: 123, unit_price: 123, amount: 123}],
currency: '<string>',
valid_until: '2023-11-07T05:31:56Z',
notes: '<string>',
terms: '<string>',
tax_amount: 123,
discount_amount: 123
})
};
fetch('https://billing.example.com/v1/quotes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/quotes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'line_items' => [
[
'description' => '<string>',
'quantity' => 123,
'unit_price' => 123,
'amount' => 123
]
],
'currency' => '<string>',
'valid_until' => '2023-11-07T05:31:56Z',
'notes' => '<string>',
'terms' => '<string>',
'tax_amount' => 123,
'discount_amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/quotes/{id}"
payload := strings.NewReader("{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"line_items\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"amount\": 123\n }\n ],\n \"currency\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"terms\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://billing.example.com/v1/quotes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"line_items\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"amount\": 123\n }\n ],\n \"currency\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"terms\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/quotes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"line_items\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"amount\": 123\n }\n ],\n \"currency\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"terms\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_number": "<string>",
"status": "draft",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"amount": 123
}
],
"subtotal": 123,
"tax_amount": 123,
"discount_amount": 123,
"total": 123,
"currency": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"notes": "<string>",
"terms": "<string>",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accepted_at": "2023-11-07T05:31:56Z",
"declined_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the quote (e.g., qt_4kR7LmNpXs). |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
line_items | array | No | Array of line item objects with description, quantity, and unit_amount. |
currency | string | No | Three-letter ISO currency code (e.g., usd, eur). |
expires_at | string | No | ISO 8601 expiration timestamp for the quote. |
notes | string | No | Internal or customer-facing notes attached to the quote. |
status: "draft" can be updated. Attempting to update a sent or accepted quote returns a 400 error.
Example Request
curl -X PUT https://api.recurso.io/v1/quotes/qt_4kR7LmNpXs \
-H "Authorization: Bearer sk_live_26PHem9AhJZvU..." \
-H "Content-Type: application/json" \
-d '{
"line_items": [
{
"description": "Pro Plan — Monthly",
"quantity": 10,
"unit_amount": 4900
}
],
"currency": "usd",
"expires_at": "2026-08-01T00:00:00Z",
"notes": "Updated seat count per customer request."
}'
Response
{
"id": "qt_4kR7LmNpXs",
"object": "quote",
"status": "draft",
"currency": "usd",
"customer": {
"id": "cus_8vTnRbWqYx",
"name": "Acme Corp",
"email": "billing@acmecorp.com"
},
"line_items": [
{
"id": "li_2mK9JwPqRt",
"description": "Pro Plan — Monthly",
"quantity": 10,
"unit_amount": 4900,
"amount": 49000
}
],
"subtotal": 49000,
"tax": 4410,
"total": 53410,
"notes": "Updated seat count per customer request.",
"expires_at": "2026-08-01T00:00:00Z",
"created_at": "2026-06-10T14:32:00Z",
"updated_at": "2026-06-23T09:15:00Z"
}
Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Path Parameters
Body
application/json
Response
Updated quote.
Show child attributes
Show child attributes
⌘I
Update a draft quote
curl --request PUT \
--url https://billing.example.com/v1/quotes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"amount": 123
}
],
"currency": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"notes": "<string>",
"terms": "<string>",
"tax_amount": 123,
"discount_amount": 123
}
'import requests
url = "https://billing.example.com/v1/quotes/{id}"
payload = {
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"amount": 123
}
],
"currency": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"notes": "<string>",
"terms": "<string>",
"tax_amount": 123,
"discount_amount": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
line_items: [{description: '<string>', quantity: 123, unit_price: 123, amount: 123}],
currency: '<string>',
valid_until: '2023-11-07T05:31:56Z',
notes: '<string>',
terms: '<string>',
tax_amount: 123,
discount_amount: 123
})
};
fetch('https://billing.example.com/v1/quotes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/quotes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'line_items' => [
[
'description' => '<string>',
'quantity' => 123,
'unit_price' => 123,
'amount' => 123
]
],
'currency' => '<string>',
'valid_until' => '2023-11-07T05:31:56Z',
'notes' => '<string>',
'terms' => '<string>',
'tax_amount' => 123,
'discount_amount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/quotes/{id}"
payload := strings.NewReader("{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"line_items\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"amount\": 123\n }\n ],\n \"currency\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"terms\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://billing.example.com/v1/quotes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"line_items\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"amount\": 123\n }\n ],\n \"currency\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"terms\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/quotes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"line_items\": [\n {\n \"description\": \"<string>\",\n \"quantity\": 123,\n \"unit_price\": 123,\n \"amount\": 123\n }\n ],\n \"currency\": \"<string>\",\n \"valid_until\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\",\n \"terms\": \"<string>\",\n \"tax_amount\": 123,\n \"discount_amount\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_number": "<string>",
"status": "draft",
"line_items": [
{
"description": "<string>",
"quantity": 123,
"unit_price": 123,
"amount": 123
}
],
"subtotal": 123,
"tax_amount": 123,
"discount_amount": 123,
"total": 123,
"currency": "<string>",
"valid_until": "2023-11-07T05:31:56Z",
"notes": "<string>",
"terms": "<string>",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"accepted_at": "2023-11-07T05:31:56Z",
"declined_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}