curl --request PUT \
--url https://api.exowpee.com/v1/team/currencies/{currencyId} \
--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/{currencyId}"
payload = {
"exponent": 15,
"code": "<string>",
"name": "<string>"
}
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({exponent: 15, code: '<string>', name: '<string>'})
};
fetch('https://api.exowpee.com/v1/team/currencies/{currencyId}', 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/{currencyId}",
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([
'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/{currencyId}"
payload := strings.NewReader("{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\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/currencies/{currencyId}")
.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/{currencyId}")
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 \"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": {}
}Update a currency
Changes the code, name or decimal places of one of the company’s own currencies.
curl --request PUT \
--url https://api.exowpee.com/v1/team/currencies/{currencyId} \
--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/{currencyId}"
payload = {
"exponent": 15,
"code": "<string>",
"name": "<string>"
}
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({exponent: 15, code: '<string>', name: '<string>'})
};
fetch('https://api.exowpee.com/v1/team/currencies/{currencyId}', 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/{currencyId}",
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([
'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/{currencyId}"
payload := strings.NewReader("{\n \"exponent\": 15,\n \"code\": \"<string>\",\n \"name\": \"<string>\"\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/currencies/{currencyId}")
.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/{currencyId}")
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 \"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.update
Conditions
- Agent accounts are refused.
- Only the company’s own currencies can be changed; shared currencies are refused.
- The resulting pair code and name (compared in uppercase, the currency itself excluded) must not already exist among the company’s own currencies.
- Fields that are not sent keep their stored value.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the currency to change (27-character KSUID string). It must be one of the company's own currencies.
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).