Commit an import
curl --request POST \
--url https://beta.creatorcore.co/api/v2/imports/{id}/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"previewToken": "<string>"
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({previewToken: '<string>'})
};
fetch('https://beta.creatorcore.co/api/v2/imports/{id}/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/imports/{id}/commit"
payload = { "previewToken": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "creators",
"status": "staged",
"target": {
"type": "database",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"options": {},
"source": "inline",
"fileName": "<string>",
"fileSha256": "<string>",
"headers": [
"<string>"
],
"rowCount": 123,
"mapping": {},
"mappingConfidence": {},
"availableFields": [
{
"key": "<string>",
"label": "<string>"
}
],
"preview": {
"counts": {
"create": 123,
"merge": 123,
"skip": 123,
"error": 123
},
"duplicateGroups": [
{
"key": "<string>",
"rowIndexes": [
123
]
}
],
"attention": [
{
"rowIndex": 123,
"outcome": "skip",
"reason": "<string>"
}
],
"estimatedRefreshes": 123,
"unmappedHeaders": [
"<string>"
],
"missingRequired": [
"<string>"
]
},
"previewToken": "<string>",
"counts": {
"total": 123,
"processed": 123,
"succeeded": 123,
"failed": 123,
"skipped": 123,
"duplicate": 123,
"addedToTarget": 123,
"targetErrors": [
"<string>"
]
},
"error": "<string>",
"bulkImportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"previewedAt": "<string>",
"committedAt": "<string>",
"finishedAt": "<string>"
},
"alreadyCommitted": true,
"queuedRows": 123
}Imports
Commit an import
Queues the previewed import as a background job. previewToken must come from the latest GET or PATCH: a changed mapping, options, target or file returns 409 preview_token_mismatch. Plan limits are checked again here. Only rows the preview planned to create or merge are processed; merges fill empty fields unless options.overwrite, and nothing is ever deleted. Committing again returns the same job with alreadyCommitted: true. Poll GET /api/v2/imports/ for progress and GET /api/v2/imports//results for per-row outcomes.
POST
/
api
/
v2
/
imports
/
{id}
/
commit
Commit an import
curl --request POST \
--url https://beta.creatorcore.co/api/v2/imports/{id}/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"previewToken": "<string>"
}
'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({previewToken: '<string>'})
};
fetch('https://beta.creatorcore.co/api/v2/imports/{id}/commit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/imports/{id}/commit"
payload = { "previewToken": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"import": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "creators",
"status": "staged",
"target": {
"type": "database",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"options": {},
"source": "inline",
"fileName": "<string>",
"fileSha256": "<string>",
"headers": [
"<string>"
],
"rowCount": 123,
"mapping": {},
"mappingConfidence": {},
"availableFields": [
{
"key": "<string>",
"label": "<string>"
}
],
"preview": {
"counts": {
"create": 123,
"merge": 123,
"skip": 123,
"error": 123
},
"duplicateGroups": [
{
"key": "<string>",
"rowIndexes": [
123
]
}
],
"attention": [
{
"rowIndex": 123,
"outcome": "skip",
"reason": "<string>"
}
],
"estimatedRefreshes": 123,
"unmappedHeaders": [
"<string>"
],
"missingRequired": [
"<string>"
]
},
"previewToken": "<string>",
"counts": {
"total": 123,
"processed": 123,
"succeeded": 123,
"failed": 123,
"skipped": 123,
"duplicate": 123,
"addedToTarget": 123,
"targetErrors": [
"<string>"
]
},
"error": "<string>",
"bulkImportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"previewedAt": "<string>",
"committedAt": "<string>",
"finishedAt": "<string>"
},
"alreadyCommitted": true,
"queuedRows": 123
}Authorizations
Body
application/json
Was this page helpful?