Skip to main content
POST
/
v2
/
imports
/
{import_id}
/
validate
Validate Import
const options = {
  method: 'POST',
  headers: {
    'x-organization-id': '<x-organization-id>',
    'x-api-key': '<api-key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({mapping: {}, value_mappings: {}})
};

fetch('https://api.dcycle.io/v2/imports/{import_id}/validate', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "import_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "total_rows": 123,
  "valid_rows": 123,
  "error_rows": 123,
  "page": 123,
  "page_size": 123,
  "total_pages": 123,
  "errors_by_column": {},
  "rows": [
    {
      "row_index": 123,
      "data": {},
      "errors": {}
    }
  ]
}

Authorizations

x-api-key
string
header
required

Headers

x-api-key
string
x-organization-id
string<uuid>
required

Path Parameters

import_id
string<uuid>
required

Query Parameters

page
integer
default:1
Required range: x >= 1
page_size
integer
default:50
Required range: 1 <= x <= 500
errors_only
boolean
default:false

Body

application/json

Mapping and optional value corrections chosen by the user before validation.

mapping
Mapping · object
required
value_mappings
Value Mappings · object

Optional user-provided corrections from the value-mapping UI. Shape: { column_key: { raw_value: canonical_value } }. Checked before alias resolution. Unrecognised canonical values pass through silently and will be caught by the validation step.

Response

Successful Response

Validation summary and paginated row results.

import_id
string<uuid>
required
total_rows
integer
required
valid_rows
integer
required
error_rows
integer
required
page
integer
required
page_size
integer
required
total_pages
integer
required
errors_by_column
Errors By Column · object
rows
ImportRowOut · object[]