Update the business profile
PATCH
/business
const url = 'https://example.com/business';const options = { method: 'PATCH', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"example","legalStructure":"limited_company","companyNumber":"example","registeredAddress":{"line1":"example","city":"example","postcode":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/business \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "name": "example", "legalStructure": "limited_company", "companyNumber": "example", "registeredAddress": { "line1": "example", "city": "example", "postcode": "example" } }'Renames the business or sets its company particulars. A company number is eight digits, or two letters and six; send null for none. On a plan without vehicles, the first address set also becomes the business’s one yard, where its stock is kept and collections are collected from.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
legalStructure
string | null
companyNumber
string | null
registeredAddress
object
line1
required
string
city
string | null
postcode
required
string
Responses
Section titled “Responses”The profile as it now stands
Media typeapplication/json
object
name
required
string
legalStructure
required
string | null
companyNumber
required
string | null
registeredAddress
required
object
line1
required
string
city
required
string | null
postcode
required
string
Example
{ "name": "Acme Gas", "legalStructure": "limited_company", "companyNumber": "01234567", "registeredAddress": { "line1": "1 Yard Lane", "city": "Kingston upon Thames", "postcode": "KT1 1EU" }}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}