curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": 123,
"order_date": "2023-12-25",
"payment_terms": "<string>",
"ship_by_date": "2023-12-25",
"customer_po_number": "<string>",
"public_note": "<string>",
"private_note": "<string>",
"total_shipping": 123,
"tax_amount": 123,
"order_discount_amount": 123,
"warehouse_id": 123,
"sales_channel_id": 123,
"revenue_account_id": 123,
"invoice_export_template_id": 123,
"alternate_ids": [
"<string>"
],
"tags": [
"<string>"
],
"custom_fields": {},
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency_code": "<string>",
"exchange_rate": 123,
"presentment_total_amount": 123,
"presentment_net_total_amount": 123,
"presentment_paid_amount": 123,
"presentment_tax_amount": 123,
"presentment_shipping_amount": 123,
"presentment_discount_amount": 123,
"items": [
{
"quantity": 123,
"unit_price": 123,
"product_id": 123,
"sku": "<string>",
"description": "<string>",
"presentment_unit_price": 123
}
]
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}"
payload = {
"company_id": 123,
"order_date": "2023-12-25",
"payment_terms": "<string>",
"ship_by_date": "2023-12-25",
"customer_po_number": "<string>",
"public_note": "<string>",
"private_note": "<string>",
"total_shipping": 123,
"tax_amount": 123,
"order_discount_amount": 123,
"warehouse_id": 123,
"sales_channel_id": 123,
"revenue_account_id": 123,
"invoice_export_template_id": 123,
"alternate_ids": ["<string>"],
"tags": ["<string>"],
"custom_fields": {},
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency_code": "<string>",
"exchange_rate": 123,
"presentment_total_amount": 123,
"presentment_net_total_amount": 123,
"presentment_paid_amount": 123,
"presentment_tax_amount": 123,
"presentment_shipping_amount": 123,
"presentment_discount_amount": 123,
"items": [
{
"quantity": 123,
"unit_price": 123,
"product_id": 123,
"sku": "<string>",
"description": "<string>",
"presentment_unit_price": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_id: 123,
order_date: '2023-12-25',
payment_terms: '<string>',
ship_by_date: '2023-12-25',
customer_po_number: '<string>',
public_note: '<string>',
private_note: '<string>',
total_shipping: 123,
tax_amount: 123,
order_discount_amount: 123,
warehouse_id: 123,
sales_channel_id: 123,
revenue_account_id: 123,
invoice_export_template_id: 123,
alternate_ids: ['<string>'],
tags: ['<string>'],
custom_fields: {},
ship_to: {
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
currency_code: '<string>',
exchange_rate: 123,
presentment_total_amount: 123,
presentment_net_total_amount: 123,
presentment_paid_amount: 123,
presentment_tax_amount: 123,
presentment_shipping_amount: 123,
presentment_discount_amount: 123,
items: [
{
quantity: 123,
unit_price: 123,
product_id: 123,
sku: '<string>',
description: '<string>',
presentment_unit_price: 123
}
]
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{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://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'company_id' => 123,
'order_date' => '2023-12-25',
'payment_terms' => '<string>',
'ship_by_date' => '2023-12-25',
'customer_po_number' => '<string>',
'public_note' => '<string>',
'private_note' => '<string>',
'total_shipping' => 123,
'tax_amount' => 123,
'order_discount_amount' => 123,
'warehouse_id' => 123,
'sales_channel_id' => 123,
'revenue_account_id' => 123,
'invoice_export_template_id' => 123,
'alternate_ids' => [
'<string>'
],
'tags' => [
'<string>'
],
'custom_fields' => [
],
'ship_to' => [
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'currency_code' => '<string>',
'exchange_rate' => 123,
'presentment_total_amount' => 123,
'presentment_net_total_amount' => 123,
'presentment_paid_amount' => 123,
'presentment_tax_amount' => 123,
'presentment_shipping_amount' => 123,
'presentment_discount_amount' => 123,
'items' => [
[
'quantity' => 123,
'unit_price' => 123,
'product_id' => 123,
'sku' => '<string>',
'description' => '<string>',
'presentment_unit_price' => 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://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}"
payload := strings.NewReader("{\n \"company_id\": 123,\n \"order_date\": \"2023-12-25\",\n \"payment_terms\": \"<string>\",\n \"ship_by_date\": \"2023-12-25\",\n \"customer_po_number\": \"<string>\",\n \"public_note\": \"<string>\",\n \"private_note\": \"<string>\",\n \"total_shipping\": 123,\n \"tax_amount\": 123,\n \"order_discount_amount\": 123,\n \"warehouse_id\": 123,\n \"sales_channel_id\": 123,\n \"revenue_account_id\": 123,\n \"invoice_export_template_id\": 123,\n \"alternate_ids\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"ship_to\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency_code\": \"<string>\",\n \"exchange_rate\": 123,\n \"presentment_total_amount\": 123,\n \"presentment_net_total_amount\": 123,\n \"presentment_paid_amount\": 123,\n \"presentment_tax_amount\": 123,\n \"presentment_shipping_amount\": 123,\n \"presentment_discount_amount\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"unit_price\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"presentment_unit_price\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": 123,\n \"order_date\": \"2023-12-25\",\n \"payment_terms\": \"<string>\",\n \"ship_by_date\": \"2023-12-25\",\n \"customer_po_number\": \"<string>\",\n \"public_note\": \"<string>\",\n \"private_note\": \"<string>\",\n \"total_shipping\": 123,\n \"tax_amount\": 123,\n \"order_discount_amount\": 123,\n \"warehouse_id\": 123,\n \"sales_channel_id\": 123,\n \"revenue_account_id\": 123,\n \"invoice_export_template_id\": 123,\n \"alternate_ids\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"ship_to\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency_code\": \"<string>\",\n \"exchange_rate\": 123,\n \"presentment_total_amount\": 123,\n \"presentment_net_total_amount\": 123,\n \"presentment_paid_amount\": 123,\n \"presentment_tax_amount\": 123,\n \"presentment_shipping_amount\": 123,\n \"presentment_discount_amount\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"unit_price\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"presentment_unit_price\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_id\": 123,\n \"order_date\": \"2023-12-25\",\n \"payment_terms\": \"<string>\",\n \"ship_by_date\": \"2023-12-25\",\n \"customer_po_number\": \"<string>\",\n \"public_note\": \"<string>\",\n \"private_note\": \"<string>\",\n \"total_shipping\": 123,\n \"tax_amount\": 123,\n \"order_discount_amount\": 123,\n \"warehouse_id\": 123,\n \"sales_channel_id\": 123,\n \"revenue_account_id\": 123,\n \"invoice_export_template_id\": 123,\n \"alternate_ids\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"ship_to\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency_code\": \"<string>\",\n \"exchange_rate\": 123,\n \"presentment_total_amount\": 123,\n \"presentment_net_total_amount\": 123,\n \"presentment_paid_amount\": 123,\n \"presentment_tax_amount\": 123,\n \"presentment_shipping_amount\": 123,\n \"presentment_discount_amount\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"unit_price\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"presentment_unit_price\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"payment_status": "<string>",
"order_date": "2023-11-07T05:31:56Z",
"ship_by_date": "2023-11-07T05:31:56Z",
"approval_status": "<string>",
"customer_po_number": "<string>",
"payment_terms": "<string>",
"public_note": "<string>",
"private_note": "<string>",
"total_qty": 123,
"total_shipping": 123,
"total_discount": 123,
"total": 123,
"total_paid": 123,
"total_due": 123,
"warehouse_id": 123,
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"quickbooks_invoice_id": "<string>",
"quickbooks_message": "<string>",
"customer": {
"id": 123,
"name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"phone": "<string>",
"email": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"items": [
{
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sku": "<string>",
"name": "<string>",
"product_id": 123,
"qty": 123,
"unit_price": 123,
"discount": 123,
"total": 123
}
],
"payments": [
{
"id": 123,
"invoice_id": 123,
"gateway": "<string>",
"type": "<string>",
"charge_type": "<string>",
"amount": 123,
"date": "2023-11-07T05:31:56Z",
"status": "<string>",
"external_id": "<string>",
"notes": "<string>",
"reference_id": "<string>",
"gateway_response": {
"status": "<string>",
"code": "<string>",
"message": "<string>",
"metadata": "<string>"
},
"created_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"sales_order": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"order_id": "<string>",
"order_number": "<string>",
"order_date": "2023-12-25",
"payment_date": "2023-12-25",
"ship_by_date": "2023-12-25",
"age": 123,
"order_status": "<string>",
"customer_id": "<string>",
"customer_username": "<string>",
"customer_email": "<string>",
"bill_to": {},
"ship_to": {},
"requested_shipping_service": "<string>",
"total": 123,
"total_paid": 123,
"total_tax": 123,
"total_shipping": 123,
"customer_notes": "<string>",
"internal_notes": "<string>",
"ship_date": "2023-12-25",
"hold_until_date": "2023-12-25",
"user_id": 123,
"externally_fulfilled": true,
"externally_fulfilled_by": "<string>",
"is_posted": true,
"posted_by": "<string>",
"not_sync": true,
"sales_posted": true,
"split_order": true,
"skip_inventory": true,
"skip_sales_report": true,
"channel_id": 123,
"total_order_cost": 123,
"total_order_quantity": 123,
"order_cost_details": {},
"source": "<string>",
"shipstation_order_id": "<string>",
"type": "<string>",
"parent_id": 123,
"shipping_revenue": 123,
"product_total": 123,
"total_discount": 123,
"picking_status": "<string>",
"starred_description": "<string>",
"customer_po_number": "<string>"
},
"custom_fields": {
"Field Name 1": "Some Value"
},
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Update invoice
Partially update an existing invoice. Only the fields you supply are changed; any field you omit is left untouched.
When items is provided it replaces the full set of line items, so include
every line you want to keep. Each item must supply either product_id or sku.
Monetary totals (total_amount, total_units, net_total_amount) are recomputed
automatically when items or monetary fields change.
The update is atomic: if any part of it fails to persist (for example, saving
alternate_ids), the entire update is rolled back and the invoice and its
installments are left unchanged.
curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_id": 123,
"order_date": "2023-12-25",
"payment_terms": "<string>",
"ship_by_date": "2023-12-25",
"customer_po_number": "<string>",
"public_note": "<string>",
"private_note": "<string>",
"total_shipping": 123,
"tax_amount": 123,
"order_discount_amount": 123,
"warehouse_id": 123,
"sales_channel_id": 123,
"revenue_account_id": 123,
"invoice_export_template_id": 123,
"alternate_ids": [
"<string>"
],
"tags": [
"<string>"
],
"custom_fields": {},
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency_code": "<string>",
"exchange_rate": 123,
"presentment_total_amount": 123,
"presentment_net_total_amount": 123,
"presentment_paid_amount": 123,
"presentment_tax_amount": 123,
"presentment_shipping_amount": 123,
"presentment_discount_amount": 123,
"items": [
{
"quantity": 123,
"unit_price": 123,
"product_id": 123,
"sku": "<string>",
"description": "<string>",
"presentment_unit_price": 123
}
]
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}"
payload = {
"company_id": 123,
"order_date": "2023-12-25",
"payment_terms": "<string>",
"ship_by_date": "2023-12-25",
"customer_po_number": "<string>",
"public_note": "<string>",
"private_note": "<string>",
"total_shipping": 123,
"tax_amount": 123,
"order_discount_amount": 123,
"warehouse_id": 123,
"sales_channel_id": 123,
"revenue_account_id": 123,
"invoice_export_template_id": 123,
"alternate_ids": ["<string>"],
"tags": ["<string>"],
"custom_fields": {},
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"currency_code": "<string>",
"exchange_rate": 123,
"presentment_total_amount": 123,
"presentment_net_total_amount": 123,
"presentment_paid_amount": 123,
"presentment_tax_amount": 123,
"presentment_shipping_amount": 123,
"presentment_discount_amount": 123,
"items": [
{
"quantity": 123,
"unit_price": 123,
"product_id": 123,
"sku": "<string>",
"description": "<string>",
"presentment_unit_price": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_id: 123,
order_date: '2023-12-25',
payment_terms: '<string>',
ship_by_date: '2023-12-25',
customer_po_number: '<string>',
public_note: '<string>',
private_note: '<string>',
total_shipping: 123,
tax_amount: 123,
order_discount_amount: 123,
warehouse_id: 123,
sales_channel_id: 123,
revenue_account_id: 123,
invoice_export_template_id: 123,
alternate_ids: ['<string>'],
tags: ['<string>'],
custom_fields: {},
ship_to: {
address_1: '<string>',
address_2: '<string>',
city: '<string>',
state: '<string>',
zip: '<string>',
country: '<string>'
},
currency_code: '<string>',
exchange_rate: 123,
presentment_total_amount: 123,
presentment_net_total_amount: 123,
presentment_paid_amount: 123,
presentment_tax_amount: 123,
presentment_shipping_amount: 123,
presentment_discount_amount: 123,
items: [
{
quantity: 123,
unit_price: 123,
product_id: 123,
sku: '<string>',
description: '<string>',
presentment_unit_price: 123
}
]
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{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://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'company_id' => 123,
'order_date' => '2023-12-25',
'payment_terms' => '<string>',
'ship_by_date' => '2023-12-25',
'customer_po_number' => '<string>',
'public_note' => '<string>',
'private_note' => '<string>',
'total_shipping' => 123,
'tax_amount' => 123,
'order_discount_amount' => 123,
'warehouse_id' => 123,
'sales_channel_id' => 123,
'revenue_account_id' => 123,
'invoice_export_template_id' => 123,
'alternate_ids' => [
'<string>'
],
'tags' => [
'<string>'
],
'custom_fields' => [
],
'ship_to' => [
'address_1' => '<string>',
'address_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'zip' => '<string>',
'country' => '<string>'
],
'currency_code' => '<string>',
'exchange_rate' => 123,
'presentment_total_amount' => 123,
'presentment_net_total_amount' => 123,
'presentment_paid_amount' => 123,
'presentment_tax_amount' => 123,
'presentment_shipping_amount' => 123,
'presentment_discount_amount' => 123,
'items' => [
[
'quantity' => 123,
'unit_price' => 123,
'product_id' => 123,
'sku' => '<string>',
'description' => '<string>',
'presentment_unit_price' => 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://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}"
payload := strings.NewReader("{\n \"company_id\": 123,\n \"order_date\": \"2023-12-25\",\n \"payment_terms\": \"<string>\",\n \"ship_by_date\": \"2023-12-25\",\n \"customer_po_number\": \"<string>\",\n \"public_note\": \"<string>\",\n \"private_note\": \"<string>\",\n \"total_shipping\": 123,\n \"tax_amount\": 123,\n \"order_discount_amount\": 123,\n \"warehouse_id\": 123,\n \"sales_channel_id\": 123,\n \"revenue_account_id\": 123,\n \"invoice_export_template_id\": 123,\n \"alternate_ids\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"ship_to\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency_code\": \"<string>\",\n \"exchange_rate\": 123,\n \"presentment_total_amount\": 123,\n \"presentment_net_total_amount\": 123,\n \"presentment_paid_amount\": 123,\n \"presentment_tax_amount\": 123,\n \"presentment_shipping_amount\": 123,\n \"presentment_discount_amount\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"unit_price\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"presentment_unit_price\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": 123,\n \"order_date\": \"2023-12-25\",\n \"payment_terms\": \"<string>\",\n \"ship_by_date\": \"2023-12-25\",\n \"customer_po_number\": \"<string>\",\n \"public_note\": \"<string>\",\n \"private_note\": \"<string>\",\n \"total_shipping\": 123,\n \"tax_amount\": 123,\n \"order_discount_amount\": 123,\n \"warehouse_id\": 123,\n \"sales_channel_id\": 123,\n \"revenue_account_id\": 123,\n \"invoice_export_template_id\": 123,\n \"alternate_ids\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"ship_to\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency_code\": \"<string>\",\n \"exchange_rate\": 123,\n \"presentment_total_amount\": 123,\n \"presentment_net_total_amount\": 123,\n \"presentment_paid_amount\": 123,\n \"presentment_tax_amount\": 123,\n \"presentment_shipping_amount\": 123,\n \"presentment_discount_amount\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"unit_price\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"presentment_unit_price\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/invoices/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_id\": 123,\n \"order_date\": \"2023-12-25\",\n \"payment_terms\": \"<string>\",\n \"ship_by_date\": \"2023-12-25\",\n \"customer_po_number\": \"<string>\",\n \"public_note\": \"<string>\",\n \"private_note\": \"<string>\",\n \"total_shipping\": 123,\n \"tax_amount\": 123,\n \"order_discount_amount\": 123,\n \"warehouse_id\": 123,\n \"sales_channel_id\": 123,\n \"revenue_account_id\": 123,\n \"invoice_export_template_id\": 123,\n \"alternate_ids\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"custom_fields\": {},\n \"ship_to\": {\n \"address_1\": \"<string>\",\n \"address_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"zip\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"currency_code\": \"<string>\",\n \"exchange_rate\": 123,\n \"presentment_total_amount\": 123,\n \"presentment_net_total_amount\": 123,\n \"presentment_paid_amount\": 123,\n \"presentment_tax_amount\": 123,\n \"presentment_shipping_amount\": 123,\n \"presentment_discount_amount\": 123,\n \"items\": [\n {\n \"quantity\": 123,\n \"unit_price\": 123,\n \"product_id\": 123,\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"presentment_unit_price\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"payment_status": "<string>",
"order_date": "2023-11-07T05:31:56Z",
"ship_by_date": "2023-11-07T05:31:56Z",
"approval_status": "<string>",
"customer_po_number": "<string>",
"payment_terms": "<string>",
"public_note": "<string>",
"private_note": "<string>",
"total_qty": 123,
"total_shipping": 123,
"total_discount": 123,
"total": 123,
"total_paid": 123,
"total_due": 123,
"warehouse_id": 123,
"ship_to": {
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>"
},
"quickbooks_invoice_id": "<string>",
"quickbooks_message": "<string>",
"customer": {
"id": 123,
"name": "<string>",
"address_1": "<string>",
"address_2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"phone": "<string>",
"email": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"items": [
{
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sku": "<string>",
"name": "<string>",
"product_id": 123,
"qty": 123,
"unit_price": 123,
"discount": 123,
"total": 123
}
],
"payments": [
{
"id": 123,
"invoice_id": 123,
"gateway": "<string>",
"type": "<string>",
"charge_type": "<string>",
"amount": 123,
"date": "2023-11-07T05:31:56Z",
"status": "<string>",
"external_id": "<string>",
"notes": "<string>",
"reference_id": "<string>",
"gateway_response": {
"status": "<string>",
"code": "<string>",
"message": "<string>",
"metadata": "<string>"
},
"created_by": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"sales_order": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"order_id": "<string>",
"order_number": "<string>",
"order_date": "2023-12-25",
"payment_date": "2023-12-25",
"ship_by_date": "2023-12-25",
"age": 123,
"order_status": "<string>",
"customer_id": "<string>",
"customer_username": "<string>",
"customer_email": "<string>",
"bill_to": {},
"ship_to": {},
"requested_shipping_service": "<string>",
"total": 123,
"total_paid": 123,
"total_tax": 123,
"total_shipping": 123,
"customer_notes": "<string>",
"internal_notes": "<string>",
"ship_date": "2023-12-25",
"hold_until_date": "2023-12-25",
"user_id": 123,
"externally_fulfilled": true,
"externally_fulfilled_by": "<string>",
"is_posted": true,
"posted_by": "<string>",
"not_sync": true,
"sales_posted": true,
"split_order": true,
"skip_inventory": true,
"skip_sales_report": true,
"channel_id": 123,
"total_order_cost": 123,
"total_order_quantity": 123,
"order_cost_details": {},
"source": "<string>",
"shipstation_order_id": "<string>",
"type": "<string>",
"parent_id": 123,
"shipping_revenue": 123,
"product_total": 123,
"total_discount": 123,
"picking_status": "<string>",
"starred_description": "<string>",
"customer_po_number": "<string>"
},
"custom_fields": {
"Field Name 1": "Some Value"
},
"tags": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"color": "<string>"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
ID of the invoice to update
Body
ID of the company (customer) this invoice is for
Invoice date (YYYY-MM-DD)
Payment terms label (e.g. "Net 30")
Required ship by date (YYYY-MM-DD)
Customer PO number
Note visible to the customer
Internal note
Shipping charge to apply to the invoice
Tax amount
Order-level discount amount
Warehouse ID to associate with the invoice
Sales channel ID
Chart of accounts ID for revenue recognition
Export template ID
Alternate identifier strings for the invoice
Tags to attach to the invoice
Custom field key/value pairs
Shipping address
Show child attributes
Show child attributes
ISO 4217 currency code (3 letters) for the invoice presentment currency
Exchange rate from the presentment currency to the base currency (must be greater than 0)
Invoice total in the presentment currency
Net total in the presentment currency
Amount paid in the presentment currency
Tax amount in the presentment currency
Shipping amount in the presentment currency
Discount amount in the presentment currency
Replacement line items for the invoice. When provided, this replaces all existing line items, so include every line you want to keep.
1Show child attributes
Show child attributes
Response
Invoice updated
Show child attributes
Show child attributes