const options = {
method: 'POST',
headers: {
'x-organization-id': '<x-organization-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({mapping: {}})
};
fetch('https://api.dcycle.io/v2/imports/{import_id}/unique-values', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"columns": [
{
"column_key": "<string>",
"source_column": "<string>",
"total_unique": 123,
"values": [],
"truncated": false
}
]
}Return distinct raw values for mapped category columns in the import file.
const options = {
method: 'POST',
headers: {
'x-organization-id': '<x-organization-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({mapping: {}})
};
fetch('https://api.dcycle.io/v2/imports/{import_id}/unique-values', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"columns": [
{
"column_key": "<string>",
"source_column": "<string>",
"total_unique": 123,
"values": [],
"truncated": false
}
]
}Successful Response
Distinct raw source values for all mapped category columns.
Hide child attributes
Template column key for the category field.
Source column selected in the mapping for this template field.
Total distinct values found before the cap was applied.
Distinct non-empty raw values with auto-resolution results.
Hide child attributes
Original value from the user's file.
Whether the backend found a canonical match via alias resolution.
matched, unmatched Canonical system value after alias resolution, or null if unmatched.
True when distinct values exceeded the backend cap of 1000.