curl --request POST \
--url https://external.pleo.io/v1/accounting-entries:search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"includeDeleted": false,
"accountIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"bookkeepingDateEnd": "2023-11-07T05:31:56Z",
"bookkeepingDateStart": "2023-11-07T05:31:56Z",
"employeeIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"exportStatus": [],
"families": [],
"foreignExtensionIds": [
"<string>"
],
"hasAccount": true,
"hasBookkeepingDate": true,
"hasNote": true,
"performedAtEnd": "2023-11-07T05:31:56Z",
"performedAtStart": "2023-11-07T05:31:56Z",
"reviewStatus": [],
"settled": true,
"settledAtEnd": "2023-11-07T05:31:56Z",
"settledAtStart": "2023-11-07T05:31:56Z",
"status": [],
"subFamilies": [],
"tagGroupIdsUnset": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tagRowIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"taxCodeIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"teamIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"transactionValueCurrencies": [
"<string>"
]
}
'import requests
url = "https://external.pleo.io/v1/accounting-entries:search"
payload = {
"includeDeleted": False,
"accountIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"bookkeepingDateEnd": "2023-11-07T05:31:56Z",
"bookkeepingDateStart": "2023-11-07T05:31:56Z",
"employeeIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"exportStatus": [],
"families": [],
"foreignExtensionIds": ["<string>"],
"hasAccount": True,
"hasBookkeepingDate": True,
"hasNote": True,
"performedAtEnd": "2023-11-07T05:31:56Z",
"performedAtStart": "2023-11-07T05:31:56Z",
"reviewStatus": [],
"settled": True,
"settledAtEnd": "2023-11-07T05:31:56Z",
"settledAtStart": "2023-11-07T05:31:56Z",
"status": [],
"subFamilies": [],
"tagGroupIdsUnset": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tagRowIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"taxCodeIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"teamIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"transactionValueCurrencies": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
includeDeleted: false,
accountIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
bookkeepingDateEnd: '2023-11-07T05:31:56Z',
bookkeepingDateStart: '2023-11-07T05:31:56Z',
employeeIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
exportStatus: [],
families: [],
foreignExtensionIds: ['<string>'],
hasAccount: true,
hasBookkeepingDate: true,
hasNote: true,
performedAtEnd: '2023-11-07T05:31:56Z',
performedAtStart: '2023-11-07T05:31:56Z',
reviewStatus: [],
settled: true,
settledAtEnd: '2023-11-07T05:31:56Z',
settledAtStart: '2023-11-07T05:31:56Z',
status: [],
subFamilies: [],
tagGroupIdsUnset: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tagRowIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
taxCodeIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
teamIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
transactionValueCurrencies: ['<string>']
})
};
fetch('https://external.pleo.io/v1/accounting-entries:search', 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://external.pleo.io/v1/accounting-entries:search",
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([
'includeDeleted' => false,
'accountIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'bookkeepingDateEnd' => '2023-11-07T05:31:56Z',
'bookkeepingDateStart' => '2023-11-07T05:31:56Z',
'employeeIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'exportStatus' => [
],
'families' => [
],
'foreignExtensionIds' => [
'<string>'
],
'hasAccount' => true,
'hasBookkeepingDate' => true,
'hasNote' => true,
'performedAtEnd' => '2023-11-07T05:31:56Z',
'performedAtStart' => '2023-11-07T05:31:56Z',
'reviewStatus' => [
],
'settled' => true,
'settledAtEnd' => '2023-11-07T05:31:56Z',
'settledAtStart' => '2023-11-07T05:31:56Z',
'status' => [
],
'subFamilies' => [
],
'tagGroupIdsUnset' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tagRowIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'taxCodeIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'teamIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'transactionValueCurrencies' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$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://external.pleo.io/v1/accounting-entries:search"
payload := strings.NewReader("{\n \"includeDeleted\": false,\n \"accountIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bookkeepingDateEnd\": \"2023-11-07T05:31:56Z\",\n \"bookkeepingDateStart\": \"2023-11-07T05:31:56Z\",\n \"employeeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"exportStatus\": [],\n \"families\": [],\n \"foreignExtensionIds\": [\n \"<string>\"\n ],\n \"hasAccount\": true,\n \"hasBookkeepingDate\": true,\n \"hasNote\": true,\n \"performedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"performedAtStart\": \"2023-11-07T05:31:56Z\",\n \"reviewStatus\": [],\n \"settled\": true,\n \"settledAtEnd\": \"2023-11-07T05:31:56Z\",\n \"settledAtStart\": \"2023-11-07T05:31:56Z\",\n \"status\": [],\n \"subFamilies\": [],\n \"tagGroupIdsUnset\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tagRowIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"taxCodeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"teamIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"transactionValueCurrencies\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://external.pleo.io/v1/accounting-entries:search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"includeDeleted\": false,\n \"accountIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bookkeepingDateEnd\": \"2023-11-07T05:31:56Z\",\n \"bookkeepingDateStart\": \"2023-11-07T05:31:56Z\",\n \"employeeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"exportStatus\": [],\n \"families\": [],\n \"foreignExtensionIds\": [\n \"<string>\"\n ],\n \"hasAccount\": true,\n \"hasBookkeepingDate\": true,\n \"hasNote\": true,\n \"performedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"performedAtStart\": \"2023-11-07T05:31:56Z\",\n \"reviewStatus\": [],\n \"settled\": true,\n \"settledAtEnd\": \"2023-11-07T05:31:56Z\",\n \"settledAtStart\": \"2023-11-07T05:31:56Z\",\n \"status\": [],\n \"subFamilies\": [],\n \"tagGroupIdsUnset\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tagRowIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"taxCodeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"teamIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"transactionValueCurrencies\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/accounting-entries:search")
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;charset=UTF-8'
request.body = "{\n \"includeDeleted\": false,\n \"accountIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bookkeepingDateEnd\": \"2023-11-07T05:31:56Z\",\n \"bookkeepingDateStart\": \"2023-11-07T05:31:56Z\",\n \"employeeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"exportStatus\": [],\n \"families\": [],\n \"foreignExtensionIds\": [\n \"<string>\"\n ],\n \"hasAccount\": true,\n \"hasBookkeepingDate\": true,\n \"hasNote\": true,\n \"performedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"performedAtStart\": \"2023-11-07T05:31:56Z\",\n \"reviewStatus\": [],\n \"settled\": true,\n \"settledAtEnd\": \"2023-11-07T05:31:56Z\",\n \"settledAtStart\": \"2023-11-07T05:31:56Z\",\n \"status\": [],\n \"subFamilies\": [],\n \"tagGroupIdsUnset\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tagRowIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"taxCodeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"teamIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"transactionValueCurrencies\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"attendees": [
{
"attendableId": "<string>",
"attendableType": "CONTACT",
"id": "<string>"
}
],
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"exportStatus": "CREATED",
"family": "BALANCE_AMENDMENT",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performedAt": "2023-11-07T05:31:56Z",
"receiptIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"reviewStatus": "NOT_OK",
"splitItems": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
{
"tagGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tagId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"accountCode": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalBillValue": {
"currency": "EUR",
"minors": 10
},
"transactionValue": {
"currency": "EUR",
"minors": 10
}
}
],
"status": "DRAFT",
"tags": [
{
"tagGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tagId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"transactionValue": {
"currency": "EUR",
"minors": 10
},
"updatedAt": "2023-11-07T05:31:56Z",
"accountCode": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookkeepingDate": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"foreignExtensionId": "<string>",
"merchant": {
"address": {},
"externalMerchantId": "<string>",
"merchantCategoryCode": "<string>",
"name": "<string>"
},
"note": "<string>",
"relatedAccountingEntries": [
"<unknown>"
],
"settledAt": "2023-11-07T05:31:56Z",
"subFamily": "ATM",
"supplier": {
"cif": "<string>",
"documentNumber": "<string>",
"documentType": "FACTURA",
"externalAccountNumber": "<string>",
"externalSupplierId": "<string>"
},
"taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalBillValue": {
"currency": "EUR",
"minors": 10
}
}
],
"pagination": {
"currentRequestPagination": {
"parameters": {},
"after": "<string>",
"before": "<string>",
"limit": 123,
"offset": 123,
"sortingKeys": [
"<string>"
],
"sortingOrder": [
"ASC"
]
},
"hasNextPage": true,
"hasPreviousPage": true,
"endCursor": "<string>",
"startCursor": "<string>",
"total": 123
}
}Fetch accounting entries based on filters.
curl --request POST \
--url https://external.pleo.io/v1/accounting-entries:search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"includeDeleted": false,
"accountIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"bookkeepingDateEnd": "2023-11-07T05:31:56Z",
"bookkeepingDateStart": "2023-11-07T05:31:56Z",
"employeeIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"exportStatus": [],
"families": [],
"foreignExtensionIds": [
"<string>"
],
"hasAccount": true,
"hasBookkeepingDate": true,
"hasNote": true,
"performedAtEnd": "2023-11-07T05:31:56Z",
"performedAtStart": "2023-11-07T05:31:56Z",
"reviewStatus": [],
"settled": true,
"settledAtEnd": "2023-11-07T05:31:56Z",
"settledAtStart": "2023-11-07T05:31:56Z",
"status": [],
"subFamilies": [],
"tagGroupIdsUnset": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tagRowIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"taxCodeIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"teamIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"transactionValueCurrencies": [
"<string>"
]
}
'import requests
url = "https://external.pleo.io/v1/accounting-entries:search"
payload = {
"includeDeleted": False,
"accountIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"bookkeepingDateEnd": "2023-11-07T05:31:56Z",
"bookkeepingDateStart": "2023-11-07T05:31:56Z",
"employeeIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"exportStatus": [],
"families": [],
"foreignExtensionIds": ["<string>"],
"hasAccount": True,
"hasBookkeepingDate": True,
"hasNote": True,
"performedAtEnd": "2023-11-07T05:31:56Z",
"performedAtStart": "2023-11-07T05:31:56Z",
"reviewStatus": [],
"settled": True,
"settledAtEnd": "2023-11-07T05:31:56Z",
"settledAtStart": "2023-11-07T05:31:56Z",
"status": [],
"subFamilies": [],
"tagGroupIdsUnset": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tagRowIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"taxCodeIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"teamIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"transactionValueCurrencies": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
includeDeleted: false,
accountIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
bookkeepingDateEnd: '2023-11-07T05:31:56Z',
bookkeepingDateStart: '2023-11-07T05:31:56Z',
employeeIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
exportStatus: [],
families: [],
foreignExtensionIds: ['<string>'],
hasAccount: true,
hasBookkeepingDate: true,
hasNote: true,
performedAtEnd: '2023-11-07T05:31:56Z',
performedAtStart: '2023-11-07T05:31:56Z',
reviewStatus: [],
settled: true,
settledAtEnd: '2023-11-07T05:31:56Z',
settledAtStart: '2023-11-07T05:31:56Z',
status: [],
subFamilies: [],
tagGroupIdsUnset: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tagRowIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
taxCodeIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
teamIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
transactionValueCurrencies: ['<string>']
})
};
fetch('https://external.pleo.io/v1/accounting-entries:search', 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://external.pleo.io/v1/accounting-entries:search",
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([
'includeDeleted' => false,
'accountIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'bookkeepingDateEnd' => '2023-11-07T05:31:56Z',
'bookkeepingDateStart' => '2023-11-07T05:31:56Z',
'employeeIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'exportStatus' => [
],
'families' => [
],
'foreignExtensionIds' => [
'<string>'
],
'hasAccount' => true,
'hasBookkeepingDate' => true,
'hasNote' => true,
'performedAtEnd' => '2023-11-07T05:31:56Z',
'performedAtStart' => '2023-11-07T05:31:56Z',
'reviewStatus' => [
],
'settled' => true,
'settledAtEnd' => '2023-11-07T05:31:56Z',
'settledAtStart' => '2023-11-07T05:31:56Z',
'status' => [
],
'subFamilies' => [
],
'tagGroupIdsUnset' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'tagRowIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'taxCodeIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'teamIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'transactionValueCurrencies' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$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://external.pleo.io/v1/accounting-entries:search"
payload := strings.NewReader("{\n \"includeDeleted\": false,\n \"accountIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bookkeepingDateEnd\": \"2023-11-07T05:31:56Z\",\n \"bookkeepingDateStart\": \"2023-11-07T05:31:56Z\",\n \"employeeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"exportStatus\": [],\n \"families\": [],\n \"foreignExtensionIds\": [\n \"<string>\"\n ],\n \"hasAccount\": true,\n \"hasBookkeepingDate\": true,\n \"hasNote\": true,\n \"performedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"performedAtStart\": \"2023-11-07T05:31:56Z\",\n \"reviewStatus\": [],\n \"settled\": true,\n \"settledAtEnd\": \"2023-11-07T05:31:56Z\",\n \"settledAtStart\": \"2023-11-07T05:31:56Z\",\n \"status\": [],\n \"subFamilies\": [],\n \"tagGroupIdsUnset\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tagRowIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"taxCodeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"teamIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"transactionValueCurrencies\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://external.pleo.io/v1/accounting-entries:search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"includeDeleted\": false,\n \"accountIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bookkeepingDateEnd\": \"2023-11-07T05:31:56Z\",\n \"bookkeepingDateStart\": \"2023-11-07T05:31:56Z\",\n \"employeeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"exportStatus\": [],\n \"families\": [],\n \"foreignExtensionIds\": [\n \"<string>\"\n ],\n \"hasAccount\": true,\n \"hasBookkeepingDate\": true,\n \"hasNote\": true,\n \"performedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"performedAtStart\": \"2023-11-07T05:31:56Z\",\n \"reviewStatus\": [],\n \"settled\": true,\n \"settledAtEnd\": \"2023-11-07T05:31:56Z\",\n \"settledAtStart\": \"2023-11-07T05:31:56Z\",\n \"status\": [],\n \"subFamilies\": [],\n \"tagGroupIdsUnset\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tagRowIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"taxCodeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"teamIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"transactionValueCurrencies\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/accounting-entries:search")
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;charset=UTF-8'
request.body = "{\n \"includeDeleted\": false,\n \"accountIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bookkeepingDateEnd\": \"2023-11-07T05:31:56Z\",\n \"bookkeepingDateStart\": \"2023-11-07T05:31:56Z\",\n \"employeeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"exportStatus\": [],\n \"families\": [],\n \"foreignExtensionIds\": [\n \"<string>\"\n ],\n \"hasAccount\": true,\n \"hasBookkeepingDate\": true,\n \"hasNote\": true,\n \"performedAtEnd\": \"2023-11-07T05:31:56Z\",\n \"performedAtStart\": \"2023-11-07T05:31:56Z\",\n \"reviewStatus\": [],\n \"settled\": true,\n \"settledAtEnd\": \"2023-11-07T05:31:56Z\",\n \"settledAtStart\": \"2023-11-07T05:31:56Z\",\n \"status\": [],\n \"subFamilies\": [],\n \"tagGroupIdsUnset\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"tagRowIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"taxCodeIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"teamIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"transactionValueCurrencies\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"attendees": [
{
"attendableId": "<string>",
"attendableType": "CONTACT",
"id": "<string>"
}
],
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"exportStatus": "CREATED",
"family": "BALANCE_AMENDMENT",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"performedAt": "2023-11-07T05:31:56Z",
"receiptIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"reviewStatus": "NOT_OK",
"splitItems": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
{
"tagGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tagId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"accountCode": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalBillValue": {
"currency": "EUR",
"minors": 10
},
"transactionValue": {
"currency": "EUR",
"minors": 10
}
}
],
"status": "DRAFT",
"tags": [
{
"tagGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tagId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"transactionValue": {
"currency": "EUR",
"minors": 10
},
"updatedAt": "2023-11-07T05:31:56Z",
"accountCode": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bookkeepingDate": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"employeeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"foreignExtensionId": "<string>",
"merchant": {
"address": {},
"externalMerchantId": "<string>",
"merchantCategoryCode": "<string>",
"name": "<string>"
},
"note": "<string>",
"relatedAccountingEntries": [
"<unknown>"
],
"settledAt": "2023-11-07T05:31:56Z",
"subFamily": "ATM",
"supplier": {
"cif": "<string>",
"documentNumber": "<string>",
"documentType": "FACTURA",
"externalAccountNumber": "<string>",
"externalSupplierId": "<string>"
},
"taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totalBillValue": {
"currency": "EUR",
"minors": 10
}
}
],
"pagination": {
"currentRequestPagination": {
"parameters": {},
"after": "<string>",
"before": "<string>",
"limit": 123,
"offset": 123,
"sortingKeys": [
"<string>"
],
"sortingOrder": [
"ASC"
]
},
"hasNextPage": true,
"hasPreviousPage": true,
"endCursor": "<string>",
"startCursor": "<string>",
"total": 123
}
}Authorizations
Query Parameters
Body
Only return accounting entries that match with the specific export status.
CREATED: The accounting entry has been created.
EXPORTED: The accounting entry has been exported.
EXPORTING: The accounting entry is in the process of being exported.
QUEUED: The accounting entry is in the queue to be exported.
CREATED, EXPORTED, EXPORTING, NOT_CREATED, NOT_EXPORTED, QUEUED Only return accounting entries that belong to the specific accounting entry families
BALANCE_AMENDMENT: Represents manual wallet balance adjustments, often through human intervention.
BILL_INVOICE: Represents an invoice issued to the company. If payment of the invoice is made via Pleo, the payment is recorded separately, using the BILL_INVOICE_PAYMENT family.
CARD_PURCHASE: Represents a purchase made using a physical or virtual Pleo card.
CASHBACK: An amount of money that is returned to the company through Pleo cashback.
CREDIT_NOTE: Represents a credit note issued to the company, stored only in the accounting entry metadata table.
MILEAGE: Represents a Mileage expense incurred by an employee. The amount is owed to the employee.
OUT_OF_POCKET: Represents an amount that is spent by an employee out of their own pocket. The amount is owed to the employee.
OVERDRAFT: Represents either the monthly subscription fee for using Pleo Overdraft, or a the interest incurred on an existing overdraft.
PER_DIEM: Represents a daily allowance given to an employee during travel - the amount is owed to the employee.
PLEO_INVOICE: Represents the SaaS invoice from Pleo to the company.
REIMBURSEMENT: Represents a reimbursement from the company to the employee or vice-versa.
WALLET: Represents a top up or withdrawal on the Pleo wallet
BILL_INVOICE_PAYMENT: Represents a payment of an invoice from the company wallet.
BALANCE_AMENDMENT, BILL_INVOICE, CARD_PURCHASE, CASHBACK, CREDIT_NOTE, MILEAGE, OUT_OF_POCKET, OVERDRAFT, PER_DIEM, PLEO_INVOICE, REIMBURSEMENT, WALLET, BILL_INVOICE_PAYMENT Only return accounting entries that match with the specific review status.
NOT_OK: The accounting entry has been reviewed as Not OK.
NOT_REQUIRED: The accounting entry does not require review.
NOT_SET: The accounting entry has not been reviewed yet.
OK: The accounting entry has been reviewed as OK.
WAITING_FOR_EXPENSE_OWNER: The accounting entry is waiting for more details from the Expense Owner.
WAITING_FOR_REVIEWER: The accounting entry is waiting for review by a reviewer.
WAITING_FOR_COMPANY_REVIEWER: The accounting entry is waiting for review by a company reviewer.
WAITING_FOR_TEAM_REVIEWER: The accounting entry is waiting for review by a team reviewer.
WAITING_FOR_TAG_REVIEWER: The accounting entry is waiting for review by a tag reviewer.
NOT_OK, NOT_REQUIRED, NOT_SET, OK, WAITING_FOR_EXPENSE_OWNER, WAITING_FOR_REVIEWER, WAITING_FOR_COMPANY_REVIEWER, WAITING_FOR_TEAM_REVIEWER, WAITING_FOR_TAG_REVIEWER Only return accounting entries that match with the specific accounting entry status.
DRAFT: The accounting entry is still in a work-in-progress stage; the details might change.
PENDING: Payment is in progress. The transaction amount in the specific currency is final, yet the funds have not
yet been settled.> ⚠️ Note: The customer can no longer cancel this expense.
amount/currency is fixed, funds have been reserved but not yet settled, and expense can no longer be canceled by user
COMPLETED: The transaction is complete, implying the funds have been settled for the final bill amount.COMPLETED_EXTERNALLY: Payment has completed outside of Pleo. Hence, it does not impact the Pleo walletCANCELLED: Canceled by user, Pleo, or an external partyREJECTED: Rejected by user, Pleo or an external partyERROR: An error prevented the accounting entry from being settled
DRAFT, PENDING, COMPLETED, COMPLETED_EXTERNALLY, CANCELLED, REJECTED, ERROR Only return accounting entries that belong to the specific sub family.
Not every accounting entry has a sub-family. The subFamily property is null when none applies, for example on a CARD_PURCHASE chargeback. Clients should treat null as no sub-family and tolerate values not listed here, as new sub-families may be added.
ATM: A CARD_PURCHASE that was performed at an ATM.
IN_STORE: A CARD_PURCHASE that was performed at a physical store.
ONLINE: A CARD_PURCHASE that was performed online.
PLEO_INVOICE: A PLEO_INVOICE that was paid.
PLEO_INVOICE_REFUND: A PLEO_INVOICE that was refunded.
REIMBURSEMENT_TO_COMPANY: A REIMBURSEMENT was made to the company.
REIMBURSEMENT_TO_EMPLOYEE: A REIMBURSEMENT was made to the employee.
REIMBURSEMENT_TO_EMPLOYEE_REFUND: A REIMBURSEMENT to the employee was refunded.
LOAD: Either a WALLET or a BALANCE_AMENDMENTload.UNLOAD: Either a WALLET or a BALANCE_AMENDMENT unload - Money leaves the Pleo wallet.
WITHDRAWAL: A WALLET withdrawal.
FEE: A monthly fee paid for using overdraft.
INTEREST: Interest paid for the amount over drafted.
BILL_INVOICE_PAYMENT_RETURNED: A BILL_INVOICE_PAYMENT that was returned.
BILL_INVOICE_PAYMENT_RECEIVED: A BILL_INVOICE_PAYMENT that was received.
ATM, IN_STORE, ONLINE, PLEO_INVOICE, PLEO_INVOICE_REFUND, REIMBURSEMENT_TO_COMPANY, REIMBURSEMENT_TO_EMPLOYEE, REIMBURSEMENT_TO_EMPLOYEE_REFUND, LOAD, UNLOAD, WITHDRAWAL, FEE, INTEREST, BILL_INVOICE_PAYMENT_RETURNED, BILL_INVOICE_PAYMENT_RECEIVED Only return accounting entries with the given Team ID. The Team ID is not the one allocated to an employee, It is allocated to a team of a company. For example, an accounting entry contains the team ID of Design team as the specific entry is associated with the Design team
100Was this page helpful?