Place orders
- Production and sandbox. The token decides the environment.
https://api.beautyrouter.com/v1/orders/batch
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.beautyrouter.com/v1/orders/batch"), Headers = { { "Idempotency-Key", "4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90" }, { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"orders\": [ { \"supplierId\": \"sup-1Ry6tUi3Op\", \"lines\": [ { \"productId\": \"prod-4Fz9QbX2kL\", \"quantity\": 6 }, { \"productId\": \"prod-6Gh2jKl8Zx\", \"quantity\": 4 } ], \"expectedTotal\": 275.01 } ], \"paymentCardId\": \"card-6Mn3bVc8Xz\" }") { 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/orders/batch"
payload := strings.NewReader("{ \"orders\": [ { \"supplierId\": \"sup-1Ry6tUi3Op\", \"lines\": [ { \"productId\": \"prod-4Fz9QbX2kL\", \"quantity\": 6 }, { \"productId\": \"prod-6Gh2jKl8Zx\", \"quantity\": 4 } ], \"expectedTotal\": 275.01 } ], \"paymentCardId\": \"card-6Mn3bVc8Xz\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90") 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, "{ \"orders\": [ { \"supplierId\": \"sup-1Ry6tUi3Op\", \"lines\": [ { \"productId\": \"prod-4Fz9QbX2kL\", \"quantity\": 6 }, { \"productId\": \"prod-6Gh2jKl8Zx\", \"quantity\": 4 } ], \"expectedTotal\": 275.01 } ], \"paymentCardId\": \"card-6Mn3bVc8Xz\" }");Request request = new Request.Builder() .url("https://api.beautyrouter.com/v1/orders/batch") .post(body) .addHeader("Idempotency-Key", "4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api.beautyrouter.com/v1/orders/batch', headers: { 'Idempotency-Key': '4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, data: { orders: [ { supplierId: 'sup-1Ry6tUi3Op', lines: [ {productId: 'prod-4Fz9QbX2kL', quantity: 6}, {productId: 'prod-6Gh2jKl8Zx', quantity: 4} ], expectedTotal: 275.01 } ], paymentCardId: 'card-6Mn3bVc8Xz' }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.beautyrouter.com/v1/orders/batch';const options = { method: 'POST', headers: { 'Idempotency-Key': '4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"orders":[{"supplierId":"sup-1Ry6tUi3Op","lines":[{"productId":"prod-4Fz9QbX2kL","quantity":6},{"productId":"prod-6Gh2jKl8Zx","quantity":4}],"expectedTotal":275.01}],"paymentCardId":"card-6Mn3bVc8Xz"}'};
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, "{ \"orders\": [ { \"supplierId\": \"sup-1Ry6tUi3Op\", \"lines\": [ { \"productId\": \"prod-4Fz9QbX2kL\", \"quantity\": 6 }, { \"productId\": \"prod-6Gh2jKl8Zx\", \"quantity\": 4 } ], \"expectedTotal\": 275.01 } ], \"paymentCardId\": \"card-6Mn3bVc8Xz\" }")val request = Request.Builder() .url("https://api.beautyrouter.com/v1/orders/batch") .post(body) .addHeader("Idempotency-Key", "4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.beautyrouter.com/v1/orders/batch', [ 'body' => '{ "orders": [ { "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6 }, { "productId": "prod-6Gh2jKl8Zx", "quantity": 4 } ], "expectedTotal": 275.01 } ], "paymentCardId": "card-6Mn3bVc8Xz" }', 'headers' => [ 'Authorization' => 'Bearer <token>', 'Content-Type' => 'application/json', 'Idempotency-Key' => '4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90', ],]);
echo $response->getBody();import requests
url = "https://api.beautyrouter.com/v1/orders/batch"
payload = { "orders": [ { "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6 }, { "productId": "prod-6Gh2jKl8Zx", "quantity": 4 } ], "expectedTotal": 275.01 } ], "paymentCardId": "card-6Mn3bVc8Xz"}headers = { "Idempotency-Key": "4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90", "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())require 'uri'require 'net/http'
url = URI("https://api.beautyrouter.com/v1/orders/batch")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = true
request = Net::HTTP::Post.new(url)request["Idempotency-Key"] = '4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90'request["Authorization"] = 'Bearer <token>'request["Content-Type"] = 'application/json'request.body = "{ \"orders\": [ { \"supplierId\": \"sup-1Ry6tUi3Op\", \"lines\": [ { \"productId\": \"prod-4Fz9QbX2kL\", \"quantity\": 6 }, { \"productId\": \"prod-6Gh2jKl8Zx\", \"quantity\": 4 } ], \"expectedTotal\": 275.01 } ], \"paymentCardId\": \"card-6Mn3bVc8Xz\" }"
response = http.request(request)puts response.read_bodycurl --request POST \ --url https://api.beautyrouter.com/v1/orders/batch \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90' \ --data '{ "orders": [ { "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6 }, { "productId": "prod-6Gh2jKl8Zx", "quantity": 4 } ], "expectedTotal": 275.01 } ], "paymentCardId": "card-6Mn3bVc8Xz" }'import Foundation
let headers = [ "Idempotency-Key": "4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90", "Authorization": "Bearer <token>", "Content-Type": "application/json"]let parameters = [ "orders": [ [ "supplierId": "sup-1Ry6tUi3Op", "lines": [ [ "productId": "prod-4Fz9QbX2kL", "quantity": 6 ], [ "productId": "prod-6Gh2jKl8Zx", "quantity": 4 ] ], "expectedTotal": 275.01 ] ], "paymentCardId": "card-6Mn3bVc8Xz"] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.beautyrouter.com/v1/orders/batch")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.httpMethod = "POST"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()Creates one order per supplier. Beauty Router checks every group first, creates the orders together, and charges
the card at once. The response has each order after its charge attempt, with its final status: placed,
payment_failed, or pending_verification for a prequalified company. A failed charge never fails the request. The
charge runs while the user is not present, so a card that needs 3-D Secure fails, and the user pays in
showOrder(element, orderId).
Shipping is locked when the order is created. Until the order is placed, other amounts can still change, so keep
the order up to date from order.updated.
With saveAsDraft: true, it saves each order as a draft instead, and expectedTotal is not needed. A draft holds
no stock, the supplier never sees it, and it sends no webhook, email, or notification. Send draftOrderId to
update a draft, or to place it with saveAsDraft: false. Values are not merged: an address, phone, or card you
leave out falls back to the company’s default. See Drafts.
It needs canOrder, and only prequalified and verified companies can call it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”A new value for each order the user places, such as a UUID. It belongs to the company and lasts 24 hours. A repeat with the same key and body returns the first result.
Example
4f0c2b7e-9a1d-4c36-b8e5-2d7a6f1e3c90Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The draft to update or place. The supplier cannot change, and the lines are replaced.
object
The group’s total from the quote. A difference of $0.10 or more fails with order_total_changed. Required
unless saveAsDraft is true.
The delivery address. Without it, Beauty Router uses the company’s.
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.
The card that pays. Without it, the default card pays.
true saves the whole request as drafts.
Examples
{ "orders": [ { "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6 }, { "productId": "prod-6Gh2jKl8Zx", "quantity": 4 } ], "expectedTotal": 275.01 } ], "paymentCardId": "card-6Mn3bVc8Xz"}{ "saveAsDraft": true, "orders": [ { "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6 } ] } ]}{ "orders": [ { "draftOrderId": "order-2Xc9vBn4Mq", "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6 } ], "expectedTotal": 171.79 } ], "paymentCardId": "card-6Mn3bVc8Xz"}Responses
Section titled “Responses”The new orders. A repeat with the same key and body returns the same result.
object
object
The order ID.
The order number people see.
The company the order belongs to.
The user who placed the order.
draft: the order is saved for later. It holds no stock, and the supplier does not see it.
pending_verification: the company is prequalified, and the order waits until its verification ends, with no
charge yet.
payment_failed: the card charge failed, or a payment is waiting for 3-D Secure. Beauty Router tries once more
after 24 hours when the failure can be retried. If that fails too, or the failure cannot be retried, it cancels the
order at 24 hours. placed: the card was
charged, and the brand or distributor starts preparing the order right after. ready_to_ship, in_transit,
delivered, delivery_failed, and canceled follow the delivery. Only a placed order takes stock from the
supplier.
Why the order was canceled. Only on canceled orders.
The brand or distributor that fulfills the order.
object
object
The product ID.
The product name.
The wholesale price of one unit before the discount, in US dollars.
The discount on the whole line, in US dollars.
The line total, in US dollars.
The total of the lines, in US dollars.
The discount on the order, in US dollars.
The shipping charge, in US dollars: a flat amount or a carrier quote, free above the supplier’s threshold. It is
locked when the order is created. null on a draft with no address.
The sales tax, in US dollars. null on a draft with no address.
The amount the salon pays, in US dollars. It can change until the order is placed. null on a draft with no
address.
Always usd.
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.
object
The carrier’s tracking page. Left out when there is none.
The carrier. Left out when it is not known.
When the order was delivered, or null.
Examples
{ "data": [ { "id": "order-8Jd3kFs6Gh", "number": "4821-7730", "companyId": "loc-7Hk2pQx9Lm", "userId": "user-3Vb8nWq1Rt", "status": "placed", "supplier": { "id": "sup-1Ry6tUi3Op", "name": "Amberlin" }, "lines": [ { "productId": "prod-4Fz9QbX2kL", "name": "Amberlin Bond Repair Shampoo 33.8 fl oz", "quantity": 6, "unitPrice": 24.5, "discount": 0, "total": 147 }, { "productId": "prod-6Gh2jKl8Zx", "name": "Amberlin Bond Repair Conditioner 33.8 fl oz", "quantity": 4, "unitPrice": 26.5, "discount": 0, "total": 106 } ], "productsTotal": 253, "discount": 0, "shipping": 0, "salesTax": 22.01, "total": 275.01, "currency": "usd", "deliveryAddress": { "line1": "1450 Larimer St", "line2": "Suite 200", "city": "Denver", "state": "CO", "postalCode": "80202", "country": "US", "phone": "+13035550142" }, "trackingNumbers": [], "createdAt": "2026-10-26T15:42:10Z", "updatedAt": "2026-10-26T15:42:10Z", "deliveredAt": null } ]}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_order: the user was logged in with canOrder: false. company_not_verified: the company is not
prequalified or verified.
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_order", "message": "This user cannot place or change orders." }}{ "error": { "code": "company_not_verified", "message": "The company must be prequalified or verified to see wholesale prices and order." }}not_found: the object does not exist, or the user has no access to 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": "not_found", "message": "The object was not found." }}Nothing was created. order_total_changed: a group differs from expectedTotal by $0.10 or more.
order_has_problems: a group or the company has a problem. Both have a fresh quote in quote.
idempotency_key_reused: the key was already used with a different body. idempotency_key_in_use: an earlier
request with this key is still finishing, so try again shortly. order_action_not_allowed:
draftOrderId names an order that is not a draft.
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": "order_total_changed", "message": "The total changed. Review the new quote.", "quote": { "groups": [ { "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6, "unitPrice": 25, "discount": 0, "total": 150 } ], "productsTotal": 150, "orderDiscount": 0, "shipping": { "amount": 0, "kind": "free" }, "freeShippingRemaining": null, "salesTax": 13.05, "taxExemption": { "certificateId": null, "notAppliedReason": "no_certificate" }, "total": 163.05, "chargeTiming": "now", "problems": [] } ], "unresolvedLines": [], "companyProblems": [], "total": 163.05, "currency": "usd" } }}{ "error": { "code": "order_has_problems", "message": "A group has a problem. See the quote.", "quote": { "groups": [ { "supplierId": "sup-1Ry6tUi3Op", "lines": [ { "productId": "prod-4Fz9QbX2kL", "quantity": 6, "unitPrice": 24.5, "discount": 0, "total": 147 } ], "productsTotal": 147, "orderDiscount": 0, "shipping": { "amount": 12, "kind": "flat" }, "freeShippingRemaining": 3, "salesTax": 12.79, "taxExemption": { "certificateId": null, "notAppliedReason": "no_certificate" }, "total": 171.79, "chargeTiming": "now", "problems": [ { "code": "insufficient_stock", "message": "Only 4 units are available.", "productId": "prod-4Fz9QbX2kL", "available": 4 } ] } ], "unresolvedLines": [], "companyProblems": [], "total": 171.79, "currency": "usd" } }}{ "error": { "code": "idempotency_key_reused", "message": "This Idempotency-Key was already used with a different body." }}{ "error": { "code": "idempotency_key_in_use", "message": "An earlier request with this Idempotency-Key is still finishing. Try again shortly." }}{ "error": { "code": "order_action_not_allowed", "message": "This order is not a draft." }}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." }}