Update your organization
curl --request PUT \
--url https://core.nozle.app/api/v1/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization": {
"webhook_url": "https://webhook.brex.com",
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"email_settings": [
"invoice.finalized",
"credit_note.created"
],
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"finalize_zero_amount_invoice": false
}
}
'import requests
url = "https://core.nozle.app/api/v1/organizations"
payload = { "organization": {
"webhook_url": "https://webhook.brex.com",
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": None,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": None,
"legal_number": None,
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"email_settings": ["invoice.finalized", "credit_note.created"],
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"finalize_zero_amount_invoice": False
} }
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({
organization: {
webhook_url: 'https://webhook.brex.com',
country: 'US',
default_currency: 'USD',
address_line1: '100 Brex Street',
address_line2: null,
state: 'NYC',
zipcode: '10000',
email: 'brex@brex.com',
city: 'New York',
legal_name: null,
legal_number: null,
document_numbering: 'per_customer',
document_number_prefix: 'ORG-1234',
net_payment_term: 30,
tax_identification_number: 'US123456789',
timezone: 'America/New_York',
email_settings: ['invoice.finalized', 'credit_note.created'],
billing_configuration: {
invoice_footer: 'This is my customer footer',
invoice_grace_period: 3,
document_locale: 'en'
},
finalize_zero_amount_invoice: false
}
})
};
fetch('https://core.nozle.app/api/v1/organizations', 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/organizations"
payload := strings.NewReader("{\n \"organization\": {\n \"webhook_url\": \"https://webhook.brex.com\",\n \"country\": \"US\",\n \"default_currency\": \"USD\",\n \"address_line1\": \"100 Brex Street\",\n \"address_line2\": null,\n \"state\": \"NYC\",\n \"zipcode\": \"10000\",\n \"email\": \"brex@brex.com\",\n \"city\": \"New York\",\n \"legal_name\": null,\n \"legal_number\": null,\n \"document_numbering\": \"per_customer\",\n \"document_number_prefix\": \"ORG-1234\",\n \"net_payment_term\": 30,\n \"tax_identification_number\": \"US123456789\",\n \"timezone\": \"America/New_York\",\n \"email_settings\": [\n \"invoice.finalized\",\n \"credit_note.created\"\n ],\n \"billing_configuration\": {\n \"invoice_footer\": \"This is my customer footer\",\n \"invoice_grace_period\": 3,\n \"document_locale\": \"en\"\n },\n \"finalize_zero_amount_invoice\": false\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/organizations")
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 \"organization\": {\n \"webhook_url\": \"https://webhook.brex.com\",\n \"country\": \"US\",\n \"default_currency\": \"USD\",\n \"address_line1\": \"100 Brex Street\",\n \"address_line2\": null,\n \"state\": \"NYC\",\n \"zipcode\": \"10000\",\n \"email\": \"brex@brex.com\",\n \"city\": \"New York\",\n \"legal_name\": null,\n \"legal_number\": null,\n \"document_numbering\": \"per_customer\",\n \"document_number_prefix\": \"ORG-1234\",\n \"net_payment_term\": 30,\n \"tax_identification_number\": \"US123456789\",\n \"timezone\": \"America/New_York\",\n \"email_settings\": [\n \"invoice.finalized\",\n \"credit_note.created\"\n ],\n \"billing_configuration\": {\n \"invoice_footer\": \"This is my customer footer\",\n \"invoice_grace_period\": 3,\n \"document_locale\": \"en\"\n },\n \"finalize_zero_amount_invoice\": false\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/organizations",
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([
'organization' => [
'webhook_url' => 'https://webhook.brex.com',
'country' => 'US',
'default_currency' => 'USD',
'address_line1' => '100 Brex Street',
'address_line2' => null,
'state' => 'NYC',
'zipcode' => '10000',
'email' => 'brex@brex.com',
'city' => 'New York',
'legal_name' => null,
'legal_number' => null,
'document_numbering' => 'per_customer',
'document_number_prefix' => 'ORG-1234',
'net_payment_term' => 30,
'tax_identification_number' => 'US123456789',
'timezone' => 'America/New_York',
'email_settings' => [
'invoice.finalized',
'credit_note.created'
],
'billing_configuration' => [
'invoice_footer' => 'This is my customer footer',
'invoice_grace_period' => 3,
'document_locale' => 'en'
],
'finalize_zero_amount_invoice' => false
]
]),
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/organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"organization\": {\n \"webhook_url\": \"https://webhook.brex.com\",\n \"country\": \"US\",\n \"default_currency\": \"USD\",\n \"address_line1\": \"100 Brex Street\",\n \"address_line2\": null,\n \"state\": \"NYC\",\n \"zipcode\": \"10000\",\n \"email\": \"brex@brex.com\",\n \"city\": \"New York\",\n \"legal_name\": null,\n \"legal_number\": null,\n \"document_numbering\": \"per_customer\",\n \"document_number_prefix\": \"ORG-1234\",\n \"net_payment_term\": 30,\n \"tax_identification_number\": \"US123456789\",\n \"timezone\": \"America/New_York\",\n \"email_settings\": [\n \"invoice.finalized\",\n \"credit_note.created\"\n ],\n \"billing_configuration\": {\n \"invoice_footer\": \"This is my customer footer\",\n \"invoice_grace_period\": 3,\n \"document_locale\": \"en\"\n },\n \"finalize_zero_amount_invoice\": false\n }\n}")
.asString();{
"organization": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Name1",
"created_at": "2022-05-02T13:04:09Z",
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"webhook_url": "https://webhook.brex.com",
"webhook_urls": [
"https://webhook.brex.com",
"https://webhook2.brex.com"
],
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"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"
}
],
"finalize_zero_amount_invoice": false,
"events_store": "clickhouse"
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 422,
"error": "Unprocessable entity",
"code": "validation_errors",
"error_details": {}
}Organizations
Update your organization
This endpoint is used to update your own organization’s settings.
PUT
/
organizations
Update your organization
curl --request PUT \
--url https://core.nozle.app/api/v1/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization": {
"webhook_url": "https://webhook.brex.com",
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"email_settings": [
"invoice.finalized",
"credit_note.created"
],
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"finalize_zero_amount_invoice": false
}
}
'import requests
url = "https://core.nozle.app/api/v1/organizations"
payload = { "organization": {
"webhook_url": "https://webhook.brex.com",
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": None,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": None,
"legal_number": None,
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"email_settings": ["invoice.finalized", "credit_note.created"],
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"finalize_zero_amount_invoice": False
} }
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({
organization: {
webhook_url: 'https://webhook.brex.com',
country: 'US',
default_currency: 'USD',
address_line1: '100 Brex Street',
address_line2: null,
state: 'NYC',
zipcode: '10000',
email: 'brex@brex.com',
city: 'New York',
legal_name: null,
legal_number: null,
document_numbering: 'per_customer',
document_number_prefix: 'ORG-1234',
net_payment_term: 30,
tax_identification_number: 'US123456789',
timezone: 'America/New_York',
email_settings: ['invoice.finalized', 'credit_note.created'],
billing_configuration: {
invoice_footer: 'This is my customer footer',
invoice_grace_period: 3,
document_locale: 'en'
},
finalize_zero_amount_invoice: false
}
})
};
fetch('https://core.nozle.app/api/v1/organizations', 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/organizations"
payload := strings.NewReader("{\n \"organization\": {\n \"webhook_url\": \"https://webhook.brex.com\",\n \"country\": \"US\",\n \"default_currency\": \"USD\",\n \"address_line1\": \"100 Brex Street\",\n \"address_line2\": null,\n \"state\": \"NYC\",\n \"zipcode\": \"10000\",\n \"email\": \"brex@brex.com\",\n \"city\": \"New York\",\n \"legal_name\": null,\n \"legal_number\": null,\n \"document_numbering\": \"per_customer\",\n \"document_number_prefix\": \"ORG-1234\",\n \"net_payment_term\": 30,\n \"tax_identification_number\": \"US123456789\",\n \"timezone\": \"America/New_York\",\n \"email_settings\": [\n \"invoice.finalized\",\n \"credit_note.created\"\n ],\n \"billing_configuration\": {\n \"invoice_footer\": \"This is my customer footer\",\n \"invoice_grace_period\": 3,\n \"document_locale\": \"en\"\n },\n \"finalize_zero_amount_invoice\": false\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/organizations")
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 \"organization\": {\n \"webhook_url\": \"https://webhook.brex.com\",\n \"country\": \"US\",\n \"default_currency\": \"USD\",\n \"address_line1\": \"100 Brex Street\",\n \"address_line2\": null,\n \"state\": \"NYC\",\n \"zipcode\": \"10000\",\n \"email\": \"brex@brex.com\",\n \"city\": \"New York\",\n \"legal_name\": null,\n \"legal_number\": null,\n \"document_numbering\": \"per_customer\",\n \"document_number_prefix\": \"ORG-1234\",\n \"net_payment_term\": 30,\n \"tax_identification_number\": \"US123456789\",\n \"timezone\": \"America/New_York\",\n \"email_settings\": [\n \"invoice.finalized\",\n \"credit_note.created\"\n ],\n \"billing_configuration\": {\n \"invoice_footer\": \"This is my customer footer\",\n \"invoice_grace_period\": 3,\n \"document_locale\": \"en\"\n },\n \"finalize_zero_amount_invoice\": false\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/organizations",
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([
'organization' => [
'webhook_url' => 'https://webhook.brex.com',
'country' => 'US',
'default_currency' => 'USD',
'address_line1' => '100 Brex Street',
'address_line2' => null,
'state' => 'NYC',
'zipcode' => '10000',
'email' => 'brex@brex.com',
'city' => 'New York',
'legal_name' => null,
'legal_number' => null,
'document_numbering' => 'per_customer',
'document_number_prefix' => 'ORG-1234',
'net_payment_term' => 30,
'tax_identification_number' => 'US123456789',
'timezone' => 'America/New_York',
'email_settings' => [
'invoice.finalized',
'credit_note.created'
],
'billing_configuration' => [
'invoice_footer' => 'This is my customer footer',
'invoice_grace_period' => 3,
'document_locale' => 'en'
],
'finalize_zero_amount_invoice' => false
]
]),
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/organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"organization\": {\n \"webhook_url\": \"https://webhook.brex.com\",\n \"country\": \"US\",\n \"default_currency\": \"USD\",\n \"address_line1\": \"100 Brex Street\",\n \"address_line2\": null,\n \"state\": \"NYC\",\n \"zipcode\": \"10000\",\n \"email\": \"brex@brex.com\",\n \"city\": \"New York\",\n \"legal_name\": null,\n \"legal_number\": null,\n \"document_numbering\": \"per_customer\",\n \"document_number_prefix\": \"ORG-1234\",\n \"net_payment_term\": 30,\n \"tax_identification_number\": \"US123456789\",\n \"timezone\": \"America/New_York\",\n \"email_settings\": [\n \"invoice.finalized\",\n \"credit_note.created\"\n ],\n \"billing_configuration\": {\n \"invoice_footer\": \"This is my customer footer\",\n \"invoice_grace_period\": 3,\n \"document_locale\": \"en\"\n },\n \"finalize_zero_amount_invoice\": false\n }\n}")
.asString();{
"organization": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"name": "Name1",
"created_at": "2022-05-02T13:04:09Z",
"document_numbering": "per_customer",
"document_number_prefix": "ORG-1234",
"billing_configuration": {
"invoice_footer": "This is my customer footer",
"invoice_grace_period": 3,
"document_locale": "en"
},
"webhook_url": "https://webhook.brex.com",
"webhook_urls": [
"https://webhook.brex.com",
"https://webhook2.brex.com"
],
"country": "US",
"default_currency": "USD",
"address_line1": "100 Brex Street",
"address_line2": null,
"state": "NYC",
"zipcode": "10000",
"email": "brex@brex.com",
"city": "New York",
"legal_name": null,
"legal_number": null,
"net_payment_term": 30,
"tax_identification_number": "US123456789",
"timezone": "America/New_York",
"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"
}
],
"finalize_zero_amount_invoice": false,
"events_store": "clickhouse"
}
}{
"status": 400,
"error": "Bad request"
}{
"status": 401,
"error": "Unauthorized"
}{
"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.
Body
application/json
Update an existing organization
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes