Layers
curl --request GET \
--url https://api.fyvel.io/v1/companies/{companyId}/layers \
--header 'Authorization: <authorization>'import requests
url = "https://api.fyvel.io/v1/companies/{companyId}/layers"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.fyvel.io/v1/companies/{companyId}/layers', 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.fyvel.io/v1/companies/{companyId}/layers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fyvel.io/v1/companies/{companyId}/layers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fyvel.io/v1/companies/{companyId}/layers")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyvel.io/v1/companies/{companyId}/layers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"layers": [
{
"layerId": "44444444-4444-4444-8444-444444444444",
"name": "Actuals",
"type": "import",
"isDefault": true
}
]
}
Lists
Layers
Booking layers of one company.
GET
/
v1
/
companies
/
{companyId}
/
layers
Layers
curl --request GET \
--url https://api.fyvel.io/v1/companies/{companyId}/layers \
--header 'Authorization: <authorization>'import requests
url = "https://api.fyvel.io/v1/companies/{companyId}/layers"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.fyvel.io/v1/companies/{companyId}/layers', 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.fyvel.io/v1/companies/{companyId}/layers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fyvel.io/v1/companies/{companyId}/layers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fyvel.io/v1/companies/{companyId}/layers")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyvel.io/v1/companies/{companyId}/layers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"layers": [
{
"layerId": "44444444-4444-4444-8444-444444444444",
"name": "Actuals",
"type": "import",
"isDefault": true
}
]
}
{
"layers": [
{
"layerId": "44444444-4444-4444-8444-444444444444",
"name": "Actuals",
"type": "import",
"isDefault": true
}
]
}
Bearer and the API key. See Authentication.Path parameters
Company id from Companies.
Response
Id for
layerIds on values.import, manual, personnel_cost, custom, snapshot, statistic, personnel_plan, or statement_plan.type: "snapshot" has no single bookings. See Bookings.
Pass layerId in the values filter explicitly. Without layerIds and without layerGroupIds, report values use the default layers of the first company in companyIds.
An unknown or forbidden company returns 400 INVALID_COMPANY or 403 FORBIDDEN.