curl --request POST \
--url https://api.upwell.com/api/rest/invoices/{id}/approve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"overrideExceptions": false
}
'import requests
url = "https://api.upwell.com/api/rest/invoices/{id}/approve"
payload = {
"id": "<string>",
"overrideExceptions": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '<string>', overrideExceptions: false})
};
fetch('https://api.upwell.com/api/rest/invoices/{id}/approve', 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.upwell.com/api/rest/invoices/{id}/approve",
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([
'id' => '<string>',
'overrideExceptions' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.upwell.com/api/rest/invoices/{id}/approve"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"overrideExceptions\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.upwell.com/api/rest/invoices/{id}/approve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"overrideExceptions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upwell.com/api/rest/invoices/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"overrideExceptions\": false\n}"
response = http.request(request)
puts response.read_body{
"approveInvoice": {
"error": {
"code": "<string>",
"message": "<string>"
},
"exceptions": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"ownerId": "<string>",
"status": "<string>",
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"success": true
}
}{
"error": "Not-NULL violation. null value in column \"shipment_id\" of relation \"shipments\" violates not-null constraint",
"code": "constraint-violation"
}{
"error": "Authentication hook unauthorized this request",
"path": "$",
"code": "access-denied"
}Approve customer invoice
Approve a customer invoice for sending. If the invoice has open exceptions, approval will fail unless overrideExceptions=true is passed, which will close all open exceptions and approve the invoice.
curl --request POST \
--url https://api.upwell.com/api/rest/invoices/{id}/approve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"overrideExceptions": false
}
'import requests
url = "https://api.upwell.com/api/rest/invoices/{id}/approve"
payload = {
"id": "<string>",
"overrideExceptions": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '<string>', overrideExceptions: false})
};
fetch('https://api.upwell.com/api/rest/invoices/{id}/approve', 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.upwell.com/api/rest/invoices/{id}/approve",
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([
'id' => '<string>',
'overrideExceptions' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.upwell.com/api/rest/invoices/{id}/approve"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"overrideExceptions\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.upwell.com/api/rest/invoices/{id}/approve")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"overrideExceptions\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upwell.com/api/rest/invoices/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"overrideExceptions\": false\n}"
response = http.request(request)
puts response.read_body{
"approveInvoice": {
"error": {
"code": "<string>",
"message": "<string>"
},
"exceptions": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"ownerId": "<string>",
"status": "<string>",
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"success": true
}
}{
"error": "Not-NULL violation. null value in column \"shipment_id\" of relation \"shipments\" violates not-null constraint",
"code": "constraint-violation"
}{
"error": "Authentication hook unauthorized this request",
"path": "$",
"code": "access-denied"
}200 body (approveInvoice.error.code: OPEN_EXCEPTIONS, INVOICE_NOT_FOUND) — check success/error, not just the HTTP status. overrideExceptions=true closes open exceptions and approves. See Error handling.Authorizations
Your API key, sent in the Authorization header: Authorization: YOUR_API_KEY. A Bearer prefix is also accepted (Authorization: Bearer YOUR_API_KEY). Keys are created in the Upwell dashboard (Account → API keys) and are scoped to one organization.
Path Parameters
The ID of the invoice to approve
Query Parameters
If true, closes all open exceptions and approves the invoice. If false and exceptions exist, approval will fail.
Body
Optional request body. Parameters can be provided either in the query string or request body.
Response
Invoice approval response
The approval operation result
Show child attributes
Show child attributes

