curl --request PUT \
--url https://api.exowpee.com/v1/team/companies/{company}/settings/{settings} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timezone": "<string>",
"currency_round": 1,
"default_tax_value": 50,
"manual_discount_approval_threshold": 50,
"allow_manual_with_campaign": true
}
'import requests
url = "https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}"
payload = {
"timezone": "<string>",
"currency_round": 1,
"default_tax_value": 50,
"manual_discount_approval_threshold": 50,
"allow_manual_with_campaign": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timezone: '<string>',
currency_round: 1,
default_tax_value: 50,
manual_discount_approval_threshold: 50,
allow_manual_with_campaign: true
})
};
fetch('https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}', 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.exowpee.com/v1/team/companies/{company}/settings/{settings}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'timezone' => '<string>',
'currency_round' => 1,
'default_tax_value' => 50,
'manual_discount_approval_threshold' => 50,
'allow_manual_with_campaign' => true
]),
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.exowpee.com/v1/team/companies/{company}/settings/{settings}"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"currency_round\": 1,\n \"default_tax_value\": 50,\n \"manual_discount_approval_threshold\": 50,\n \"allow_manual_with_campaign\": true\n}")
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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"currency_round\": 1,\n \"default_tax_value\": 50,\n \"manual_discount_approval_threshold\": 50,\n \"allow_manual_with_campaign\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}")
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 = "{\n \"timezone\": \"<string>\",\n \"currency_round\": 1,\n \"default_tax_value\": 50,\n \"manual_discount_approval_threshold\": 50,\n \"allow_manual_with_campaign\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"company_id": "<string>",
"order_currency_exponent": 123,
"order_currency_code": "<string>",
"timezone": "<string>",
"manual_discount_approval_threshold": "<string>",
"allow_manual_with_campaign": true,
"orders_count": 123,
"currency_round": 123,
"default_tax_value": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Update company settings
Changes a company’s timezone, currency rounding, default tax, and manual discount approval rules.
curl --request PUT \
--url https://api.exowpee.com/v1/team/companies/{company}/settings/{settings} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timezone": "<string>",
"currency_round": 1,
"default_tax_value": 50,
"manual_discount_approval_threshold": 50,
"allow_manual_with_campaign": true
}
'import requests
url = "https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}"
payload = {
"timezone": "<string>",
"currency_round": 1,
"default_tax_value": 50,
"manual_discount_approval_threshold": 50,
"allow_manual_with_campaign": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timezone: '<string>',
currency_round: 1,
default_tax_value: 50,
manual_discount_approval_threshold: 50,
allow_manual_with_campaign: true
})
};
fetch('https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}', 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.exowpee.com/v1/team/companies/{company}/settings/{settings}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'timezone' => '<string>',
'currency_round' => 1,
'default_tax_value' => 50,
'manual_discount_approval_threshold' => 50,
'allow_manual_with_campaign' => true
]),
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.exowpee.com/v1/team/companies/{company}/settings/{settings}"
payload := strings.NewReader("{\n \"timezone\": \"<string>\",\n \"currency_round\": 1,\n \"default_tax_value\": 50,\n \"manual_discount_approval_threshold\": 50,\n \"allow_manual_with_campaign\": true\n}")
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(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"timezone\": \"<string>\",\n \"currency_round\": 1,\n \"default_tax_value\": 50,\n \"manual_discount_approval_threshold\": 50,\n \"allow_manual_with_campaign\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/companies/{company}/settings/{settings}")
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 = "{\n \"timezone\": \"<string>\",\n \"currency_round\": 1,\n \"default_tax_value\": 50,\n \"manual_discount_approval_threshold\": 50,\n \"allow_manual_with_campaign\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"company_id": "<string>",
"order_currency_exponent": 123,
"order_currency_code": "<string>",
"timezone": "<string>",
"manual_discount_approval_threshold": "<string>",
"allow_manual_with_campaign": true,
"orders_count": 123,
"currency_round": 123,
"default_tax_value": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}settings.update
Conditions
- Agent accounts are refused.
- Fields that are not sent keep their stored value; the order currency, the monthly order limit and the other settings columns cannot be changed here.
- manual_discount_approval_threshold is the only field where an explicit null has an effect: it clears the threshold. A null allow_manual_with_campaign is ignored and keeps the stored value.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the company (27-character KSUID string). It must be the company selected in the session.
Identifier of the settings record (27-character KSUID string). It must belong to that company; each company has exactly one.
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, company_id, order_currency_exponent, order_currency_code, timezone, manual_discount_approval_threshold, allow_manual_with_campaign, orders_count, currency_round, default_tax_value, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .
Body
Time zone identifier, for example Africa/Porto-Novo. Optional; the stored value is kept when omitted.
Rounding setting, an integer of 0 or more. Optional; the stored value is kept when omitted.
x >= 0Default tax rate as a whole-number percentage from 0 to 100. Optional; the stored value is kept when omitted.
0 <= x <= 100Percentage from 0 to 100 (up to 6 decimals, a decimal number in major units of percent) above which the sale goes to approval: either one manual discount goes above this share of the amount it applies to, or all manual discounts together go above this share of the order amount before discounts and tax. Optional; send null to clear it (no approval needed); omit it to keep the stored value.
0 <= x <= 100Whether a manual discount may be combined with discount campaigns (false skips campaigns when a manual discount is present). Optional; null or omitted keeps the stored value.
Response
Resource (only with response=resource).
Identifier of the settings record (27-character KSUID string).
Identifier of the company the record belongs to.
Number of decimal places of the order currency (0 for XOF); an amount in minor units divided by 10 to this power gives the amount in the currency. Set when the company is created.
3-character code of the currency in which the company's orders are expressed, set when the company is created.
Time zone identifier of the company (for example Africa/Porto-Novo, the default for new companies). Working-hours checks use it.
Percentage (0 to 100, up to 6 decimals) above which a sale is routed to approval: one manual discount above this share of its calculation base, or all manual discounts together above this share of the order amount before discounts and tax; null means never. Returned as a decimal string.
Whether a manual discount may be combined with discount campaigns. When false, campaigns are skipped on a sale that has a manual discount; defaults to true.
Maximum number of orders the company may process per month; null means no limit and 0 blocks order processing. Not editable through the settings update; new companies start at 0.
Rounding setting of the company, a non-negative integer; 0 by default for new companies. Also returned with the session company settings.
Default tax rate of the company as a whole-number percentage from 0 to 100; 18 by default for new companies.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).