Skip to main content
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": []
    }
  }
}
'
{
  "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
    }
  }
}

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

FieldRequiredDescription
nameYesConfiguration name
parserYesxml, headless_csv, csv, edi, txt
failure_strategyYesskip_resource or abort
settingsNoParser settings (e.g. delimiter, EDI separators)
pre_processorsNoSteps applied before parsing
automatic_processing_flowsYesFlows run automatically per record/row
manual_processing_flowsNoReusable flows invoked by other flows

Processing Model

Files are parsed, optionally pre-processed, then transformed by processing flows. Each flow contains ordered processing_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

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Body

application/json
data
object
required

Response

Import configuration created successfully

data
object