Quotes
List Quotes
Retrieve a list of quotes
GET
/
v1
/
quotes
List quotes
curl --request GET \
--url https://billing.example.com/v1/quotes \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/quotes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/quotes', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/quotes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}
}Query Parameters
| Parameter | Type | Description |
|---|---|---|
customer_id | string | Filter by customer |
status | string | Filter by status: draft, sent, accepted, declined, expired |
limit | integer | Max results (default: 1000, capped at 1000) |
offset | integer | Pagination offset |
Example Request
curl "https://api.recurso.dev/v1/quotes?customer_id=cust_abc123&status=draft&limit=10" \
-H "Authorization: Bearer $API_KEY"
Response
{
"object": "list",
"data": [
{
"id": "qt_m3n8j5",
"object": "quote",
"customer_id": "cust_abc123",
"status": "draft",
"currency": "INR",
"subtotal": 99994,
"tax_amount": 17999,
"total": 117993,
"expires_at": "2024-04-15T23:59:59Z",
"created_at": "2024-03-16T10:00:00Z"
},
{
"id": "qt_k7p2w4",
"object": "quote",
"customer_id": "cust_abc123",
"status": "draft",
"currency": "INR",
"subtotal": 24999,
"tax_amount": 4500,
"total": 29499,
"expires_at": "2024-04-10T23:59:59Z",
"created_at": "2024-03-10T15:30:00Z"
}
],
"has_more": false,
"total_count": 2
}
Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Query Parameters
Max rows returned (clamped to 1000).
Required range:
x <= 1000Rows to skip, for paging past the clamp.
Required range:
x >= 0Available options:
draft, sent, accepted, declined, expired Free-text search.
Response
Quotes for the tenant.
Show child attributes
Show child attributes
⌘I
List quotes
curl --request GET \
--url https://billing.example.com/v1/quotes \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/quotes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/quotes', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/quotes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/quotes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}
}