curl --request GET \
--url https://external.pleo.io/v3/export-items \
--header 'Authorization: Bearer <token>'import requests
url = "https://external.pleo.io/v3/export-items"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://external.pleo.io/v3/export-items', 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/v3/export-items",
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://external.pleo.io/v3/export-items"
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://external.pleo.io/v3/export-items")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v3/export-items")
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{
"data": [
{
"_links": {
"web": {
"exportItem": "http://example.com"
},
"mobile": {
"exportItem": "http://example.com"
},
"api": {
"exportItem": "http://example.com"
}
},
"accountingEntryId": "00000000-0000-0000-0000-000000000000",
"accountingEntryLines": [
{
"accountingEntryLineId": "00000000-0000-0000-0000-000000000000",
"lineAmount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"netAmount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"account": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Meals and Entertainment",
"code": "<string>",
"identifier": "<string>"
},
"tags": [
{
"code": "<string>",
"groupCode": "<string>",
"id": "00000000-0000-0000-0000-000000000000"
}
],
"tax": {
"amount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"id": "00000000-0000-0000-0000-000000000000",
"rate": 0.2,
"type": "inclusive",
"code": "<string>"
}
}
],
"additionalInformation": {
"reconciliationId": "<string>",
"attendees": [
"<string>"
],
"invoiceInformation": {
"invoiceDate": "2023-11-07T05:31:56Z",
"invoiceNumber": "<string>",
"status": "pending_approval",
"dueDate": "2023-11-07T05:31:56Z",
"paymentDate": "2023-11-07T05:31:56Z",
"supplierBankAccount": {
"bankName": "<string>",
"country": "DK",
"accountNumber": "<string>",
"bankCode": "<string>",
"bic": "<string>",
"iban": "<string>"
}
},
"reconciledEntries": [
"<string>"
]
},
"amount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"companyId": "00000000-0000-0000-0000-000000000000",
"date": "2023-11-07T05:31:56Z",
"type": "card_purchase",
"bookkeeping": {
"method": "none"
},
"contraAccount": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Pleo GBP Account",
"code": "<string>",
"identifier": "<string>"
},
"files": [
{
"size": 2084,
"type": "application/pdf",
"url": "https://file.url"
}
],
"note": "<string>",
"supplier": {
"account": "<string>",
"categoryCode": "5999",
"code": "<string>",
"country": "DK",
"name": "GOOGLE*ADS8693645259",
"taxIdentifier": "<string>"
},
"team": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Marketing",
"code": "<string>"
},
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "John Doe",
"code": "<string>"
},
"vendor": {
"defaultCurrency": "DKK",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Pleo",
"code": "<string>",
"country": "DK",
"externalId": "<string>",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>"
}
}
],
"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
}
}{
"type": "MISSING_CONTRA_ACCOUNTS",
"message": "Contra accounts are not fully configured. Please map contra accounts in the Accounting settings."
}{
"type": "EXPORT_JOB_STATUS_UNPROCESSABLE",
"message": "Export Job is finished and can no longer be processed."
}Get Export Items
An export item = an accounting entry transformed into an exportable entry. The accounting and bookkeeping information is collected from an accounting entry to form an export item.
• A request to this endpoint retrieves a list of export items selected for export.
• Please note that you can retrieve a list of export items only from pending and in_progress export jobs.
curl --request GET \
--url https://external.pleo.io/v3/export-items \
--header 'Authorization: Bearer <token>'import requests
url = "https://external.pleo.io/v3/export-items"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://external.pleo.io/v3/export-items', 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/v3/export-items",
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://external.pleo.io/v3/export-items"
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://external.pleo.io/v3/export-items")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v3/export-items")
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{
"data": [
{
"_links": {
"web": {
"exportItem": "http://example.com"
},
"mobile": {
"exportItem": "http://example.com"
},
"api": {
"exportItem": "http://example.com"
}
},
"accountingEntryId": "00000000-0000-0000-0000-000000000000",
"accountingEntryLines": [
{
"accountingEntryLineId": "00000000-0000-0000-0000-000000000000",
"lineAmount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"netAmount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"account": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Meals and Entertainment",
"code": "<string>",
"identifier": "<string>"
},
"tags": [
{
"code": "<string>",
"groupCode": "<string>",
"id": "00000000-0000-0000-0000-000000000000"
}
],
"tax": {
"amount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"id": "00000000-0000-0000-0000-000000000000",
"rate": 0.2,
"type": "inclusive",
"code": "<string>"
}
}
],
"additionalInformation": {
"reconciliationId": "<string>",
"attendees": [
"<string>"
],
"invoiceInformation": {
"invoiceDate": "2023-11-07T05:31:56Z",
"invoiceNumber": "<string>",
"status": "pending_approval",
"dueDate": "2023-11-07T05:31:56Z",
"paymentDate": "2023-11-07T05:31:56Z",
"supplierBankAccount": {
"bankName": "<string>",
"country": "DK",
"accountNumber": "<string>",
"bankCode": "<string>",
"bic": "<string>",
"iban": "<string>"
}
},
"reconciledEntries": [
"<string>"
]
},
"amount": {
"inSupplierCurrency": {
"currency": "UNDEFINED",
"value": 123
},
"inWalletCurrency": {
"currency": "UNDEFINED",
"value": 123
}
},
"companyId": "00000000-0000-0000-0000-000000000000",
"date": "2023-11-07T05:31:56Z",
"type": "card_purchase",
"bookkeeping": {
"method": "none"
},
"contraAccount": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Pleo GBP Account",
"code": "<string>",
"identifier": "<string>"
},
"files": [
{
"size": 2084,
"type": "application/pdf",
"url": "https://file.url"
}
],
"note": "<string>",
"supplier": {
"account": "<string>",
"categoryCode": "5999",
"code": "<string>",
"country": "DK",
"name": "GOOGLE*ADS8693645259",
"taxIdentifier": "<string>"
},
"team": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Marketing",
"code": "<string>"
},
"user": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "John Doe",
"code": "<string>"
},
"vendor": {
"defaultCurrency": "DKK",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Pleo",
"code": "<string>",
"country": "DK",
"externalId": "<string>",
"registrationNumber": "<string>",
"taxRegistrationNumber": "<string>"
}
}
],
"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
}
}{
"type": "MISSING_CONTRA_ACCOUNTS",
"message": "Contra accounts are not fully configured. Please map contra accounts in the Accounting settings."
}{
"type": "EXPORT_JOB_STATUS_UNPROCESSABLE",
"message": "Export Job is finished and can no longer be processed."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The Export Job ID in which the accounting entries have been included for export.
Lower bound of the page of data to return (cannot be used together with [after] or [offset]).
Upper bound of the page of data to return (cannot be used together with [before] or [offset]).
Offset of the page of data to return (cannot be used together with [before] or [after]).
The maximum amount of items to return.
The keys to sort the results by.
The order to sort the results by. Must be the same length as [sortingKeys]; one order per key.
ASC, ASC_NULLS_FIRST, ASC_NULLS_LAST, DESC, DESC_NULLS_FIRST, DESC_NULLS_LAST