Update a business account
curl --request PATCH \
--url https://b.anny.co/api/v1/business-accounts/{business_account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "business-accounts",
"id": "9f88f71c-1d03-4ef9-89c8-123456789abc",
"attributes": {
"name": "Acme GmbH",
"brand_name": "Acme",
"domain": "acme.com",
"vat_id": "DE123456789",
"billing_email": "billing@acme.com"
},
"relationships": {
"primary_address": {
"data": {
"type": "addresses",
"id": "191"
}
}
}
}
}
'import requests
url = "https://b.anny.co/api/v1/business-accounts/{business_account_id}"
payload = { "data": {
"type": "business-accounts",
"id": "9f88f71c-1d03-4ef9-89c8-123456789abc",
"attributes": {
"name": "Acme GmbH",
"brand_name": "Acme",
"domain": "acme.com",
"vat_id": "DE123456789",
"billing_email": "billing@acme.com"
},
"relationships": { "primary_address": { "data": {
"type": "addresses",
"id": "191"
} } }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'business-accounts',
id: '9f88f71c-1d03-4ef9-89c8-123456789abc',
attributes: {
name: 'Acme GmbH',
brand_name: 'Acme',
domain: 'acme.com',
vat_id: 'DE123456789',
billing_email: 'billing@acme.com'
},
relationships: {primary_address: {data: {type: 'addresses', id: '191'}}}
}
})
};
fetch('https://b.anny.co/api/v1/business-accounts/{business_account_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://b.anny.co/api/v1/business-accounts/{business_account_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([
'data' => [
'type' => 'business-accounts',
'id' => '9f88f71c-1d03-4ef9-89c8-123456789abc',
'attributes' => [
'name' => 'Acme GmbH',
'brand_name' => 'Acme',
'domain' => 'acme.com',
'vat_id' => 'DE123456789',
'billing_email' => 'billing@acme.com'
],
'relationships' => [
'primary_address' => [
'data' => [
'type' => 'addresses',
'id' => '191'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/business-accounts/{business_account_id}"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"business-accounts\",\n \"id\": \"9f88f71c-1d03-4ef9-89c8-123456789abc\",\n \"attributes\": {\n \"name\": \"Acme GmbH\",\n \"brand_name\": \"Acme\",\n \"domain\": \"acme.com\",\n \"vat_id\": \"DE123456789\",\n \"billing_email\": \"billing@acme.com\"\n },\n \"relationships\": {\n \"primary_address\": {\n \"data\": {\n \"type\": \"addresses\",\n \"id\": \"191\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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://b.anny.co/api/v1/business-accounts/{business_account_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"business-accounts\",\n \"id\": \"9f88f71c-1d03-4ef9-89c8-123456789abc\",\n \"attributes\": {\n \"name\": \"Acme GmbH\",\n \"brand_name\": \"Acme\",\n \"domain\": \"acme.com\",\n \"vat_id\": \"DE123456789\",\n \"billing_email\": \"billing@acme.com\"\n },\n \"relationships\": {\n \"primary_address\": {\n \"data\": {\n \"type\": \"addresses\",\n \"id\": \"191\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/business-accounts/{business_account_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/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"business-accounts\",\n \"id\": \"9f88f71c-1d03-4ef9-89c8-123456789abc\",\n \"attributes\": {\n \"name\": \"Acme GmbH\",\n \"brand_name\": \"Acme\",\n \"domain\": \"acme.com\",\n \"vat_id\": \"DE123456789\",\n \"billing_email\": \"billing@acme.com\"\n },\n \"relationships\": {\n \"primary_address\": {\n \"data\": {\n \"type\": \"addresses\",\n \"id\": \"191\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "business-accounts",
"attributes": {
"name": "<string>",
"brand_name": "<string>",
"domain": "<string>",
"vat_id": "<string>",
"billing_email": "<string>",
"allow_subdomains": true,
"domain_auto_join": true,
"created_at": "<string>",
"updated_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"logo_image": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"primary_address": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"business_account_members": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
}
},
"meta": {
"membership": {
"id": "<string>",
"role": "owner",
"status": "active",
"source": "<string>",
"created_at": "<string>"
},
"can_request_join": true,
"can_accept_invite": true,
"can_reject_invite": true,
"member_count": 123,
"pending_member_count": 123
}
}
}Account
Update a business account
Update editable business-account attributes and relationships such as primary_address or logo_image. Only active owners/admins may update.
PATCH
/
api
/
v1
/
business-accounts
/
{business_account_id}
Update a business account
curl --request PATCH \
--url https://b.anny.co/api/v1/business-accounts/{business_account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "business-accounts",
"id": "9f88f71c-1d03-4ef9-89c8-123456789abc",
"attributes": {
"name": "Acme GmbH",
"brand_name": "Acme",
"domain": "acme.com",
"vat_id": "DE123456789",
"billing_email": "billing@acme.com"
},
"relationships": {
"primary_address": {
"data": {
"type": "addresses",
"id": "191"
}
}
}
}
}
'import requests
url = "https://b.anny.co/api/v1/business-accounts/{business_account_id}"
payload = { "data": {
"type": "business-accounts",
"id": "9f88f71c-1d03-4ef9-89c8-123456789abc",
"attributes": {
"name": "Acme GmbH",
"brand_name": "Acme",
"domain": "acme.com",
"vat_id": "DE123456789",
"billing_email": "billing@acme.com"
},
"relationships": { "primary_address": { "data": {
"type": "addresses",
"id": "191"
} } }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: 'business-accounts',
id: '9f88f71c-1d03-4ef9-89c8-123456789abc',
attributes: {
name: 'Acme GmbH',
brand_name: 'Acme',
domain: 'acme.com',
vat_id: 'DE123456789',
billing_email: 'billing@acme.com'
},
relationships: {primary_address: {data: {type: 'addresses', id: '191'}}}
}
})
};
fetch('https://b.anny.co/api/v1/business-accounts/{business_account_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://b.anny.co/api/v1/business-accounts/{business_account_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([
'data' => [
'type' => 'business-accounts',
'id' => '9f88f71c-1d03-4ef9-89c8-123456789abc',
'attributes' => [
'name' => 'Acme GmbH',
'brand_name' => 'Acme',
'domain' => 'acme.com',
'vat_id' => 'DE123456789',
'billing_email' => 'billing@acme.com'
],
'relationships' => [
'primary_address' => [
'data' => [
'type' => 'addresses',
'id' => '191'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/business-accounts/{business_account_id}"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"business-accounts\",\n \"id\": \"9f88f71c-1d03-4ef9-89c8-123456789abc\",\n \"attributes\": {\n \"name\": \"Acme GmbH\",\n \"brand_name\": \"Acme\",\n \"domain\": \"acme.com\",\n \"vat_id\": \"DE123456789\",\n \"billing_email\": \"billing@acme.com\"\n },\n \"relationships\": {\n \"primary_address\": {\n \"data\": {\n \"type\": \"addresses\",\n \"id\": \"191\"\n }\n }\n }\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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://b.anny.co/api/v1/business-accounts/{business_account_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"business-accounts\",\n \"id\": \"9f88f71c-1d03-4ef9-89c8-123456789abc\",\n \"attributes\": {\n \"name\": \"Acme GmbH\",\n \"brand_name\": \"Acme\",\n \"domain\": \"acme.com\",\n \"vat_id\": \"DE123456789\",\n \"billing_email\": \"billing@acme.com\"\n },\n \"relationships\": {\n \"primary_address\": {\n \"data\": {\n \"type\": \"addresses\",\n \"id\": \"191\"\n }\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/business-accounts/{business_account_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/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"business-accounts\",\n \"id\": \"9f88f71c-1d03-4ef9-89c8-123456789abc\",\n \"attributes\": {\n \"name\": \"Acme GmbH\",\n \"brand_name\": \"Acme\",\n \"domain\": \"acme.com\",\n \"vat_id\": \"DE123456789\",\n \"billing_email\": \"billing@acme.com\"\n },\n \"relationships\": {\n \"primary_address\": {\n \"data\": {\n \"type\": \"addresses\",\n \"id\": \"191\"\n }\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "business-accounts",
"attributes": {
"name": "<string>",
"brand_name": "<string>",
"domain": "<string>",
"vat_id": "<string>",
"billing_email": "<string>",
"allow_subdomains": true,
"domain_auto_join": true,
"created_at": "<string>",
"updated_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"logo_image": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"primary_address": {
"data": {
"type": "<string>",
"id": "<string>"
}
},
"business_account_members": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
]
}
},
"meta": {
"membership": {
"id": "<string>",
"role": "owner",
"status": "active",
"source": "<string>",
"created_at": "<string>"
},
"can_request_join": true,
"can_accept_invite": true,
"can_reject_invite": true,
"member_count": 123,
"pending_member_count": 123
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
Business account UUID
Body
application/vnd.api+json
A customer self-service business account with membership-aware visibility.
Show child attributes
Show child attributes
Antwort
200 - application/vnd.api+json
Updated business account
A customer self-service business account with membership-aware visibility.
Show child attributes
Show child attributes
⌘I