Update an add-on
curl --request PUT \
--url https://core.nozle.app/api/v1/add_ons/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add_on": {
"name": "Setup Fee",
"invoice_display_name": "Setup Fee (SF1)",
"code": "setup_fee",
"amount_cents": 50000,
"amount_currency": "USD",
"description": "Implementation fee for new customers.",
"tax_codes": [
"french_standard_vat"
]
}
}
'import requests
url = "https://core.nozle.app/api/v1/add_ons/{code}"
payload = { "add_on": {
"name": "Setup Fee",
"invoice_display_name": "Setup Fee (SF1)",
"code": "setup_fee",
"amount_cents": 50000,
"amount_currency": "USD",
"description": "Implementation fee for new customers.",
"tax_codes": ["french_standard_vat"]
} }
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({
add_on: {
name: 'Setup Fee',
invoice_display_name: 'Setup Fee (SF1)',
code: 'setup_fee',
amount_cents: 50000,
amount_currency: 'USD',
description: 'Implementation fee for new customers.',
tax_codes: ['french_standard_vat']
}
})
};
fetch('https://core.nozle.app/api/v1/add_ons/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/add_ons/{code}"
payload := strings.NewReader("{\n \"add_on\": {\n \"name\": \"Setup Fee\",\n \"invoice_display_name\": \"Setup Fee (SF1)\",\n \"code\": \"setup_fee\",\n \"amount_cents\": 50000,\n \"amount_currency\": \"USD\",\n \"description\": \"Implementation fee for new customers.\",\n \"tax_codes\": [\n \"french_standard_vat\"\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))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/add_ons/{code}")
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 \"add_on\": {\n \"name\": \"Setup Fee\",\n \"invoice_display_name\": \"Setup Fee (SF1)\",\n \"code\": \"setup_fee\",\n \"amount_cents\": 50000,\n \"amount_currency\": \"USD\",\n \"description\": \"Implementation fee for new customers.\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/add_ons/{code}",
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([
'add_on' => [
'name' => 'Setup Fee',
'invoice_display_name' => 'Setup Fee (SF1)',
'code' => 'setup_fee',
'amount_cents' => 50000,
'amount_currency' => 'USD',
'description' => 'Implementation fee for new customers.',
'tax_codes' => [
'french_standard_vat'
]
]
]),
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;
}HttpResponse<String> response = Unirest.put("https://core.nozle.app/api/v1/add_ons/{code}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add_on\": {\n \"name\": \"Setup Fee\",\n \"invoice_display_name\": \"Setup Fee (SF1)\",\n \"code\": \"setup_fee\",\n \"amount_cents\": 50000,\n \"amount_currency\": \"USD\",\n \"description\": \"Implementation fee for new customers.\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ]\n }\n}")
.asString();{
"add_on": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Setup Fee",
"invoice_display_name": "Setup Fee (SF1)",
"code": "setup_fee",
"amount_cents": 50000,
"amount_currency": "USD",
"description": "Implementation fee for new customers.",
"created_at": "2022-04-29T08:59:51Z",
"taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
]
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Add-ons
Update an add-on
This endpoint is used to update an existing add-on.
PUT
/
add_ons
/
{code}
Update an add-on
curl --request PUT \
--url https://core.nozle.app/api/v1/add_ons/{code} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add_on": {
"name": "Setup Fee",
"invoice_display_name": "Setup Fee (SF1)",
"code": "setup_fee",
"amount_cents": 50000,
"amount_currency": "USD",
"description": "Implementation fee for new customers.",
"tax_codes": [
"french_standard_vat"
]
}
}
'import requests
url = "https://core.nozle.app/api/v1/add_ons/{code}"
payload = { "add_on": {
"name": "Setup Fee",
"invoice_display_name": "Setup Fee (SF1)",
"code": "setup_fee",
"amount_cents": 50000,
"amount_currency": "USD",
"description": "Implementation fee for new customers.",
"tax_codes": ["french_standard_vat"]
} }
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({
add_on: {
name: 'Setup Fee',
invoice_display_name: 'Setup Fee (SF1)',
code: 'setup_fee',
amount_cents: 50000,
amount_currency: 'USD',
description: 'Implementation fee for new customers.',
tax_codes: ['french_standard_vat']
}
})
};
fetch('https://core.nozle.app/api/v1/add_ons/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/add_ons/{code}"
payload := strings.NewReader("{\n \"add_on\": {\n \"name\": \"Setup Fee\",\n \"invoice_display_name\": \"Setup Fee (SF1)\",\n \"code\": \"setup_fee\",\n \"amount_cents\": 50000,\n \"amount_currency\": \"USD\",\n \"description\": \"Implementation fee for new customers.\",\n \"tax_codes\": [\n \"french_standard_vat\"\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))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/add_ons/{code}")
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 \"add_on\": {\n \"name\": \"Setup Fee\",\n \"invoice_display_name\": \"Setup Fee (SF1)\",\n \"code\": \"setup_fee\",\n \"amount_cents\": 50000,\n \"amount_currency\": \"USD\",\n \"description\": \"Implementation fee for new customers.\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/add_ons/{code}",
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([
'add_on' => [
'name' => 'Setup Fee',
'invoice_display_name' => 'Setup Fee (SF1)',
'code' => 'setup_fee',
'amount_cents' => 50000,
'amount_currency' => 'USD',
'description' => 'Implementation fee for new customers.',
'tax_codes' => [
'french_standard_vat'
]
]
]),
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;
}HttpResponse<String> response = Unirest.put("https://core.nozle.app/api/v1/add_ons/{code}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add_on\": {\n \"name\": \"Setup Fee\",\n \"invoice_display_name\": \"Setup Fee (SF1)\",\n \"code\": \"setup_fee\",\n \"amount_cents\": 50000,\n \"amount_currency\": \"USD\",\n \"description\": \"Implementation fee for new customers.\",\n \"tax_codes\": [\n \"french_standard_vat\"\n ]\n }\n}")
.asString();{
"add_on": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Setup Fee",
"invoice_display_name": "Setup Fee (SF1)",
"code": "setup_fee",
"amount_cents": 50000,
"amount_currency": "USD",
"description": "Implementation fee for new customers.",
"created_at": "2022-04-29T08:59:51Z",
"taxes": [
{
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "TVA",
"code": "french_standard_vat",
"rate": 20,
"applied_to_organization": true,
"created_at": "2023-07-06T14:35:58Z",
"description": "French standard VAT"
}
]
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique code used to identify the add-on.
Example:
"setup_fee"
Body
application/json
Add-on payload
Show child attributes
Show child attributes
Response
Add-on updated
Show child attributes
Show child attributes