curl --request POST \
--url https://api.exowpee.com/v1/team/currencies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"exponent": 15,
"code": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/team/currencies"
payload = {
"exponent": 15,
"code": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({exponent: 15, code: '<string>', name: '<string>'})
};
fetch('https://api.exowpee.com/v1/team/currencies', 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/currencies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'exponent' => 15,
'code' => '<string>',
'name' => '<string>'
]),
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/currencies"
payload := strings.NewReader("{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/team/currencies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/currencies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"exponent": 123,
"code": "<string>",
"name": "<string>",
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Add a currency
Adds a custom currency (code, name, decimal places) to the company.
curl --request POST \
--url https://api.exowpee.com/v1/team/currencies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"exponent": 15,
"code": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/team/currencies"
payload = {
"exponent": 15,
"code": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({exponent: 15, code: '<string>', name: '<string>'})
};
fetch('https://api.exowpee.com/v1/team/currencies', 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/currencies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'exponent' => 15,
'code' => '<string>',
'name' => '<string>'
]),
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/currencies"
payload := strings.NewReader("{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/team/currencies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/team/currencies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"exponent": 123,
"code": "<string>",
"name": "<string>",
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}currencies.create
Conditions
- Agent accounts are refused.
- exponent, code and name are all required.
- The pair code and name (both compared in uppercase) must not already exist among the company’s own currencies; shared currencies are not checked, so a company may add a currency with the same code and name as a shared one.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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, exponent, code, name, company_id, 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
Number of decimal places of the currency, an integer from 0 to 30 (0 for XOF). Required when creating; optional on update, where the stored value is kept when omitted.
0 <= x <= 30Three-character currency code; it is trimmed and stored in uppercase. Required when creating; optional on update. Together with name it must be unique among the company's own currencies.
3Name of the currency, 3 to 120 characters; it is trimmed and stored in uppercase. Required when creating; optional on update. Together with code it must be unique among the company's own currencies.
3 - 120Response
Resource (only with response=resource).
Identifier of the currency (27-character KSUID string).
Number of decimal places of the currency (0 for XOF); an amount in minor units divided by 10 to this power gives the amount in the currency.
3-character currency code, stored in uppercase.
Name of the currency, stored in uppercase.
Identifier of the company the record belongs to.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).