Create Manual Invoice
curl --request POST \
--url https://app.usequanta.com/admin_api/invoices/create_manual_invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_number": "<string>",
"finalized_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"items": [
{
"amount": 123,
"service_period_start": "2023-11-07T05:31:56Z",
"service_period_end": "2023-11-07T05:31:56Z",
"product_name": "<string>",
"product_qid": "<string>",
"tax_amount": "0",
"description": "<string>"
}
],
"customer_name": "<string>",
"customer_qid": "<string>",
"metadata": {}
}
'import requests
url = "https://app.usequanta.com/admin_api/invoices/create_manual_invoice"
payload = {
"invoice_number": "<string>",
"finalized_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"items": [
{
"amount": 123,
"service_period_start": "2023-11-07T05:31:56Z",
"service_period_end": "2023-11-07T05:31:56Z",
"product_name": "<string>",
"product_qid": "<string>",
"tax_amount": "0",
"description": "<string>"
}
],
"customer_name": "<string>",
"customer_qid": "<string>",
"metadata": {}
}
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({
invoice_number: '<string>',
finalized_at: '2023-11-07T05:31:56Z',
due_date: '2023-12-25',
items: [
{
amount: 123,
service_period_start: '2023-11-07T05:31:56Z',
service_period_end: '2023-11-07T05:31:56Z',
product_name: '<string>',
product_qid: '<string>',
tax_amount: '0',
description: '<string>'
}
],
customer_name: '<string>',
customer_qid: '<string>',
metadata: {}
})
};
fetch('https://app.usequanta.com/admin_api/invoices/create_manual_invoice', 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://app.usequanta.com/admin_api/invoices/create_manual_invoice",
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([
'invoice_number' => '<string>',
'finalized_at' => '2023-11-07T05:31:56Z',
'due_date' => '2023-12-25',
'items' => [
[
'amount' => 123,
'service_period_start' => '2023-11-07T05:31:56Z',
'service_period_end' => '2023-11-07T05:31:56Z',
'product_name' => '<string>',
'product_qid' => '<string>',
'tax_amount' => '0',
'description' => '<string>'
]
],
'customer_name' => '<string>',
'customer_qid' => '<string>',
'metadata' => [
]
]),
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://app.usequanta.com/admin_api/invoices/create_manual_invoice"
payload := strings.NewReader("{\n \"invoice_number\": \"<string>\",\n \"finalized_at\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-12-25\",\n \"items\": [\n {\n \"amount\": 123,\n \"service_period_start\": \"2023-11-07T05:31:56Z\",\n \"service_period_end\": \"2023-11-07T05:31:56Z\",\n \"product_name\": \"<string>\",\n \"product_qid\": \"<string>\",\n \"tax_amount\": \"0\",\n \"description\": \"<string>\"\n }\n ],\n \"customer_name\": \"<string>\",\n \"customer_qid\": \"<string>\",\n \"metadata\": {}\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://app.usequanta.com/admin_api/invoices/create_manual_invoice")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_number\": \"<string>\",\n \"finalized_at\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-12-25\",\n \"items\": [\n {\n \"amount\": 123,\n \"service_period_start\": \"2023-11-07T05:31:56Z\",\n \"service_period_end\": \"2023-11-07T05:31:56Z\",\n \"product_name\": \"<string>\",\n \"product_qid\": \"<string>\",\n \"tax_amount\": \"0\",\n \"description\": \"<string>\"\n }\n ],\n \"customer_name\": \"<string>\",\n \"customer_qid\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.usequanta.com/admin_api/invoices/create_manual_invoice")
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 \"invoice_number\": \"<string>\",\n \"finalized_at\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-12-25\",\n \"items\": [\n {\n \"amount\": 123,\n \"service_period_start\": \"2023-11-07T05:31:56Z\",\n \"service_period_end\": \"2023-11-07T05:31:56Z\",\n \"product_name\": \"<string>\",\n \"product_qid\": \"<string>\",\n \"tax_amount\": \"0\",\n \"description\": \"<string>\"\n }\n ],\n \"customer_name\": \"<string>\",\n \"customer_qid\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"manual_source_invoice_qid": "<string>",
"invoice_qid": "<string>",
"event_qid": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}invoice_admin
Create Manual Invoice
POST
/
admin_api
/
invoices
/
create_manual_invoice
Create Manual Invoice
curl --request POST \
--url https://app.usequanta.com/admin_api/invoices/create_manual_invoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_number": "<string>",
"finalized_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"items": [
{
"amount": 123,
"service_period_start": "2023-11-07T05:31:56Z",
"service_period_end": "2023-11-07T05:31:56Z",
"product_name": "<string>",
"product_qid": "<string>",
"tax_amount": "0",
"description": "<string>"
}
],
"customer_name": "<string>",
"customer_qid": "<string>",
"metadata": {}
}
'import requests
url = "https://app.usequanta.com/admin_api/invoices/create_manual_invoice"
payload = {
"invoice_number": "<string>",
"finalized_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"items": [
{
"amount": 123,
"service_period_start": "2023-11-07T05:31:56Z",
"service_period_end": "2023-11-07T05:31:56Z",
"product_name": "<string>",
"product_qid": "<string>",
"tax_amount": "0",
"description": "<string>"
}
],
"customer_name": "<string>",
"customer_qid": "<string>",
"metadata": {}
}
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({
invoice_number: '<string>',
finalized_at: '2023-11-07T05:31:56Z',
due_date: '2023-12-25',
items: [
{
amount: 123,
service_period_start: '2023-11-07T05:31:56Z',
service_period_end: '2023-11-07T05:31:56Z',
product_name: '<string>',
product_qid: '<string>',
tax_amount: '0',
description: '<string>'
}
],
customer_name: '<string>',
customer_qid: '<string>',
metadata: {}
})
};
fetch('https://app.usequanta.com/admin_api/invoices/create_manual_invoice', 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://app.usequanta.com/admin_api/invoices/create_manual_invoice",
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([
'invoice_number' => '<string>',
'finalized_at' => '2023-11-07T05:31:56Z',
'due_date' => '2023-12-25',
'items' => [
[
'amount' => 123,
'service_period_start' => '2023-11-07T05:31:56Z',
'service_period_end' => '2023-11-07T05:31:56Z',
'product_name' => '<string>',
'product_qid' => '<string>',
'tax_amount' => '0',
'description' => '<string>'
]
],
'customer_name' => '<string>',
'customer_qid' => '<string>',
'metadata' => [
]
]),
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://app.usequanta.com/admin_api/invoices/create_manual_invoice"
payload := strings.NewReader("{\n \"invoice_number\": \"<string>\",\n \"finalized_at\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-12-25\",\n \"items\": [\n {\n \"amount\": 123,\n \"service_period_start\": \"2023-11-07T05:31:56Z\",\n \"service_period_end\": \"2023-11-07T05:31:56Z\",\n \"product_name\": \"<string>\",\n \"product_qid\": \"<string>\",\n \"tax_amount\": \"0\",\n \"description\": \"<string>\"\n }\n ],\n \"customer_name\": \"<string>\",\n \"customer_qid\": \"<string>\",\n \"metadata\": {}\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://app.usequanta.com/admin_api/invoices/create_manual_invoice")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_number\": \"<string>\",\n \"finalized_at\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-12-25\",\n \"items\": [\n {\n \"amount\": 123,\n \"service_period_start\": \"2023-11-07T05:31:56Z\",\n \"service_period_end\": \"2023-11-07T05:31:56Z\",\n \"product_name\": \"<string>\",\n \"product_qid\": \"<string>\",\n \"tax_amount\": \"0\",\n \"description\": \"<string>\"\n }\n ],\n \"customer_name\": \"<string>\",\n \"customer_qid\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.usequanta.com/admin_api/invoices/create_manual_invoice")
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 \"invoice_number\": \"<string>\",\n \"finalized_at\": \"2023-11-07T05:31:56Z\",\n \"due_date\": \"2023-12-25\",\n \"items\": [\n {\n \"amount\": 123,\n \"service_period_start\": \"2023-11-07T05:31:56Z\",\n \"service_period_end\": \"2023-11-07T05:31:56Z\",\n \"product_name\": \"<string>\",\n \"product_qid\": \"<string>\",\n \"tax_amount\": \"0\",\n \"description\": \"<string>\"\n }\n ],\n \"customer_name\": \"<string>\",\n \"customer_qid\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"manual_source_invoice_qid": "<string>",
"invoice_qid": "<string>",
"event_qid": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Quanta Services API scoped bearer token. Supported only on Services API routes.
Body
application/json