Get an account for a company
curl --request GET \
--url https://openapi.pleo.io/v1/accounts/{accountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.pleo.io/v1/accounts/{accountId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.pleo.io/v1/accounts/{accountId}', 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://openapi.pleo.io/v1/accounts/{accountId}",
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: Bearer <token>"
],
]);
$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://openapi.pleo.io/v1/accounts/{accountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.pleo.io/v1/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pleo.io/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"accountCategoryId": "<string>",
"hidden": true,
"accountNumber": "<string>",
"taxCodeId": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 401,
"error": "Forbidden",
"message": "user_scope_insufficient"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "user_scope_insufficient"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}"Something went wrong. Please contact the administrator if problems persist."Accounts
Get an account for a company
deprecated
GET
/
accounts
/
{accountId}
Get an account for a company
curl --request GET \
--url https://openapi.pleo.io/v1/accounts/{accountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.pleo.io/v1/accounts/{accountId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.pleo.io/v1/accounts/{accountId}', 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://openapi.pleo.io/v1/accounts/{accountId}",
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: Bearer <token>"
],
]);
$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://openapi.pleo.io/v1/accounts/{accountId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openapi.pleo.io/v1/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.pleo.io/v1/accounts/{accountId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"accountCategoryId": "<string>",
"hidden": true,
"accountNumber": "<string>",
"taxCodeId": "<string>"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}{
"statusCode": 401,
"error": "Forbidden",
"message": "user_scope_insufficient"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "user_scope_insufficient"
}{
"statusCode": 123,
"error": "<string>",
"message": "<string>"
}"Something went wrong. Please contact the administrator if problems persist."Authorizations
Open API Bearer token
Path Parameters
Unique UUID of the account.
Example:
"0f0e000-000d-0d00-000b-00db0d000fae"
Response
An account has been returned
The unique UUID identifier of the account
Description of this account
unique Category ID of the account
Is the account hidden/archived for the user
Account number
unique Tax Code ID
Was this page helpful?
⌘I