Skip to main content
PATCH
/
admin
/
clients
/
{id}
Update a client
curl --request PATCH \
  --url https://api.steuerboard.com/v1/admin/clients/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Muster GmbH",
  "type": "legal_person",
  "customId": "ABC123",
  "legalName": "Muster GmbH",
  "address": {
    "line1": "Musterstraße 1",
    "line2": "12345 Musterstadt",
    "city": "Musterstadt",
    "postalCode": "12345",
    "countryCode": "DE"
  }
}
'
import requests

url = "https://api.steuerboard.com/v1/admin/clients/{id}"

payload = {
    "name": "Muster GmbH",
    "type": "legal_person",
    "customId": "ABC123",
    "legalName": "Muster GmbH",
    "address": {
        "line1": "Musterstraße 1",
        "line2": "12345 Musterstadt",
        "city": "Musterstadt",
        "postalCode": "12345",
        "countryCode": "DE"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'Muster GmbH',
    type: 'legal_person',
    customId: 'ABC123',
    legalName: 'Muster GmbH',
    address: {
      line1: 'Musterstraße 1',
      line2: '12345 Musterstadt',
      city: 'Musterstadt',
      postalCode: '12345',
      countryCode: 'DE'
    }
  })
};

fetch('https://api.steuerboard.com/v1/admin/clients/{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://api.steuerboard.com/v1/admin/clients/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'Muster GmbH',
    'type' => 'legal_person',
    'customId' => 'ABC123',
    'legalName' => 'Muster GmbH',
    'address' => [
        'line1' => 'Musterstraße 1',
        'line2' => '12345 Musterstadt',
        'city' => 'Musterstadt',
        'postalCode' => '12345',
        'countryCode' => 'DE'
    ]
  ]),
  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.steuerboard.com/v1/admin/clients/{id}"

	payload := strings.NewReader("{\n  \"name\": \"Muster GmbH\",\n  \"type\": \"legal_person\",\n  \"customId\": \"ABC123\",\n  \"legalName\": \"Muster GmbH\",\n  \"address\": {\n    \"line1\": \"Musterstraße 1\",\n    \"line2\": \"12345 Musterstadt\",\n    \"city\": \"Musterstadt\",\n    \"postalCode\": \"12345\",\n    \"countryCode\": \"DE\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", 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.patch("https://api.steuerboard.com/v1/admin/clients/{id}")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Muster GmbH\",\n  \"type\": \"legal_person\",\n  \"customId\": \"ABC123\",\n  \"legalName\": \"Muster GmbH\",\n  \"address\": {\n    \"line1\": \"Musterstraße 1\",\n    \"line2\": \"12345 Musterstadt\",\n    \"city\": \"Musterstadt\",\n    \"postalCode\": \"12345\",\n    \"countryCode\": \"DE\"\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.steuerboard.com/v1/admin/clients/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Muster GmbH\",\n  \"type\": \"legal_person\",\n  \"customId\": \"ABC123\",\n  \"legalName\": \"Muster GmbH\",\n  \"address\": {\n    \"line1\": \"Musterstraße 1\",\n    \"line2\": \"12345 Musterstadt\",\n    \"city\": \"Musterstadt\",\n    \"postalCode\": \"12345\",\n    \"countryCode\": \"DE\"\n  }\n}"

response = http.request(request)
puts response.read_body
{
  "id": "cmf41ajzv003706un4i99q19z",
  "name": "Muster GmbH",
  "slug": "muster-gmbh",
  "type": "legal_person",
  "customId": "ABC123",
  "legalName": "Muster GmbH",
  "archivedAt": "2021-01-01T00:00:00Z",
  "datevClientId": "ABC123",
  "createdAt": "2021-01-01T00:00:00Z",
  "updatedAt": "2021-01-01T00:00:00Z"
}
{
  "status_code": 401,
  "type": "auth_error",
  "code": "unauthorized",
  "message": "<string>"
}
{
  "type": "auth_error",
  "message": "<string>"
}
{
  "status_code": 404,
  "type": "not_found",
  "code": "not_found",
  "message": "<string>"
}
{
  "success": false,
  "error": {
    "name": "ValidationError",
    "issues": [
      {
        "code": "invalid_type",
        "path": [
          "fieldName"
        ],
        "message": "Expected string, received undefined"
      }
    ]
  }
}
{
  "status_code": 429,
  "type": "rate_limit",
  "code": "too_many_requests",
  "message": "<string>"
}
This response has no body data.
This endpoint only works with the Accountant API key. More information here

Authorizations

Authorization
string
header
required

Bearer token authentication

Path Parameters

id
string<cuid>
required

The ID of the item

Example:

"cmf41ajzv003706un4i99q19z"

Body

application/json

Client update

name
string

The updated name of the client

Example:

"Muster GmbH"

type
enum<string>

The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.

Available options:
natural_person,
individual_enterprise,
legal_person
Example:

"legal_person"

customId
string | null

The client's custom ID can be defined by the accountant

Example:

"ABC123"

The legal name of the client

Example:

"Muster GmbH"

address
object | null

The address of the client

Example:
{
  "line1": "Musterstraße 1",
  "line2": "12345 Musterstadt",
  "city": "Musterstadt",
  "postalCode": "12345",
  "countryCode": "DE"
}

Response

Client updated successfully

id
string<cuid>
required

The ID of the client

Example:

"cmf41ajzv003706un4i99q19z"

name
string
required

The name of the client

Example:

"Muster GmbH"

slug
string
required

The slug of the client

Example:

"muster-gmbh"

type
enum<string>
required

The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.

Available options:
natural_person,
individual_enterprise,
legal_person
Example:

"legal_person"

customId
string | null
required

The client's custom ID can be defined by the accountant

Example:

"ABC123"

The legal name of the client

Example:

"Muster GmbH"

archivedAt
string<date-time> | null
required

The date and time the client was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).

Example:

"2021-01-01T00:00:00Z"

datevClientId
string | null
required

The client's ID in DATEV

Example:

"ABC123"

createdAt
string<date-time>
required

The date and time of the creation for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).

Example:

"2021-01-01T00:00:00Z"

updatedAt
string<date-time>
required

The date and time of the last update for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).

Example:

"2021-01-01T00:00:00Z"