API endpoints overviewImports
Create import
Create import
Creates a new import record with the validated data from your end-users. This endpoint stores the imported rows and associates them with a template.
What gets stored:
- Import metadata (template, file reference, timestamps)
- All validated rows and cells
- End-user information for compliance (if provided via session)
Template resolution:
- If
schema.idis provided, the template is looked up by ID - If not found or no ID provided, template is looked up by
schema.key - If no template exists, a new one is automatically created
curl -X POST "https://api.ivandt.com/v1/imports" \ -H "Content-Type: application/json" \ -d '{ "rows": [ { "property1": {}, "property2": {} } ], "meta": { "publicKey": "string", "sessionToken": "string", "schemaKey": "string", "sdkVersion": "string", "source": { "kind": "upload" }, "file": { "name": "string", "sizeBytes": 0, "formattedSize": "string" }, "sheet": { "rowCount": 0, "selectedSheetName": "string", "allSheetNames": [ "string" ] }, "counts": { "totalRows": 0, "validRows": 0, "erroredRows": 0, "discardedRows": 0 }, "timings": { "startedAt": "string", "finishedAt": "string" }, "environment": {} }, "originalSchema": { "property1": null, "property2": null } }'{
"id": "string",
"templateId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"fileId": {},
"meta": {
"publicKey": "string",
"sessionToken": "string",
"schemaId": "string",
"schemaKey": "string",
"sdkVersion": "string",
"source": {
"kind": "upload",
"referer": "string"
},
"file": {
"name": "string",
"fileId": "string",
"extension": "string",
"mime": "string",
"sizeBytes": 0,
"formattedSize": "string",
"lastModified": "string"
},
"sheet": {
"rowCount": 0,
"selectedSheetName": "string",
"allSheetNames": [
"string"
]
},
"counts": {
"totalRows": 0,
"validRows": 0,
"erroredRows": 0,
"discardedRows": 0
},
"timings": {
"startedAt": "string",
"finishedAt": "string"
},
"environment": {
"userAgent": "string",
"timezone": "string",
"platform": "web",
"runtime": "string"
}
}
}