Update the company
- Production and sandbox. The token decides the environment.
https://api.beautyrouter.com/v1/company
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Put, RequestUri = new Uri("https://api.beautyrouter.com/v1/company"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"businessType\": \"salon\", \"displayName\": \"Golden Hour Hair Studio\", \"legalName\": \"Golden Hour Salon LLC\", \"ein\": \"847102938\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.beautyrouter.com/v1/company"
payload := strings.NewReader("{ \"businessType\": \"salon\", \"displayName\": \"Golden Hour Hair Studio\", \"legalName\": \"Golden Hour Salon LLC\", \"ein\": \"847102938\" }")
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(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"businessType\": \"salon\", \"displayName\": \"Golden Hour Hair Studio\", \"legalName\": \"Golden Hour Salon LLC\", \"ein\": \"847102938\" }");Request request = new Request.Builder() .url("https://api.beautyrouter.com/v1/company") .put(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'PUT', url: 'https://api.beautyrouter.com/v1/company', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, data: { businessType: 'salon', displayName: 'Golden Hour Hair Studio', legalName: 'Golden Hour Salon LLC', ein: '847102938' }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.beautyrouter.com/v1/company';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"businessType":"salon","displayName":"Golden Hour Hair Studio","legalName":"Golden Hour Salon LLC","ein":"847102938"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"businessType\": \"salon\", \"displayName\": \"Golden Hour Hair Studio\", \"legalName\": \"Golden Hour Salon LLC\", \"ein\": \"847102938\" }")val request = Request.Builder() .url("https://api.beautyrouter.com/v1/company") .put(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://api.beautyrouter.com/v1/company', [ 'body' => '{ "businessType": "salon", "displayName": "Golden Hour Hair Studio", "legalName": "Golden Hour Salon LLC", "ein": "847102938" }', 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json', ],]);
echo $response->getBody();import requests
url = "https://api.beautyrouter.com/v1/company"
payload = { "businessType": "salon", "displayName": "Golden Hour Hair Studio", "legalName": "Golden Hour Salon LLC", "ein": "847102938"}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())require 'uri'require 'net/http'
url = URI("https://api.beautyrouter.com/v1/company")
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 = "{ \"businessType\": \"salon\", \"displayName\": \"Golden Hour Hair Studio\", \"legalName\": \"Golden Hour Salon LLC\", \"ein\": \"847102938\" }"
response = http.request(request)puts response.read_bodycurl --request PUT \ --url https://api.beautyrouter.com/v1/company \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "businessType": "salon", "displayName": "Golden Hour Hair Studio", "legalName": "Golden Hour Salon LLC", "ein": "847102938" }'import Foundation
let headers = [ "Authorization": "Bearer <token>", "Content-Type": "application/json"]let parameters = [ "businessType": "salon", "displayName": "Golden Hour Hair Studio", "legalName": "Golden Hour Salon LLC", "ein": "847102938"] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.beautyrouter.com/v1/company")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.httpMethod = "PUT"request.allHTTPHeaderFields = headersrequest.httpBody = postData as Data
let session = URLSession.sharedlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) }})
dataTask.resume()This endpoint accepts a partial update. Send only the fields you change, and fields you leave out stay as they are.
A company can change its delivery address at any time, in any status. It needs a license in that state only to
order: without one, the order fails with address_state_without_license in its problems. The address still saves, and the response
has warnings. A warning comes only with the call that saved that address.
For an unverified or declined company, a change saves and shows directly in GET /v1/company.
When an in_review, prequalified, or verified company changes legalName, ein, displayName, or
businessType, the change goes to review. The status stays the same, and the new values show in pendingChanges
until the review ends.
A prequalified company’s license counts as soon as it is uploaded. A verified company’s license must be reviewed
before an order can go to that state, and uploading the license creates the review task.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Send only the fields you change.
object
salon for a salon or spa, professional for an individual licensed professional, store for a beauty supply
store. Beauty Router does not support stores yet, so verification for a store always fails.
The name the company goes by.
The registered legal name. Not used for professional.
The Employer Identification Number, 9 digits. Not used for professional.
object
Street address.
Suite, unit, or floor.
A two-letter US state code.
ZIP code.
Phone number for the delivery. Required on the company. Optional on an order, which then uses the company’s phone.
Examples
{ "businessType": "salon", "displayName": "Golden Hour Hair Studio", "legalName": "Golden Hour Salon LLC", "ein": "847102938"}{ "deliveryAddress": { "line1": "1450 Larimer St", "line2": "Suite 200", "city": "Denver", "state": "CO", "postalCode": "80202", "country": "US", "phone": "+13035550142" }}Responses
Section titled “Responses”The updated company.
object
The company ID.
The name the company goes by.
The registered legal name. Not used for professional.
The Employer Identification Number, 9 digits. Not used for professional.
object
Street address.
Suite, unit, or floor.
A two-letter US state code.
ZIP code.
Phone number for the delivery. Required on the company. Optional on an order, which then uses the company’s phone.
unverified: not submitted yet. in_review: Beauty Router is reviewing the company. prequalified: the initial
check passed, and the detailed verification is still pending. The company can order, its orders wait until that
verification ends, and no charge happens until then. verified: the company passed the review.
declined: the company did not pass the review.
true when Beauty Router suspended the company’s buying. The company can still read its data and manage its
orders, but it cannot place a new order.
New values of an in_review, prequalified, or verified company that wait for review. null when no change
waits for review.
object
salon for a salon or spa, professional for an individual licensed professional, store for a beauty supply
store. Beauty Router does not support stores yet, so verification for a store always fails.
address_state_without_license: the address saved, but the company has no license in that state, so an order
to it fails. Only on the call that saved that address.
Examples
{ "id": "loc-7Hk2pQx9Lm", "businessType": "salon", "displayName": "Golden Hour Hair Studio", "legalName": "Golden Hour Salon LLC", "ein": "847102938", "deliveryAddress": { "line1": "1450 Larimer St", "line2": "Suite 200", "city": "Denver", "state": "CO", "postalCode": "80202", "country": "US", "phone": "+13035550142" }, "verificationStatus": "verified", "buyingSuspended": false, "pendingChanges": null}{ "id": "loc-7Hk2pQx9Lm", "businessType": "salon", "displayName": "Golden Hour Hair Studio", "legalName": "Golden Hour Salon LLC", "ein": "847102938", "deliveryAddress": { "line1": "1712 Pioneer Ave", "city": "Cheyenne", "state": "WY", "postalCode": "82001", "country": "US", "phone": "+13075550142" }, "verificationStatus": "verified", "buyingSuspended": false, "pendingChanges": null, "warnings": [ "address_state_without_license" ]}validation_failed: a field is missing or has a wrong value. field names it.
The body of every error response.
object
object
A stable error code.
A sentence for developers. It can change, so do not match on it.
The request field that caused the error. Only some errors have it.
Only on verification_data_missing and app_setup_incomplete. What still needs to be set.
Only on order_total_changed and order_has_problems. A fresh quote.
object
One group per supplier. Each group becomes one order.
object
object
An amount in dollars, with up to two decimal places.
The discount on the whole line, in US dollars.
An amount in dollars, with up to two decimal places.
The total of the lines, in US dollars.
The discount on the whole order, in US dollars.
object
The shipping charge in US dollars, or null when it cannot be worked out.
How much more to order for free shipping, or null when it does not apply.
The sales tax in US dollars, or null when it cannot be worked out.
object
The exemption certificate used, or null.
Why no certificate applies, or null when one does.
The amount the salon pays for this group in US dollars, or null when it cannot be worked out. Send it back as
expectedTotal. A group with problems has no expectedTotal.
now: Beauty Router charges the card when the order is created. after_verification: the company is
prequalified, so the charge waits until its verification ends.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The lines no supplier can take.
object
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
What stops every group.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The sum of all the groups in US dollars, or null when a group’s total is.
Always usd.
Examples
{ "error": { "code": "validation_failed", "message": "ein must have 9 digits.", "field": "ein" }}invalid_user_token: the user token is missing or wrong. user_token_expired: the user token expired. Log the
user in again with POST /v1/login.
The body of every error response.
object
object
A stable error code.
A sentence for developers. It can change, so do not match on it.
The request field that caused the error. Only some errors have it.
Only on verification_data_missing and app_setup_incomplete. What still needs to be set.
Only on order_total_changed and order_has_problems. A fresh quote.
object
One group per supplier. Each group becomes one order.
object
object
An amount in dollars, with up to two decimal places.
The discount on the whole line, in US dollars.
An amount in dollars, with up to two decimal places.
The total of the lines, in US dollars.
The discount on the whole order, in US dollars.
object
The shipping charge in US dollars, or null when it cannot be worked out.
How much more to order for free shipping, or null when it does not apply.
The sales tax in US dollars, or null when it cannot be worked out.
object
The exemption certificate used, or null.
Why no certificate applies, or null when one does.
The amount the salon pays for this group in US dollars, or null when it cannot be worked out. Send it back as
expectedTotal. A group with problems has no expectedTotal.
now: Beauty Router charges the card when the order is created. after_verification: the company is
prequalified, so the charge waits until its verification ends.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The lines no supplier can take.
object
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
What stops every group.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The sum of all the groups in US dollars, or null when a group’s total is.
Always usd.
Examples
{ "error": { "code": "invalid_user_token", "message": "The user token is missing or not valid." }}{ "error": { "code": "user_token_expired", "message": "The user token expired. Log the user in again." }}user_cannot_manage_company: the user was logged in with canManageCompany: false.
The body of every error response.
object
object
A stable error code.
A sentence for developers. It can change, so do not match on it.
The request field that caused the error. Only some errors have it.
Only on verification_data_missing and app_setup_incomplete. What still needs to be set.
Only on order_total_changed and order_has_problems. A fresh quote.
object
One group per supplier. Each group becomes one order.
object
object
An amount in dollars, with up to two decimal places.
The discount on the whole line, in US dollars.
An amount in dollars, with up to two decimal places.
The total of the lines, in US dollars.
The discount on the whole order, in US dollars.
object
The shipping charge in US dollars, or null when it cannot be worked out.
How much more to order for free shipping, or null when it does not apply.
The sales tax in US dollars, or null when it cannot be worked out.
object
The exemption certificate used, or null.
Why no certificate applies, or null when one does.
The amount the salon pays for this group in US dollars, or null when it cannot be worked out. Send it back as
expectedTotal. A group with problems has no expectedTotal.
now: Beauty Router charges the card when the order is created. after_verification: the company is
prequalified, so the charge waits until its verification ends.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The lines no supplier can take.
object
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
What stops every group.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The sum of all the groups in US dollars, or null when a group’s total is.
Always usd.
Examples
{ "error": { "code": "user_cannot_manage_company", "message": "This user cannot change company settings." }}internal_error: something failed on Beauty Router’s side. Try again later.
The body of every error response.
object
object
A stable error code.
A sentence for developers. It can change, so do not match on it.
The request field that caused the error. Only some errors have it.
Only on verification_data_missing and app_setup_incomplete. What still needs to be set.
Only on order_total_changed and order_has_problems. A fresh quote.
object
One group per supplier. Each group becomes one order.
object
object
An amount in dollars, with up to two decimal places.
The discount on the whole line, in US dollars.
An amount in dollars, with up to two decimal places.
The total of the lines, in US dollars.
The discount on the whole order, in US dollars.
object
The shipping charge in US dollars, or null when it cannot be worked out.
How much more to order for free shipping, or null when it does not apply.
The sales tax in US dollars, or null when it cannot be worked out.
object
The exemption certificate used, or null.
Why no certificate applies, or null when one does.
The amount the salon pays for this group in US dollars, or null when it cannot be worked out. Send it back as
expectedTotal. A group with problems has no expectedTotal.
now: Beauty Router charges the card when the order is created. after_verification: the company is
prequalified, so the charge waits until its verification ends.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The lines no supplier can take.
object
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
What stops every group.
object
What stops a group or the whole request. See Problems.
A sentence you can show. It can change, so do not match on it.
The product. Only on problems with one product.
The supplier. Only on problems with one supplier.
How many units can be ordered. Only on insufficient_stock.
The sum of all the groups in US dollars, or null when a group’s total is.
Always usd.
Examples
{ "error": { "code": "internal_error", "message": "Something went wrong. Try again later." }}