Invoice Update Api
curl --request PUT \
--url https://api.justpaid.io/api/v1/invoice/{invoice_uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_status": "sent",
"invoice_date": "2024-03-21",
"due_date": "2024-04-21",
"description": "Monthly services for March 2024",
"service_start_date": "2024-03-01",
"service_end_date": "2024-03-31",
"notes": "<string>",
"recipients": [
"<string>"
],
"custom_fields": [
{}
]
}
'import requests
url = "https://api.justpaid.io/api/v1/invoice/{invoice_uuid}"
payload = {
"invoice_status": "sent",
"invoice_date": "2024-03-21",
"due_date": "2024-04-21",
"description": "Monthly services for March 2024",
"service_start_date": "2024-03-01",
"service_end_date": "2024-03-31",
"notes": "<string>",
"recipients": ["<string>"],
"custom_fields": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_status: 'sent',
invoice_date: '2024-03-21',
due_date: '2024-04-21',
description: 'Monthly services for March 2024',
service_start_date: '2024-03-01',
service_end_date: '2024-03-31',
notes: '<string>',
recipients: ['<string>'],
custom_fields: [{}]
})
};
fetch('https://api.justpaid.io/api/v1/invoice/{invoice_uuid}', 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://api.justpaid.io/api/v1/invoice/{invoice_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'invoice_status' => 'sent',
'invoice_date' => '2024-03-21',
'due_date' => '2024-04-21',
'description' => 'Monthly services for March 2024',
'service_start_date' => '2024-03-01',
'service_end_date' => '2024-03-31',
'notes' => '<string>',
'recipients' => [
'<string>'
],
'custom_fields' => [
[
]
]
]),
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://api.justpaid.io/api/v1/invoice/{invoice_uuid}"
payload := strings.NewReader("{\n \"invoice_status\": \"sent\",\n \"invoice_date\": \"2024-03-21\",\n \"due_date\": \"2024-04-21\",\n \"description\": \"Monthly services for March 2024\",\n \"service_start_date\": \"2024-03-01\",\n \"service_end_date\": \"2024-03-31\",\n \"notes\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"custom_fields\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.justpaid.io/api/v1/invoice/{invoice_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_status\": \"sent\",\n \"invoice_date\": \"2024-03-21\",\n \"due_date\": \"2024-04-21\",\n \"description\": \"Monthly services for March 2024\",\n \"service_start_date\": \"2024-03-01\",\n \"service_end_date\": \"2024-03-31\",\n \"notes\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"custom_fields\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justpaid.io/api/v1/invoice/{invoice_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_status\": \"sent\",\n \"invoice_date\": \"2024-03-21\",\n \"due_date\": \"2024-04-21\",\n \"description\": \"Monthly services for March 2024\",\n \"service_start_date\": \"2024-03-01\",\n \"service_end_date\": \"2024-03-31\",\n \"notes\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"custom_fields\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"invoice_status": "draft",
"amount": 1000,
"currency": "USD",
"invoice_number": "INV-2024-001",
"invoice_date": "2024-03-21",
"due_date": "2024-04-21",
"service_start_date": "2024-03-01",
"service_end_date": "2024-03-31",
"description": "Monthly services for March 2024",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T12:00:00Z",
"is_recurring": false,
"from_external_source": false,
"external_source": "stripe",
"external_source_id": "inv_123456",
"payment_link": "https://app.justpaid.ai/portal/inv/123",
"line_items": [
{
"unit_price": 123,
"amount": 123,
"flat_fee": 123,
"tax_rate": 123,
"tax_amount": 123,
"discount_amount": 123,
"discount_percent": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 1,
"currency": "USD",
"description": "<string>",
"tax_name": "<string>",
"service_start_date": "2023-12-25",
"service_end_date": "2023-12-25",
"display_order": 123
}
],
"file_url": "https://api.justpaid.ai/invoices/123.pdf",
"customer": {
"external_id": "CUST-001",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"contact_name": "<string>",
"email": "<string>",
"additional_emails": [
"<unknown>"
],
"billing_emails": [
"<unknown>"
],
"phone_number": "<string>",
"currency": "USD",
"tax_id": "<string>"
}
}{}{}Invoice
Invoice Update Api
Updates an existing invoice.
PUT
/
api
/
v1
/
invoice
/
{invoice_uuid}
Invoice Update Api
curl --request PUT \
--url https://api.justpaid.io/api/v1/invoice/{invoice_uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_status": "sent",
"invoice_date": "2024-03-21",
"due_date": "2024-04-21",
"description": "Monthly services for March 2024",
"service_start_date": "2024-03-01",
"service_end_date": "2024-03-31",
"notes": "<string>",
"recipients": [
"<string>"
],
"custom_fields": [
{}
]
}
'import requests
url = "https://api.justpaid.io/api/v1/invoice/{invoice_uuid}"
payload = {
"invoice_status": "sent",
"invoice_date": "2024-03-21",
"due_date": "2024-04-21",
"description": "Monthly services for March 2024",
"service_start_date": "2024-03-01",
"service_end_date": "2024-03-31",
"notes": "<string>",
"recipients": ["<string>"],
"custom_fields": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_status: 'sent',
invoice_date: '2024-03-21',
due_date: '2024-04-21',
description: 'Monthly services for March 2024',
service_start_date: '2024-03-01',
service_end_date: '2024-03-31',
notes: '<string>',
recipients: ['<string>'],
custom_fields: [{}]
})
};
fetch('https://api.justpaid.io/api/v1/invoice/{invoice_uuid}', 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://api.justpaid.io/api/v1/invoice/{invoice_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'invoice_status' => 'sent',
'invoice_date' => '2024-03-21',
'due_date' => '2024-04-21',
'description' => 'Monthly services for March 2024',
'service_start_date' => '2024-03-01',
'service_end_date' => '2024-03-31',
'notes' => '<string>',
'recipients' => [
'<string>'
],
'custom_fields' => [
[
]
]
]),
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://api.justpaid.io/api/v1/invoice/{invoice_uuid}"
payload := strings.NewReader("{\n \"invoice_status\": \"sent\",\n \"invoice_date\": \"2024-03-21\",\n \"due_date\": \"2024-04-21\",\n \"description\": \"Monthly services for March 2024\",\n \"service_start_date\": \"2024-03-01\",\n \"service_end_date\": \"2024-03-31\",\n \"notes\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"custom_fields\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.justpaid.io/api/v1/invoice/{invoice_uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_status\": \"sent\",\n \"invoice_date\": \"2024-03-21\",\n \"due_date\": \"2024-04-21\",\n \"description\": \"Monthly services for March 2024\",\n \"service_start_date\": \"2024-03-01\",\n \"service_end_date\": \"2024-03-31\",\n \"notes\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"custom_fields\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justpaid.io/api/v1/invoice/{invoice_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_status\": \"sent\",\n \"invoice_date\": \"2024-03-21\",\n \"due_date\": \"2024-04-21\",\n \"description\": \"Monthly services for March 2024\",\n \"service_start_date\": \"2024-03-01\",\n \"service_end_date\": \"2024-03-31\",\n \"notes\": \"<string>\",\n \"recipients\": [\n \"<string>\"\n ],\n \"custom_fields\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"invoice_status": "draft",
"amount": 1000,
"currency": "USD",
"invoice_number": "INV-2024-001",
"invoice_date": "2024-03-21",
"due_date": "2024-04-21",
"service_start_date": "2024-03-01",
"service_end_date": "2024-03-31",
"description": "Monthly services for March 2024",
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T12:00:00Z",
"is_recurring": false,
"from_external_source": false,
"external_source": "stripe",
"external_source_id": "inv_123456",
"payment_link": "https://app.justpaid.ai/portal/inv/123",
"line_items": [
{
"unit_price": 123,
"amount": 123,
"flat_fee": 123,
"tax_rate": 123,
"tax_amount": 123,
"discount_amount": 123,
"discount_percent": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 1,
"currency": "USD",
"description": "<string>",
"tax_name": "<string>",
"service_start_date": "2023-12-25",
"service_end_date": "2023-12-25",
"display_order": 123
}
],
"file_url": "https://api.justpaid.ai/invoices/123.pdf",
"customer": {
"external_id": "CUST-001",
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"contact_name": "<string>",
"email": "<string>",
"additional_emails": [
"<unknown>"
],
"billing_emails": [
"<unknown>"
],
"phone_number": "<string>",
"currency": "USD",
"tax_id": "<string>"
}
}{}{}Authorizations
Body
application/json
Input schema for updating an invoice (all fields optional).
Response
Invoice updated successfully
Output schema for invoice information.
Was this page helpful?
