Confirm and execute a previously validated customer import. Calls POST /customers
(CREATE) for every valid row.
Inputs
import_id— from the/validateresponse. Must still be valid (sessions expire after 30 min).override— no-op for customers: validate never emitswarningrows since the DB enforces no uniqueness on customer name or VAT, so there is nothing to UPDATE.resolutions— not applicable to customers.
Behaviour per row status
| status | confirm action |
|---|---|
valid |
CREATE |
error |
skipped (reason: error) |
Atomicity — non-atomic: failures during creation are reported per-row; rows that succeeded before the failure are kept.
Body
Required
-
Import session ID from the validate response. Sessions expire after 30 min.
-
When
true, all rows with statuswarningare UPDATEd using the CSV values (existing entity is looked up by email/name and overwritten field-by-field). Whenfalseor omitted, warning rows are skipped.Default value is
false. -
Per-row organization choices for
ambiguousrows, keyed by row number as a string (e.g."7"). The chosenorganization_idmust be one of thecandidates[].logto_idvalues returned by/import/validatefor that row. Ambiguous rows without a resolution are skipped.
curl \
--request POST 'https://collect.your-domain.com/api/customers/import/confirm' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"import_id":"3312b187-a8b0-45f5-b23a-98798b64eb31","override":true,"resolutions":{"7":{"organization_id":"abc123"}}}'
{
"import_id": "3312b187-a8b0-45f5-b23a-98798b64eb31",
"override": true,
"resolutions": {
"7": {
"organization_id": "abc123"
}
}
}
{
"code": 200,
"message": "customers imported successfully",
"data": {
"created": 2,
"updated": 1,
"skipped": 2,
"failed": 1,
"results": [
{
"row_number": 2,
"status": "created",
"id": "usr_2k3lf9d8sn"
},
{
"row_number": 3,
"status": "created",
"id": "usr_8skd0w29df"
},
{
"row_number": 4,
"status": "skipped",
"reason": "error"
},
{
"row_number": 5,
"status": "skipped",
"reason": "error"
},
{
"row_number": 6,
"status": "updated",
"id": "usr_existing01"
},
{
"row_number": 7,
"status": "failed",
"error": "logto sync failed: rate limit exceeded"
}
]
}
}
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
{
"code": 401,
"message": "invalid token",
"data": {}
}
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}