Invoices
Create Invoice
Create a new invoice.
POST
/
api
/
v1
/
invoices
Create Invoice
curl --request POST \
--url https://vinmake-erp.onrender.com/api/v1/invoices \
--header 'Content-Type: application/json' \
--data '
{
"invoiceNumber": "<string>",
"invoiceType": "<string>",
"salesOrderId": "<string>",
"clientId": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"totalAmount": 123,
"paidAmount": 123,
"remainingBalance": 123,
"issuedDate": "<string>",
"dueDate": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [
{}
]
}
'import requests
url = "https://vinmake-erp.onrender.com/api/v1/invoices"
payload = {
"invoiceNumber": "<string>",
"invoiceType": "<string>",
"salesOrderId": "<string>",
"clientId": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"totalAmount": 123,
"paidAmount": 123,
"remainingBalance": 123,
"issuedDate": "<string>",
"dueDate": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
invoiceNumber: '<string>',
invoiceType: '<string>',
salesOrderId: '<string>',
clientId: '<string>',
currency: '<string>',
subtotal: 123,
taxRate: 123,
taxAmount: 123,
totalAmount: 123,
paidAmount: 123,
remainingBalance: 123,
issuedDate: '<string>',
dueDate: '<string>',
status: '<string>',
notes: '<string>',
lineItems: [{}]
})
};
fetch('https://vinmake-erp.onrender.com/api/v1/invoices', 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://vinmake-erp.onrender.com/api/v1/invoices",
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([
'invoiceNumber' => '<string>',
'invoiceType' => '<string>',
'salesOrderId' => '<string>',
'clientId' => '<string>',
'currency' => '<string>',
'subtotal' => 123,
'taxRate' => 123,
'taxAmount' => 123,
'totalAmount' => 123,
'paidAmount' => 123,
'remainingBalance' => 123,
'issuedDate' => '<string>',
'dueDate' => '<string>',
'status' => '<string>',
'notes' => '<string>',
'lineItems' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://vinmake-erp.onrender.com/api/v1/invoices"
payload := strings.NewReader("{\n \"invoiceNumber\": \"<string>\",\n \"invoiceType\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"totalAmount\": 123,\n \"paidAmount\": 123,\n \"remainingBalance\": 123,\n \"issuedDate\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://vinmake-erp.onrender.com/api/v1/invoices")
.header("Content-Type", "application/json")
.body("{\n \"invoiceNumber\": \"<string>\",\n \"invoiceType\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"totalAmount\": 123,\n \"paidAmount\": 123,\n \"remainingBalance\": 123,\n \"issuedDate\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoiceNumber\": \"<string>\",\n \"invoiceType\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"totalAmount\": 123,\n \"paidAmount\": 123,\n \"remainingBalance\": 123,\n \"issuedDate\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"invoiceNumber": "<string>",
"invoiceType": "<string>",
"salesOrderId": "<string>",
"clientId": "<string>",
"clientName": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"totalAmount": 123,
"paidAmount": 123,
"remainingBalance": 123,
"issuedDate": "<string>",
"dueDate": "<string>",
"status": "<string>",
"notes": "<string>",
"createdAt": "<string>",
"lineItems": [
{
"id": "<string>",
"invoiceId": "<string>",
"salesOrderLineItemId": "<string>",
"description": "<string>",
"qty": 123,
"unitPrice": 123,
"amount": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Response
Successful Response
Show child attributes
Show child attributes
Previous
Search InvoicesSearch invoices by query string (matching invoice number, client name, sales order, or client PO) and optionally filter by status.
Next
⌘I
Create Invoice
curl --request POST \
--url https://vinmake-erp.onrender.com/api/v1/invoices \
--header 'Content-Type: application/json' \
--data '
{
"invoiceNumber": "<string>",
"invoiceType": "<string>",
"salesOrderId": "<string>",
"clientId": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"totalAmount": 123,
"paidAmount": 123,
"remainingBalance": 123,
"issuedDate": "<string>",
"dueDate": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [
{}
]
}
'import requests
url = "https://vinmake-erp.onrender.com/api/v1/invoices"
payload = {
"invoiceNumber": "<string>",
"invoiceType": "<string>",
"salesOrderId": "<string>",
"clientId": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"totalAmount": 123,
"paidAmount": 123,
"remainingBalance": 123,
"issuedDate": "<string>",
"dueDate": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
invoiceNumber: '<string>',
invoiceType: '<string>',
salesOrderId: '<string>',
clientId: '<string>',
currency: '<string>',
subtotal: 123,
taxRate: 123,
taxAmount: 123,
totalAmount: 123,
paidAmount: 123,
remainingBalance: 123,
issuedDate: '<string>',
dueDate: '<string>',
status: '<string>',
notes: '<string>',
lineItems: [{}]
})
};
fetch('https://vinmake-erp.onrender.com/api/v1/invoices', 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://vinmake-erp.onrender.com/api/v1/invoices",
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([
'invoiceNumber' => '<string>',
'invoiceType' => '<string>',
'salesOrderId' => '<string>',
'clientId' => '<string>',
'currency' => '<string>',
'subtotal' => 123,
'taxRate' => 123,
'taxAmount' => 123,
'totalAmount' => 123,
'paidAmount' => 123,
'remainingBalance' => 123,
'issuedDate' => '<string>',
'dueDate' => '<string>',
'status' => '<string>',
'notes' => '<string>',
'lineItems' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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://vinmake-erp.onrender.com/api/v1/invoices"
payload := strings.NewReader("{\n \"invoiceNumber\": \"<string>\",\n \"invoiceType\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"totalAmount\": 123,\n \"paidAmount\": 123,\n \"remainingBalance\": 123,\n \"issuedDate\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://vinmake-erp.onrender.com/api/v1/invoices")
.header("Content-Type", "application/json")
.body("{\n \"invoiceNumber\": \"<string>\",\n \"invoiceType\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"totalAmount\": 123,\n \"paidAmount\": 123,\n \"remainingBalance\": 123,\n \"issuedDate\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoiceNumber\": \"<string>\",\n \"invoiceType\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"totalAmount\": 123,\n \"paidAmount\": 123,\n \"remainingBalance\": 123,\n \"issuedDate\": \"<string>\",\n \"dueDate\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"invoiceNumber": "<string>",
"invoiceType": "<string>",
"salesOrderId": "<string>",
"clientId": "<string>",
"clientName": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"totalAmount": 123,
"paidAmount": 123,
"remainingBalance": 123,
"issuedDate": "<string>",
"dueDate": "<string>",
"status": "<string>",
"notes": "<string>",
"createdAt": "<string>",
"lineItems": [
{
"id": "<string>",
"invoiceId": "<string>",
"salesOrderLineItemId": "<string>",
"description": "<string>",
"qty": 123,
"unitPrice": 123,
"amount": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}