Undo an import
curl --request POST \
--url https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo"
req, _ := http.NewRequest("POST", 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))
}{
"message": "Undo started.",
"data": {
"id": "<string>",
"financial_account_id": "<string>",
"format": "<string>",
"filename": "<string>",
"status": "<string>",
"row_count": 123,
"imported_count": 123,
"duplicate_count": 123,
"skipped_count": 123,
"date_from": "<string>",
"date_to": "<string>",
"closing_balance": "<string>",
"closing_balance_date": "<string>",
"balance_result": "<string>",
"balance_adjustment": {
"amount": "<string>",
"transaction_id": "<string>"
},
"mapping": "<string>",
"mapping_source": "<string>",
"error": "<string>",
"created_at": "<string>",
"committed_at": "<string>",
"expires_at": "<string>",
"preview": {}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "Only a completed import can be undone."
}Undo an import
Removes the rows a COMPLETED batch wrote, taking them back from every destination that supports deletion,
in the background. Returns 202 with the batch UNDOING; poll it until it is UNDONE. An undo that FAILED
(a destination would not give a row back) can be started again; it continues where it stopped.
POST
/
finance
/
accounts
/
{accountId}
/
imports
/
{importId}
/
undo
Undo an import
curl --request POST \
--url https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://api.synci.io/api/v1/finance/accounts/{accountId}/imports/{importId}/undo"
req, _ := http.NewRequest("POST", 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))
}{
"message": "Undo started.",
"data": {
"id": "<string>",
"financial_account_id": "<string>",
"format": "<string>",
"filename": "<string>",
"status": "<string>",
"row_count": 123,
"imported_count": 123,
"duplicate_count": 123,
"skipped_count": 123,
"date_from": "<string>",
"date_to": "<string>",
"closing_balance": "<string>",
"closing_balance_date": "<string>",
"balance_result": "<string>",
"balance_adjustment": {
"amount": "<string>",
"transaction_id": "<string>"
},
"mapping": "<string>",
"mapping_source": "<string>",
"error": "<string>",
"created_at": "<string>",
"committed_at": "<string>",
"expires_at": "<string>",
"preview": {}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "Only a completed import can be undone."
}Authorizations
oauth2http
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The financial account ID
The import batch ID