Skip to content
Soljio Docs
Esc
↑↓navigate↵open⌘Jpreview

Apply a validated batch of parsed CSV rows; inspect returned row issues and batch status.

Apply a validated batch of parsed CSV rows; inspect returned row issues and batch status. Requires imports.write. All writes require Idempotency-Key; x-scope-rules declares additional grants by input condition.

POST/commands/apply_import
Authorization
AuthorizationBearer token (soljio_sk_<secret>) · headerrequired

Organization-scoped service token created by an owner/admin. Scope requirements are in x-required-scopes; these are service-token grants, not OAuth scopes. Revoked, expired, unknown and suspended-organization credentials all return 401.

Header parameters
Idempotency-Keystringrequired

Persist with the job and reuse for retries. Scoped to organization, token, command and API version. Different input with the same key returns 409. Supported automatic retry window: 24 hours.

min length 1 · max length 128 · matches ^[!-~]+$
Request body
requiredapplication/json
kindstringrequired
Show properties
Any of:
string
string
string
string
string
string
string
string
string
string
string
string
rowsobject[]required
Show properties
Array of object
row_numbernumberrequired
valuesobjectrequired
source_filenamestring
Responses
200

Successful command; replay returns the original result.

dataobjectrequired
Show properties
batch_idstring

Opaque Soljio resource ID.

min length 1
created_recordsobject[]required
Show properties
Array of object
idstringrequired
row_numbernumberrequired
tablestringrequired
dry_runbooleanrequired
issuesobject[]required
Show properties
Array of object
codestringrequired
fieldstring
messagestringrequired
row_numbernumberrequired
severitystringrequired
Show properties
Any of:
string
string
string
string
rowsobject[]required
Show properties
Array of object
actionstringrequired
Show properties
Any of:
string
string
string
string
string
string
string
string
labelstringrequired
row_numbernumberrequired
targetstringrequired
summaryobjectrequired
Show properties
error_countnumberrequired
failure_countnumberrequired
row_countnumberrequired
skipped_countnumberrequired
success_countnumberrequired
warning_countnumberrequired
idempotent_replaybooleanrequired
request_idstring<uuid>required
400

invalid_request

errorobjectrequired
Show properties
codestringrequired
Allowed:invalid_request
messagestringrequired
request_idstring<uuid>required
401

unauthorized

errorobjectrequired
Show properties
codestringrequired
Allowed:unauthorized
messagestringrequired
request_idstring<uuid>required
403

forbidden

errorobjectrequired
Show properties
codestringrequired
Allowed:forbidden
messagestringrequired
request_idstring<uuid>required
404

not_found

errorobjectrequired
Show properties
codestringrequired
Allowed:not_found
messagestringrequired
request_idstring<uuid>required
405

method_not_allowed

errorobjectrequired
Show properties
codestringrequired
Allowed:method_not_allowed
messagestringrequired
request_idstring<uuid>required
409

conflict, idempotency_conflict

errorobjectrequired
Show properties
codestringrequired
Allowed:conflictidempotency_conflict
messagestringrequired
request_idstring<uuid>required
413

payload_too_large

errorobjectrequired
Show properties
codestringrequired
Allowed:payload_too_large
messagestringrequired
request_idstring<uuid>required
415

unsupported_media_type

errorobjectrequired
Show properties
codestringrequired
Allowed:unsupported_media_type
messagestringrequired
request_idstring<uuid>required
429

rate_limited

errorobjectrequired
Show properties
codestringrequired
Allowed:rate_limited
messagestringrequired
request_idstring<uuid>required
500

internal_error

errorobjectrequired
Show properties
codestringrequired
Allowed:internal_error
messagestringrequired
request_idstring<uuid>required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.soljio.com/v0/commands/apply_import' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Idempotency-Key: string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "kind": "households",
  "rows": [
    {
      "row_number": 0,
      "values": {
        "property1": "string",
        "property2": "string"
      }
    }
  ],
  "source_filename": "string"
}'
Response
{
  "data": {
    "batch_id": "string",
    "created_records": [
      {
        "id": "string",
        "row_number": 0,
        "table": "string"
      }
    ],
    "dry_run": true,
    "issues": [
      {
        "code": "string",
        "field": "string",
        "message": "string",
        "row_number": 0,
        "severity": "error"
      }
    ],
    "rows": [
      {
        "action": "create",
        "label": "string",
        "row_number": 0,
        "target": "string"
      }
    ],
    "summary": {
      "error_count": 0,
      "failure_count": 0,
      "row_count": 0,
      "skipped_count": 0,
      "success_count": 0,
      "warning_count": 0
    }
  },
  "idempotent_replay": true,
  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846"
}