Create quote
curl --request POST \
--url https://demo.onlinebillingform.com/api/v2/invoice/create-quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"duedate": "<string>",
"customer_id": 123,
"comments": "<string>",
"record": {
"item": [
"<string>"
],
"description": [
"<string>"
],
"price": [
123
],
"quantity": [
123
],
"tax_class": [
"<unknown>"
],
"tax": [
123
]
}
}
'import requests
url = "https://demo.onlinebillingform.com/api/v2/invoice/create-quote"
payload = {
"duedate": "<string>",
"customer_id": 123,
"comments": "<string>",
"record": {
"item": ["<string>"],
"description": ["<string>"],
"price": [123],
"quantity": [123],
"tax_class": ["<unknown>"],
"tax": [123]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
duedate: '<string>',
customer_id: 123,
comments: '<string>',
record: {
item: ['<string>'],
description: ['<string>'],
price: [123],
quantity: [123],
tax_class: ['<unknown>'],
tax: [123]
}
})
};
fetch('https://demo.onlinebillingform.com/api/v2/invoice/create-quote', 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://demo.onlinebillingform.com/api/v2/invoice/create-quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'duedate' => '<string>',
'customer_id' => 123,
'comments' => '<string>',
'record' => [
'item' => [
'<string>'
],
'description' => [
'<string>'
],
'price' => [
123
],
'quantity' => [
123
],
'tax_class' => [
'<unknown>'
],
'tax' => [
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://demo.onlinebillingform.com/api/v2/invoice/create-quote"
payload := strings.NewReader("{\n \"duedate\": \"<string>\",\n \"customer_id\": 123,\n \"comments\": \"<string>\",\n \"record\": {\n \"item\": [\n \"<string>\"\n ],\n \"description\": [\n \"<string>\"\n ],\n \"price\": [\n 123\n ],\n \"quantity\": [\n 123\n ],\n \"tax_class\": [\n \"<unknown>\"\n ],\n \"tax\": [\n 123\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://demo.onlinebillingform.com/api/v2/invoice/create-quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"duedate\": \"<string>\",\n \"customer_id\": 123,\n \"comments\": \"<string>\",\n \"record\": {\n \"item\": [\n \"<string>\"\n ],\n \"description\": [\n \"<string>\"\n ],\n \"price\": [\n 123\n ],\n \"quantity\": [\n 123\n ],\n \"tax_class\": [\n \"<unknown>\"\n ],\n \"tax\": [\n 123\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.onlinebillingform.com/api/v2/invoice/create-quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"duedate\": \"<string>\",\n \"customer_id\": 123,\n \"comments\": \"<string>\",\n \"record\": {\n \"item\": [\n \"<string>\"\n ],\n \"description\": [\n \"<string>\"\n ],\n \"price\": [\n 123\n ],\n \"quantity\": [\n 123\n ],\n \"tax_class\": [\n \"<unknown>\"\n ],\n \"tax\": [\n 123\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"success": false,
"errors": "Customer mailing address is missing, incomplete, or invalid.",
"code": "customer_address_missing"
}{
"success": false,
"errors": "Invalid API Key"
}{
"success": false,
"errors": "Insufficient permissions for this endpoint."
}{
"success": false,
"errors": {
"customer_id": "The customer is not available to this API account."
},
"code": "customer_not_found"
}{
"success": false,
"errors": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"success": false,
"errors": {
"id": [
"The id field is required."
]
}
}{
"success": false,
"errors": "Failed to create quote. Please try again later.",
"code": "quote_creation_failed"
}Invoice
Create quote
Use this BillingServ API endpoint to create quote. Review the response for the operation result or validation errors.
POST
/
invoice
/
create-quote
Create quote
curl --request POST \
--url https://demo.onlinebillingform.com/api/v2/invoice/create-quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"duedate": "<string>",
"customer_id": 123,
"comments": "<string>",
"record": {
"item": [
"<string>"
],
"description": [
"<string>"
],
"price": [
123
],
"quantity": [
123
],
"tax_class": [
"<unknown>"
],
"tax": [
123
]
}
}
'import requests
url = "https://demo.onlinebillingform.com/api/v2/invoice/create-quote"
payload = {
"duedate": "<string>",
"customer_id": 123,
"comments": "<string>",
"record": {
"item": ["<string>"],
"description": ["<string>"],
"price": [123],
"quantity": [123],
"tax_class": ["<unknown>"],
"tax": [123]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
duedate: '<string>',
customer_id: 123,
comments: '<string>',
record: {
item: ['<string>'],
description: ['<string>'],
price: [123],
quantity: [123],
tax_class: ['<unknown>'],
tax: [123]
}
})
};
fetch('https://demo.onlinebillingform.com/api/v2/invoice/create-quote', 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://demo.onlinebillingform.com/api/v2/invoice/create-quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'duedate' => '<string>',
'customer_id' => 123,
'comments' => '<string>',
'record' => [
'item' => [
'<string>'
],
'description' => [
'<string>'
],
'price' => [
123
],
'quantity' => [
123
],
'tax_class' => [
'<unknown>'
],
'tax' => [
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://demo.onlinebillingform.com/api/v2/invoice/create-quote"
payload := strings.NewReader("{\n \"duedate\": \"<string>\",\n \"customer_id\": 123,\n \"comments\": \"<string>\",\n \"record\": {\n \"item\": [\n \"<string>\"\n ],\n \"description\": [\n \"<string>\"\n ],\n \"price\": [\n 123\n ],\n \"quantity\": [\n 123\n ],\n \"tax_class\": [\n \"<unknown>\"\n ],\n \"tax\": [\n 123\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://demo.onlinebillingform.com/api/v2/invoice/create-quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"duedate\": \"<string>\",\n \"customer_id\": 123,\n \"comments\": \"<string>\",\n \"record\": {\n \"item\": [\n \"<string>\"\n ],\n \"description\": [\n \"<string>\"\n ],\n \"price\": [\n 123\n ],\n \"quantity\": [\n 123\n ],\n \"tax_class\": [\n \"<unknown>\"\n ],\n \"tax\": [\n 123\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.onlinebillingform.com/api/v2/invoice/create-quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"duedate\": \"<string>\",\n \"customer_id\": 123,\n \"comments\": \"<string>\",\n \"record\": {\n \"item\": [\n \"<string>\"\n ],\n \"description\": [\n \"<string>\"\n ],\n \"price\": [\n 123\n ],\n \"quantity\": [\n 123\n ],\n \"tax_class\": [\n \"<unknown>\"\n ],\n \"tax\": [\n 123\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"success": false,
"errors": "Customer mailing address is missing, incomplete, or invalid.",
"code": "customer_address_missing"
}{
"success": false,
"errors": "Invalid API Key"
}{
"success": false,
"errors": "Insufficient permissions for this endpoint."
}{
"success": false,
"errors": {
"customer_id": "The customer is not available to this API account."
},
"code": "customer_not_found"
}{
"success": false,
"errors": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"success": false,
"errors": {
"id": [
"The id field is required."
]
}
}{
"success": false,
"errors": "Failed to create quote. Please try again later.",
"code": "quote_creation_failed"
}Authorizations
Use Authorization: Bearer <live_api_key>.
Headers
Optional key for POST /customer/create, POST /invoice/create-quote, POST /invoice/create-invoice, POST /invoice/update-invoice, and POST /order/add-order. Reusing the same key with the same request replays a successful response for 24 hours; reusing it with a different request returns 409.
Required string length:
1 - 100Pattern:
^[A-Za-z0-9._-]{1,100}$Body
application/jsonapplication/x-www-form-urlencoded
Response
OK
⌘I