Create an import configuration
curl --request POST \
--url https://clarus-api.com/api/import_configurations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "import_configurations",
"attributes": {
"name": "Acme Orders CSV",
"parser": "csv",
"failure_strategy": "skip_resource",
"settings": [
{
"setting_type": "delimiter",
"value": ","
}
],
"pre_processors": [],
"automatic_processing_flows": [
{
"code": "process_line",
"name": "Process Line",
"processing_actions": [
{
"action": "find_resource",
"configuration": {
"resource_name": "account",
"resource_attribute": "code",
"index": "AccountCode"
}
}
]
}
],
"manual_processing_flows": []
}
}
}
'import requests
url = "https://clarus-api.com/api/import_configurations"
payload = { "data": {
"type": "import_configurations",
"attributes": {
"name": "Acme Orders CSV",
"parser": "csv",
"failure_strategy": "skip_resource",
"settings": [
{
"setting_type": "delimiter",
"value": ","
}
],
"pre_processors": [],
"automatic_processing_flows": [
{
"code": "process_line",
"name": "Process Line",
"processing_actions": [
{
"action": "find_resource",
"configuration": {
"resource_name": "account",
"resource_attribute": "code",
"index": "AccountCode"
}
}
]
}
],
"manual_processing_flows": []
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'import_configurations',
attributes: {
name: 'Acme Orders CSV',
parser: 'csv',
failure_strategy: 'skip_resource',
settings: [{setting_type: 'delimiter', value: ','}],
pre_processors: [],
automatic_processing_flows: [
{
code: 'process_line',
name: 'Process Line',
processing_actions: [
{
action: 'find_resource',
configuration: {resource_name: 'account', resource_attribute: 'code', index: 'AccountCode'}
}
]
}
],
manual_processing_flows: []
}
}
})
};
fetch('https://clarus-api.com/api/import_configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"type": "import_configurations",
"attributes": {
"name": "Acme Orders CSV",
"parser": "csv",
"failure_strategy": "skip_resource",
"configuration": {
"settings": [],
"pre_processors": [],
"automatic_processing_flows": [],
"manual_processing_flows": []
},
"version": 1
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Import Configurations
Create an import configuration
Create a configuration describing how to parse and transform an external import file.
POST
/
api
/
import_configurations
Create an import configuration
curl --request POST \
--url https://clarus-api.com/api/import_configurations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "import_configurations",
"attributes": {
"name": "Acme Orders CSV",
"parser": "csv",
"failure_strategy": "skip_resource",
"settings": [
{
"setting_type": "delimiter",
"value": ","
}
],
"pre_processors": [],
"automatic_processing_flows": [
{
"code": "process_line",
"name": "Process Line",
"processing_actions": [
{
"action": "find_resource",
"configuration": {
"resource_name": "account",
"resource_attribute": "code",
"index": "AccountCode"
}
}
]
}
],
"manual_processing_flows": []
}
}
}
'import requests
url = "https://clarus-api.com/api/import_configurations"
payload = { "data": {
"type": "import_configurations",
"attributes": {
"name": "Acme Orders CSV",
"parser": "csv",
"failure_strategy": "skip_resource",
"settings": [
{
"setting_type": "delimiter",
"value": ","
}
],
"pre_processors": [],
"automatic_processing_flows": [
{
"code": "process_line",
"name": "Process Line",
"processing_actions": [
{
"action": "find_resource",
"configuration": {
"resource_name": "account",
"resource_attribute": "code",
"index": "AccountCode"
}
}
]
}
],
"manual_processing_flows": []
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'import_configurations',
attributes: {
name: 'Acme Orders CSV',
parser: 'csv',
failure_strategy: 'skip_resource',
settings: [{setting_type: 'delimiter', value: ','}],
pre_processors: [],
automatic_processing_flows: [
{
code: 'process_line',
name: 'Process Line',
processing_actions: [
{
action: 'find_resource',
configuration: {resource_name: 'account', resource_attribute: 'code', index: 'AccountCode'}
}
]
}
],
manual_processing_flows: []
}
}
})
};
fetch('https://clarus-api.com/api/import_configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"type": "import_configurations",
"attributes": {
"name": "Acme Orders CSV",
"parser": "csv",
"failure_strategy": "skip_resource",
"configuration": {
"settings": [],
"pre_processors": [],
"automatic_processing_flows": [],
"manual_processing_flows": []
},
"version": 1
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "import_configurations",
"attributes": {
"name": "Acme Orders CSV",
"parser": "csv",
"failure_strategy": "skip_resource",
"settings": [ { "setting_type": "delimiter", "value": "," } ],
"automatic_processing_flows": [
{ "code": "process_line", "name": "Process Line", "processing_actions": [
{ "action": "find_resource", "configuration": { "resource_name": "account", "resource_attribute": "code", "index": "AccountCode" } }
] }
]
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Configuration name |
parser | Yes | xml, headless_csv, csv, edi, txt |
failure_strategy | Yes | skip_resource or abort |
settings | No | Parser settings (e.g. delimiter, EDI separators) |
pre_processors | No | Steps applied before parsing |
automatic_processing_flows | Yes | Flows run automatically per record/row |
manual_processing_flows | No | Reusable flows invoked by other flows |
Processing Model
Files are parsed, optionally pre-processed, then transformed by processing flows. Each flow contains orderedprocessing_actions (e.g. find_resource, build_resource, build_nested_resource) whose configuration is action-specific. See the importing module docs for full action configuration details.Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
Import configuration created successfully
Show child attributes
Show child attributes
⌘I

