Update Creditor
curl --request PUT \
--url https://getbill.io/external-api/v1/creditors/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"postalCode": "<string>",
"country": "<string>",
"registrationNumber": "<string>",
"taxNumber": "<string>",
"contactPerson": "<string>"
}
'import requests
url = "https://getbill.io/external-api/v1/creditors/{id}"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"postalCode": "<string>",
"country": "<string>",
"registrationNumber": "<string>",
"taxNumber": "<string>",
"contactPerson": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
address: '<string>',
city: '<string>',
postalCode: '<string>',
country: '<string>',
registrationNumber: '<string>',
taxNumber: '<string>',
contactPerson: '<string>'
})
};
fetch('https://getbill.io/external-api/v1/creditors/{id}', 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://getbill.io/external-api/v1/creditors/{id}",
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' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'address' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'country' => '<string>',
'registrationNumber' => '<string>',
'taxNumber' => '<string>',
'contactPerson' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://getbill.io/external-api/v1/creditors/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"contactPerson\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://getbill.io/external-api/v1/creditors/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"contactPerson\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/creditors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"contactPerson\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": false,
"message": "Creditor updated successfully",
"data": {
"id": "abc123def456",
"name": "Acme Corporation Updated",
"email": "newbilling@acmecorp.com",
"phone": "+33142123456",
"address": "123 Business Street",
"city": "Paris",
"postalCode": "75001",
"country": "France",
"registrationNumber": "B123456789",
"taxNumber": "FR12345678901",
"contactPerson": "Jane Doe",
"createdAt": "2024-01-15 10:30:00",
"updatedAt": "2024-02-01 15:45:00"
}
}
Creditors API
Update Creditor
Update information for a specific creditor
PUT
/
external-api
/
v1
/
creditors
/
{id}
Update Creditor
curl --request PUT \
--url https://getbill.io/external-api/v1/creditors/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"postalCode": "<string>",
"country": "<string>",
"registrationNumber": "<string>",
"taxNumber": "<string>",
"contactPerson": "<string>"
}
'import requests
url = "https://getbill.io/external-api/v1/creditors/{id}"
payload = {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>",
"city": "<string>",
"postalCode": "<string>",
"country": "<string>",
"registrationNumber": "<string>",
"taxNumber": "<string>",
"contactPerson": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
phone: '<string>',
address: '<string>',
city: '<string>',
postalCode: '<string>',
country: '<string>',
registrationNumber: '<string>',
taxNumber: '<string>',
contactPerson: '<string>'
})
};
fetch('https://getbill.io/external-api/v1/creditors/{id}', 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://getbill.io/external-api/v1/creditors/{id}",
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' => '<string>',
'email' => '<string>',
'phone' => '<string>',
'address' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'country' => '<string>',
'registrationNumber' => '<string>',
'taxNumber' => '<string>',
'contactPerson' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://getbill.io/external-api/v1/creditors/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"contactPerson\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://getbill.io/external-api/v1/creditors/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"contactPerson\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://getbill.io/external-api/v1/creditors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"registrationNumber\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"contactPerson\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": false,
"message": "Creditor updated successfully",
"data": {
"id": "abc123def456",
"name": "Acme Corporation Updated",
"email": "newbilling@acmecorp.com",
"phone": "+33142123456",
"address": "123 Business Street",
"city": "Paris",
"postalCode": "75001",
"country": "France",
"registrationNumber": "B123456789",
"taxNumber": "FR12345678901",
"contactPerson": "Jane Doe",
"createdAt": "2024-01-15 10:30:00",
"updatedAt": "2024-02-01 15:45:00"
}
}
Overview
This endpoint allows you to update creditor information. You can use either PUT (full update) or PATCH (partial update) methods.Authentication
Requires a valid OAuth 2.0 access token with thecreditors:write scope.
Request
string
required
Bearer token for authentication
Path Parameters
string
required
The encrypted creditor ID
Request Body
All fields are optional. Only include the fields you want to update.string
Creditor’s name
string
Creditor’s email address
string
Creditor’s phone number
string
Creditor’s address
string
Creditor’s city
string
Creditor’s postal code
string
Creditor’s country
string
Creditor’s company registration number
string
Creditor’s tax number
string
Main contact person for the creditor
Example Request
curl -X PUT "/external-api/v1/creditors/abc123def456" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation Updated",
"email": "newbilling@acmecorp.com",
"contactPerson": "Jane Doe"
}'
const creditorId = 'abc123def456';
const updateData = {
name: 'Acme Corporation Updated',
email: 'newbilling@acmecorp.com',
contactPerson: 'Jane Doe'
};
const response = await fetch(`/external-api/v1/creditors/${creditorId}`, {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify(updateData)
});
const updatedCreditor = await response.json();
import requests
import json
creditor_id = 'abc123def456'
update_data = {
'name': 'Acme Corporation Updated',
'email': 'newbilling@acmecorp.com',
'contactPerson': 'Jane Doe'
}
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
response = requests.put(
f'/external-api/v1/creditors/{creditor_id}',
headers=headers,
data=json.dumps(update_data)
)
updated_creditor = response.json()
Response
boolean
Always
false for successful requestsstring
Success message (e.g., “Creditor updated successfully”)
object
The updated creditor object
Show creditor object
Show creditor object
string
Encrypted creditor identifier
string
Creditor’s name
string
Creditor’s email address
string
Creditor’s phone number
string
Creditor’s address
string
Creditor’s city
string
Creditor’s postal code
string
Creditor’s country
string
Creditor’s company registration number
string
Creditor’s tax number
string
Main contact person for the creditor
string
Creation timestamp (YYYY-MM-DD HH:mm:ss format)
string
Last update timestamp (YYYY-MM-DD HH:mm:ss format)
Success Response
{
"error": false,
"message": "Creditor updated successfully",
"data": {
"id": "abc123def456",
"name": "Acme Corporation Updated",
"email": "newbilling@acmecorp.com",
"phone": "+33142123456",
"address": "123 Business Street",
"city": "Paris",
"postalCode": "75001",
"country": "France",
"registrationNumber": "B123456789",
"taxNumber": "FR12345678901",
"contactPerson": "Jane Doe",
"createdAt": "2024-01-15 10:30:00",
"updatedAt": "2024-02-01 15:45:00"
}
}
Error Responses
{
"error": true,
"message": "Validation failed",
"code": 400,
"errors": [
{
"property": "email",
"message": "This value is not a valid email address."
}
]
}
{
"error": true,
"message": "Authentication credentials are missing or invalid",
"code": 401
}
{
"error": true,
"message": "Required scope \"creditors:write\" not found in token",
"code": 403
}
{
"error": true,
"message": "Creditor not found",
"code": 404
}
Rate Limiting
This endpoint is subject to rate limiting. See the Rate Limits documentation for details. Rate Limit: 1,000 requests per hourRelated Endpoints
- Get Creditor - Get creditor information
- List Creditors - Get a list of all creditors
- List Debts by Creditor - Get all debts for this creditor