Update the billing details printed on invoices
curl --request PUT \
--url https://api.plugkit.co/v1/billing/details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "The Lucky Hand",
"addressLine1": "61 Grande Rue",
"addressLine2": {},
"postalCode": "78580",
"city": "Jumeauville",
"country": "FR",
"vatNumber": "FR40106294614"
}
'import requests
url = "https://api.plugkit.co/v1/billing/details"
payload = {
"name": "The Lucky Hand",
"addressLine1": "61 Grande Rue",
"addressLine2": {},
"postalCode": "78580",
"city": "Jumeauville",
"country": "FR",
"vatNumber": "FR40106294614"
}
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({
name: 'The Lucky Hand',
addressLine1: '61 Grande Rue',
addressLine2: {},
postalCode: '78580',
city: 'Jumeauville',
country: 'FR',
vatNumber: 'FR40106294614'
})
};
fetch('https://api.plugkit.co/v1/billing/details', 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.plugkit.co/v1/billing/details",
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([
'name' => 'The Lucky Hand',
'addressLine1' => '61 Grande Rue',
'addressLine2' => [
],
'postalCode' => '78580',
'city' => 'Jumeauville',
'country' => 'FR',
'vatNumber' => 'FR40106294614'
]),
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.plugkit.co/v1/billing/details"
payload := strings.NewReader("{\n \"name\": \"The Lucky Hand\",\n \"addressLine1\": \"61 Grande Rue\",\n \"addressLine2\": {},\n \"postalCode\": \"78580\",\n \"city\": \"Jumeauville\",\n \"country\": \"FR\",\n \"vatNumber\": \"FR40106294614\"\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.plugkit.co/v1/billing/details")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"The Lucky Hand\",\n \"addressLine1\": \"61 Grande Rue\",\n \"addressLine2\": {},\n \"postalCode\": \"78580\",\n \"city\": \"Jumeauville\",\n \"country\": \"FR\",\n \"vatNumber\": \"FR40106294614\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plugkit.co/v1/billing/details")
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 \"name\": \"The Lucky Hand\",\n \"addressLine1\": \"61 Grande Rue\",\n \"addressLine2\": {},\n \"postalCode\": \"78580\",\n \"city\": \"Jumeauville\",\n \"country\": \"FR\",\n \"vatNumber\": \"FR40106294614\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "2 validation errors on the request.",
"type": "invalid_request_error",
"code": "validation_failed",
"details": {
"fields": [
"content should not be empty",
"accountIds must be an array"
]
}
}{
"error": "Invalid API key.",
"type": "authentication_error",
"code": "unauthorized"
}{
"error": "Rate limit exceeded: 60 write requests per minute. Retry in 12s.",
"type": "rate_limit_error",
"code": "rate_limited",
"details": {
"limit": 60,
"bucket": "write",
"retryAfter": 12
}
}billing
Update the billing details printed on invoices
PUT
/
v1
/
billing
/
details
Update the billing details printed on invoices
curl --request PUT \
--url https://api.plugkit.co/v1/billing/details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "The Lucky Hand",
"addressLine1": "61 Grande Rue",
"addressLine2": {},
"postalCode": "78580",
"city": "Jumeauville",
"country": "FR",
"vatNumber": "FR40106294614"
}
'import requests
url = "https://api.plugkit.co/v1/billing/details"
payload = {
"name": "The Lucky Hand",
"addressLine1": "61 Grande Rue",
"addressLine2": {},
"postalCode": "78580",
"city": "Jumeauville",
"country": "FR",
"vatNumber": "FR40106294614"
}
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({
name: 'The Lucky Hand',
addressLine1: '61 Grande Rue',
addressLine2: {},
postalCode: '78580',
city: 'Jumeauville',
country: 'FR',
vatNumber: 'FR40106294614'
})
};
fetch('https://api.plugkit.co/v1/billing/details', 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.plugkit.co/v1/billing/details",
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([
'name' => 'The Lucky Hand',
'addressLine1' => '61 Grande Rue',
'addressLine2' => [
],
'postalCode' => '78580',
'city' => 'Jumeauville',
'country' => 'FR',
'vatNumber' => 'FR40106294614'
]),
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.plugkit.co/v1/billing/details"
payload := strings.NewReader("{\n \"name\": \"The Lucky Hand\",\n \"addressLine1\": \"61 Grande Rue\",\n \"addressLine2\": {},\n \"postalCode\": \"78580\",\n \"city\": \"Jumeauville\",\n \"country\": \"FR\",\n \"vatNumber\": \"FR40106294614\"\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.plugkit.co/v1/billing/details")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"The Lucky Hand\",\n \"addressLine1\": \"61 Grande Rue\",\n \"addressLine2\": {},\n \"postalCode\": \"78580\",\n \"city\": \"Jumeauville\",\n \"country\": \"FR\",\n \"vatNumber\": \"FR40106294614\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plugkit.co/v1/billing/details")
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 \"name\": \"The Lucky Hand\",\n \"addressLine1\": \"61 Grande Rue\",\n \"addressLine2\": {},\n \"postalCode\": \"78580\",\n \"city\": \"Jumeauville\",\n \"country\": \"FR\",\n \"vatNumber\": \"FR40106294614\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "2 validation errors on the request.",
"type": "invalid_request_error",
"code": "validation_failed",
"details": {
"fields": [
"content should not be empty",
"accountIds must be an array"
]
}
}{
"error": "Invalid API key.",
"type": "authentication_error",
"code": "unauthorized"
}{
"error": "Rate limit exceeded: 60 write requests per minute. Retry in 12s.",
"type": "rate_limit_error",
"code": "rate_limited",
"details": {
"limit": 60,
"bucket": "write",
"retryAfter": 12
}
}Authorizations
Body
application/json
Response
Success
Dashboard billing view; shape may evolve.