Update an import's mapping or options
curl --request PATCH \
--url https://beta.creatorcore.co/api/v2/imports/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"mapping": {},
"options": {
"overwrite": true,
"createMissingTags": true,
"addToTarget": true
}
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mapping: {},
options: {overwrite: true, createMissingTags: true, addToTarget: true}
})
};
fetch('https://beta.creatorcore.co/api/v2/imports/{id}', 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}"
payload = {
"mapping": {},
"options": {
"overwrite": True,
"createMissingTags": True,
"addToTarget": True
}
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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>"
}
}Imports
Update an import's mapping or options
Changes the column mapping (target field → column header; null unmaps) and / or options of a staged or previewed import, then re-runs the preview. Any change issues a new previewToken; older tokens stop working.
PATCH
/
api
/
v2
/
imports
/
{id}
Update an import's mapping or options
curl --request PATCH \
--url https://beta.creatorcore.co/api/v2/imports/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CreatorCore-Organization-Id: <api-key>' \
--data '
{
"mapping": {},
"options": {
"overwrite": true,
"createMissingTags": true,
"addToTarget": true
}
}
'const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-CreatorCore-Organization-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mapping: {},
options: {overwrite: true, createMissingTags: true, addToTarget: true}
})
};
fetch('https://beta.creatorcore.co/api/v2/imports/{id}', 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}"
payload = {
"mapping": {},
"options": {
"overwrite": True,
"createMissingTags": True,
"addToTarget": True
}
}
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(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>"
}
}Authorizations
Body
application/json
Was this page helpful?