Update Export Job Items
curl --request PUT \
--url https://external.pleo.io/v2/export-jobs/{jobId}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
[
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exportedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalUrl": "<string>",
"failureReason": "<string>"
}
]
'import requests
url = "https://external.pleo.io/v2/export-jobs/{jobId}/items"
payload = [
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exportedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalUrl": "<string>",
"failureReason": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify([
{
accountingEntryId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
exportedAt: '2023-11-07T05:31:56Z',
externalId: '<string>',
externalUrl: '<string>',
failureReason: '<string>'
}
])
};
fetch('https://external.pleo.io/v2/export-jobs/{jobId}/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/v2/export-jobs/{jobId}/items",
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([
[
'accountingEntryId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'exportedAt' => '2023-11-07T05:31:56Z',
'externalId' => '<string>',
'externalUrl' => '<string>',
'failureReason' => '<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/v2/export-jobs/{jobId}/items"
payload := strings.NewReader("[\n {\n \"accountingEntryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exportedAt\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"externalUrl\": \"<string>\",\n \"failureReason\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://external.pleo.io/v2/export-jobs/{jobId}/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("[\n {\n \"accountingEntryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exportedAt\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"externalUrl\": \"<string>\",\n \"failureReason\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v2/export-jobs/{jobId}/items")
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;charset=UTF-8'
request.body = "[\n {\n \"accountingEntryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exportedAt\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"externalUrl\": \"<string>\",\n \"failureReason\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"data": [
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exportJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"exportedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalUrl": "<string>",
"failureReason": "<string>",
"failureReasonType": "receipt_upload_failure"
}
],
"errors": [
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"type": "ACCOUNTING_ENTRY_DOES_NOT_EXIST"
}
]
}{
"type": "EXPORT_NOT_FOUND",
"message": "Export job not found."
}{
"type": "EXPORT_JOB_ITEMS_UPDATE_LIMIT",
"message": "Number of items to update is more than 100."
}{
"type": "EXPORT_JOB_STATUS_UNPROCESSABLE",
"message": "Export job is finished."
}Export API (v2)
Update Export Job Items
Update the status and other attributes of the export job items in batches of 100. This API only supports updating up to 100 items.
PUT
/
v2
/
export-jobs
/
{jobId}
/
items
Update Export Job Items
curl --request PUT \
--url https://external.pleo.io/v2/export-jobs/{jobId}/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
[
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exportedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalUrl": "<string>",
"failureReason": "<string>"
}
]
'import requests
url = "https://external.pleo.io/v2/export-jobs/{jobId}/items"
payload = [
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exportedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalUrl": "<string>",
"failureReason": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify([
{
accountingEntryId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
exportedAt: '2023-11-07T05:31:56Z',
externalId: '<string>',
externalUrl: '<string>',
failureReason: '<string>'
}
])
};
fetch('https://external.pleo.io/v2/export-jobs/{jobId}/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/v2/export-jobs/{jobId}/items",
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([
[
'accountingEntryId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'exportedAt' => '2023-11-07T05:31:56Z',
'externalId' => '<string>',
'externalUrl' => '<string>',
'failureReason' => '<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/v2/export-jobs/{jobId}/items"
payload := strings.NewReader("[\n {\n \"accountingEntryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exportedAt\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"externalUrl\": \"<string>\",\n \"failureReason\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://external.pleo.io/v2/export-jobs/{jobId}/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("[\n {\n \"accountingEntryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exportedAt\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"externalUrl\": \"<string>\",\n \"failureReason\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v2/export-jobs/{jobId}/items")
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;charset=UTF-8'
request.body = "[\n {\n \"accountingEntryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"exportedAt\": \"2023-11-07T05:31:56Z\",\n \"externalId\": \"<string>\",\n \"externalUrl\": \"<string>\",\n \"failureReason\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"data": [
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exportJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"exportedAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalUrl": "<string>",
"failureReason": "<string>",
"failureReasonType": "receipt_upload_failure"
}
],
"errors": [
{
"accountingEntryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"type": "ACCOUNTING_ENTRY_DOES_NOT_EXIST"
}
]
}{
"type": "EXPORT_NOT_FOUND",
"message": "Export job not found."
}{
"type": "EXPORT_JOB_ITEMS_UPDATE_LIMIT",
"message": "Number of items to update is more than 100."
}{
"type": "EXPORT_JOB_STATUS_UNPROCESSABLE",
"message": "Export job is finished."
}Authorizations
bearerAuthbasicAuth
JWT Bearer token authentication. Include the token in the Authorization header as: Bearer <token>
Path Parameters
Export Job ID
Body
application/json;charset=UTF-8
ID of the accounting entry being updated.
Status of the export Item after being processed.
Available options:
pending, in_progress, failed, successful, abandoned Date and time when the export job was initiated.
Pattern:
YYYY-MM-DDTHH:mi:ssZThe accounting system identifier of the entry after export.
URL to access the resource of the entry in the accounting system.
Detailed message explaining the failure.
If the export of this accounting entry failed, specify the failure reason type.
Available options:
receipt_upload_failure, receipt_download_failure, receipt_file_size_limit_exceeded, receipt_conversion_failure, unexpected_failure, invalid_configuration, missing_configuration, accounting_system_authentication_failure, accounting_system_rate_limit, accounting_system_unreachable, validation_failure, accounting_system_validation_failure, authorization_failure, accounting_system_timeout Was this page helpful?