curl --request POST \
--url https://app.sure.am/api/v1/imports \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"raw_file_content": "<string>",
"file": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": "<string>",
"date_col_label": "<string>",
"amount_col_label": "<string>",
"name_col_label": "<string>",
"category_col_label": "<string>",
"tags_col_label": "<string>",
"notes_col_label": "<string>",
"account_col_label": "<string>",
"qty_col_label": "<string>",
"ticker_col_label": "<string>",
"price_col_label": "<string>",
"entity_type_col_label": "<string>",
"currency_col_label": "<string>",
"exchange_operating_mic_col_label": "<string>",
"date_format": "<string>",
"amount_type_inflow_value": "<string>"
}
'import requests
url = "https://app.sure.am/api/v1/imports"
payload = {
"raw_file_content": "<string>",
"file": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": "<string>",
"date_col_label": "<string>",
"amount_col_label": "<string>",
"name_col_label": "<string>",
"category_col_label": "<string>",
"tags_col_label": "<string>",
"notes_col_label": "<string>",
"account_col_label": "<string>",
"qty_col_label": "<string>",
"ticker_col_label": "<string>",
"price_col_label": "<string>",
"entity_type_col_label": "<string>",
"currency_col_label": "<string>",
"exchange_operating_mic_col_label": "<string>",
"date_format": "<string>",
"amount_type_inflow_value": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
raw_file_content: '<string>',
file: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
publish: '<string>',
date_col_label: '<string>',
amount_col_label: '<string>',
name_col_label: '<string>',
category_col_label: '<string>',
tags_col_label: '<string>',
notes_col_label: '<string>',
account_col_label: '<string>',
qty_col_label: '<string>',
ticker_col_label: '<string>',
price_col_label: '<string>',
entity_type_col_label: '<string>',
currency_col_label: '<string>',
exchange_operating_mic_col_label: '<string>',
date_format: '<string>',
amount_type_inflow_value: '<string>'
})
};
fetch('https://app.sure.am/api/v1/imports', 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://app.sure.am/api/v1/imports",
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([
'raw_file_content' => '<string>',
'file' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'publish' => '<string>',
'date_col_label' => '<string>',
'amount_col_label' => '<string>',
'name_col_label' => '<string>',
'category_col_label' => '<string>',
'tags_col_label' => '<string>',
'notes_col_label' => '<string>',
'account_col_label' => '<string>',
'qty_col_label' => '<string>',
'ticker_col_label' => '<string>',
'price_col_label' => '<string>',
'entity_type_col_label' => '<string>',
'currency_col_label' => '<string>',
'exchange_operating_mic_col_label' => '<string>',
'date_format' => '<string>',
'amount_type_inflow_value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://app.sure.am/api/v1/imports"
payload := strings.NewReader("{\n \"raw_file_content\": \"<string>\",\n \"file\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": \"<string>\",\n \"date_col_label\": \"<string>\",\n \"amount_col_label\": \"<string>\",\n \"name_col_label\": \"<string>\",\n \"category_col_label\": \"<string>\",\n \"tags_col_label\": \"<string>\",\n \"notes_col_label\": \"<string>\",\n \"account_col_label\": \"<string>\",\n \"qty_col_label\": \"<string>\",\n \"ticker_col_label\": \"<string>\",\n \"price_col_label\": \"<string>\",\n \"entity_type_col_label\": \"<string>\",\n \"currency_col_label\": \"<string>\",\n \"exchange_operating_mic_col_label\": \"<string>\",\n \"date_format\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sure.am/api/v1/imports")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"raw_file_content\": \"<string>\",\n \"file\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": \"<string>\",\n \"date_col_label\": \"<string>\",\n \"amount_col_label\": \"<string>\",\n \"name_col_label\": \"<string>\",\n \"category_col_label\": \"<string>\",\n \"tags_col_label\": \"<string>\",\n \"notes_col_label\": \"<string>\",\n \"account_col_label\": \"<string>\",\n \"qty_col_label\": \"<string>\",\n \"ticker_col_label\": \"<string>\",\n \"price_col_label\": \"<string>\",\n \"entity_type_col_label\": \"<string>\",\n \"currency_col_label\": \"<string>\",\n \"exchange_operating_mic_col_label\": \"<string>\",\n \"date_format\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"raw_file_content\": \"<string>\",\n \"file\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": \"<string>\",\n \"date_col_label\": \"<string>\",\n \"amount_col_label\": \"<string>\",\n \"name_col_label\": \"<string>\",\n \"category_col_label\": \"<string>\",\n \"tags_col_label\": \"<string>\",\n \"notes_col_label\": \"<string>\",\n \"account_col_label\": \"<string>\",\n \"qty_col_label\": \"<string>\",\n \"ticker_col_label\": \"<string>\",\n \"price_col_label\": \"<string>\",\n \"entity_type_col_label\": \"<string>\",\n \"currency_col_label\": \"<string>\",\n \"exchange_operating_mic_col_label\": \"<string>\",\n \"date_format\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "TransactionImport",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status_detail": {
"uploaded": true,
"configured": true,
"terminal": true,
"cleaned": true,
"publishable": true,
"revertable": true
},
"configuration": {
"date_col_label": "<string>",
"amount_col_label": "<string>",
"name_col_label": "<string>",
"category_col_label": "<string>",
"tags_col_label": "<string>",
"notes_col_label": "<string>",
"account_col_label": "<string>",
"date_format": "<string>",
"number_format": "<string>",
"signage_convention": "<string>"
},
"stats": {
"rows_count": 1,
"valid_rows_count": 1,
"invalid_rows_count": 1,
"mappings_count": 1,
"unassigned_mappings_count": 1
},
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"verification": {
"expected_record_counts": {},
"readback": {
"status": "not_verified",
"checked_at": "2023-11-07T05:31:56Z",
"expected_record_counts": {},
"before_counts": {},
"after_counts": {},
"actual_delta_counts": {},
"checked_counts": {},
"mismatches": {},
"error": "<string>"
}
}
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "<string>",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>"
}Create import
Create a new import from raw CSV content, inline Sure NDJSON content, or an uploaded Sure NDJSON file. CSV content is limited to 10MB.
curl --request POST \
--url https://app.sure.am/api/v1/imports \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"raw_file_content": "<string>",
"file": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": "<string>",
"date_col_label": "<string>",
"amount_col_label": "<string>",
"name_col_label": "<string>",
"category_col_label": "<string>",
"tags_col_label": "<string>",
"notes_col_label": "<string>",
"account_col_label": "<string>",
"qty_col_label": "<string>",
"ticker_col_label": "<string>",
"price_col_label": "<string>",
"entity_type_col_label": "<string>",
"currency_col_label": "<string>",
"exchange_operating_mic_col_label": "<string>",
"date_format": "<string>",
"amount_type_inflow_value": "<string>"
}
'import requests
url = "https://app.sure.am/api/v1/imports"
payload = {
"raw_file_content": "<string>",
"file": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publish": "<string>",
"date_col_label": "<string>",
"amount_col_label": "<string>",
"name_col_label": "<string>",
"category_col_label": "<string>",
"tags_col_label": "<string>",
"notes_col_label": "<string>",
"account_col_label": "<string>",
"qty_col_label": "<string>",
"ticker_col_label": "<string>",
"price_col_label": "<string>",
"entity_type_col_label": "<string>",
"currency_col_label": "<string>",
"exchange_operating_mic_col_label": "<string>",
"date_format": "<string>",
"amount_type_inflow_value": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
raw_file_content: '<string>',
file: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
publish: '<string>',
date_col_label: '<string>',
amount_col_label: '<string>',
name_col_label: '<string>',
category_col_label: '<string>',
tags_col_label: '<string>',
notes_col_label: '<string>',
account_col_label: '<string>',
qty_col_label: '<string>',
ticker_col_label: '<string>',
price_col_label: '<string>',
entity_type_col_label: '<string>',
currency_col_label: '<string>',
exchange_operating_mic_col_label: '<string>',
date_format: '<string>',
amount_type_inflow_value: '<string>'
})
};
fetch('https://app.sure.am/api/v1/imports', 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://app.sure.am/api/v1/imports",
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([
'raw_file_content' => '<string>',
'file' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'publish' => '<string>',
'date_col_label' => '<string>',
'amount_col_label' => '<string>',
'name_col_label' => '<string>',
'category_col_label' => '<string>',
'tags_col_label' => '<string>',
'notes_col_label' => '<string>',
'account_col_label' => '<string>',
'qty_col_label' => '<string>',
'ticker_col_label' => '<string>',
'price_col_label' => '<string>',
'entity_type_col_label' => '<string>',
'currency_col_label' => '<string>',
'exchange_operating_mic_col_label' => '<string>',
'date_format' => '<string>',
'amount_type_inflow_value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://app.sure.am/api/v1/imports"
payload := strings.NewReader("{\n \"raw_file_content\": \"<string>\",\n \"file\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": \"<string>\",\n \"date_col_label\": \"<string>\",\n \"amount_col_label\": \"<string>\",\n \"name_col_label\": \"<string>\",\n \"category_col_label\": \"<string>\",\n \"tags_col_label\": \"<string>\",\n \"notes_col_label\": \"<string>\",\n \"account_col_label\": \"<string>\",\n \"qty_col_label\": \"<string>\",\n \"ticker_col_label\": \"<string>\",\n \"price_col_label\": \"<string>\",\n \"entity_type_col_label\": \"<string>\",\n \"currency_col_label\": \"<string>\",\n \"exchange_operating_mic_col_label\": \"<string>\",\n \"date_format\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sure.am/api/v1/imports")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"raw_file_content\": \"<string>\",\n \"file\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": \"<string>\",\n \"date_col_label\": \"<string>\",\n \"amount_col_label\": \"<string>\",\n \"name_col_label\": \"<string>\",\n \"category_col_label\": \"<string>\",\n \"tags_col_label\": \"<string>\",\n \"notes_col_label\": \"<string>\",\n \"account_col_label\": \"<string>\",\n \"qty_col_label\": \"<string>\",\n \"ticker_col_label\": \"<string>\",\n \"price_col_label\": \"<string>\",\n \"entity_type_col_label\": \"<string>\",\n \"currency_col_label\": \"<string>\",\n \"exchange_operating_mic_col_label\": \"<string>\",\n \"date_format\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sure.am/api/v1/imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"raw_file_content\": \"<string>\",\n \"file\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"publish\": \"<string>\",\n \"date_col_label\": \"<string>\",\n \"amount_col_label\": \"<string>\",\n \"name_col_label\": \"<string>\",\n \"category_col_label\": \"<string>\",\n \"tags_col_label\": \"<string>\",\n \"notes_col_label\": \"<string>\",\n \"account_col_label\": \"<string>\",\n \"qty_col_label\": \"<string>\",\n \"ticker_col_label\": \"<string>\",\n \"price_col_label\": \"<string>\",\n \"entity_type_col_label\": \"<string>\",\n \"currency_col_label\": \"<string>\",\n \"exchange_operating_mic_col_label\": \"<string>\",\n \"date_format\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "TransactionImport",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"status_detail": {
"uploaded": true,
"configured": true,
"terminal": true,
"cleaned": true,
"publishable": true,
"revertable": true
},
"configuration": {
"date_col_label": "<string>",
"amount_col_label": "<string>",
"name_col_label": "<string>",
"category_col_label": "<string>",
"tags_col_label": "<string>",
"notes_col_label": "<string>",
"account_col_label": "<string>",
"date_format": "<string>",
"number_format": "<string>",
"signage_convention": "<string>"
},
"stats": {
"rows_count": 1,
"valid_rows_count": 1,
"invalid_rows_count": 1,
"mappings_count": 1,
"unassigned_mappings_count": 1
},
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"verification": {
"expected_record_counts": {},
"readback": {
"status": "not_verified",
"checked_at": "2023-11-07T05:31:56Z",
"expected_record_counts": {},
"before_counts": {},
"after_counts": {},
"actual_delta_counts": {},
"checked_counts": {},
"mismatches": {},
"error": "<string>"
}
}
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"errors": [
"<string>"
]
}{
"error": "<string>",
"import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>"
}Authorizations
API key for authentication. Generate one from your account settings.
Body
Raw CSV or Sure NDJSON content as a string. CSV content is limited to 10MB. Required for SureImport unless a multipart file is uploaded.
CSV or Sure NDJSON upload when using multipart/form-data. CSV files are limited to 10MB.
Import type (defaults to TransactionImport)
TransactionImport, TradeImport, AccountImport, MintImport, ActualImport, YnabImport, CategoryImport, RuleImport, MerchantImport, PdfImport, QifImport, SureImport Account ID to import into
Set to "true" to automatically queue for processing if configuration is valid
CSV imports only. Header name for the date column
CSV imports only. Header name for the amount column
CSV imports only. Header name for the transaction name column
CSV imports only. Header name for the category column
CSV imports only. Header name for the tags column
CSV imports only. Header name for the notes column
CSV imports only. Header name for the account column when importing rows across multiple accounts
CSV trade imports only. Header name for the quantity column
CSV trade imports only. Header name for the ticker column
CSV trade imports only. Header name for the price column
CSV imports only. Header name for the entity type column
CSV imports only. Header name for the currency column
CSV trade imports only. Header name for the exchange operating MIC column
CSV imports only. Date format pattern (e.g., "%m/%d/%Y")
CSV imports only. Number format for parsing amounts
1,234.56, 1.234,56, 1 234,56, 1,234 CSV imports only. How to interpret positive/negative amounts
inflows_positive, inflows_negative CSV imports only. Column separator
,, ; CSV imports only. Amount parsing strategy
signed_amount, custom_column CSV imports only. Column value that marks an amount as an inflow when using custom_column strategy
Response
import created
Show child attributes
Show child attributes
Was this page helpful?