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>",
"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_strategy": "<string>",
"amount_type_inflow_value": "<string>"
}
'import requests
url = "https://app.sure.am/api/v1/imports"
payload = {
"raw_file_content": "<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_strategy": "<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>',
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_strategy: '<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>',
'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_strategy' => '<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 \"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_strategy\": \"<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 \"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_strategy\": \"<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 \"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_strategy\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"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>",
"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>",
"number_format": "<string>",
"signage_convention": "<string>",
"col_sep": "<string>",
"amount_type_strategy": "<string>",
"amount_type_inflow_value": "<string>"
},
"stats": {
"rows_count": 1,
"valid_rows_count": 1
}
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}Create import
Create a new import from raw CSV content.
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>",
"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_strategy": "<string>",
"amount_type_inflow_value": "<string>"
}
'import requests
url = "https://app.sure.am/api/v1/imports"
payload = {
"raw_file_content": "<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_strategy": "<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>',
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_strategy: '<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>',
'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_strategy' => '<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 \"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_strategy\": \"<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 \"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_strategy\": \"<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 \"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_strategy\": \"<string>\",\n \"amount_type_inflow_value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>",
"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>",
"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>",
"number_format": "<string>",
"signage_convention": "<string>",
"col_sep": "<string>",
"amount_type_strategy": "<string>",
"amount_type_inflow_value": "<string>"
},
"stats": {
"rows_count": 1,
"valid_rows_count": 1
}
}
}{
"error": "<string>",
"message": "<string>",
"details": [
"<string>"
]
}Authorizations
API key for authentication. Generate one from your account settings.
Body
The raw CSV content as a string
Import type (defaults to TransactionImport)
TransactionImport, TradeImport, AccountImport, MintImport, CategoryImport, RuleImport, PdfImport, QifImport, SureImport Account ID to import into
Set to "true" to automatically queue for processing if configuration is valid
Header name for the date column
Header name for the amount column
Header name for the transaction name column
Header name for the category column
Header name for the tags column
Header name for the notes column
Header name for the account column
Header name for the quantity column (trade imports)
Header name for the ticker column (trade imports)
Header name for the price column (trade imports)
Header name for the entity type column (account imports)
Header name for the currency column
Header name for the exchange MIC column (trade imports)
Date format pattern (e.g., "%m/%d/%Y")
Number format for parsing amounts
1,234.56, 1.234,56, 1 234,56, 1,234 How to interpret positive/negative amounts
inflows_positive, inflows_negative Column separator
,, ; Strategy for determining transaction direction
Value that indicates an inflow when using column-based amount type strategy
Response
import created
Show child attributes
Show child attributes
Was this page helpful?