curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}"
payload = { "label": "<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({label: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}', 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/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}",
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([
'label' => '<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/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}"
payload := strings.NewReader("{\n \"label\": \"<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/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}")
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 \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"currency_code": "<string>",
"currency_exponent": 123,
"is_closed": true,
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Rename a fiscal year (organization)
Organization space, on a chosen book. Changes the label of a fiscal year; nothing else about it can be edited.
curl --request PUT \
--url https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}"
payload = { "label": "<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({label: '<string>'})
};
fetch('https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}', 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/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}",
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([
'label' => '<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/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}"
payload := strings.NewReader("{\n \"label\": \"<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/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/accounting/organization/books/{fiscalYear}/fiscal-years/{fiscal_year}")
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 \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"owner_type": "<string>",
"label": "<string>",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"currency_code": "<string>",
"currency_exponent": 123,
"is_closed": true,
"closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}fiscal_years.update
Conditions
- The book must be one the caller’s access opens.
- The accounting module must be part of the organization’s plan.
- Only the label can change; a null or missing label leaves it as it is. Nothing checks whether the year is closed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the accounting book, not of the year: the generated path names the books segment {fiscalYear}; the year is the {fiscal_year} segment.
Identifier of the fiscal year (27-character KSUID).
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, owner_type, label, start_date, end_date, currency_code, currency_exponent, is_closed, closed_at, 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
New name of the fiscal year. Optional: null or missing keeps the current one. Nothing else can be changed.
Response
Resource (only with response=resource).
Identifier of the fiscal year (27-character KSUID).
Kind of book that owns the year; set by the server from the selected book.
Name of the fiscal year.
First day of the year, ISO 8601 date.
Last day of the year, ISO 8601 date.
Three-letter currency code in which the year's entries are kept.
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.
True once the year is closed by the year-end closing; years start open.
When the year was closed, ISO 8601; null while it is open or after it is reopened.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).