Map spreadsheet columns to expiry fields with AI
post
https://api.expiryedge.com/v1/mapImportColumnsany role30/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/mapImportColumns' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"headers": [
"Doc Name",
"Renewal Date",
"Owner Email",
"Ph#",
"Row"
],
"sampleRows": [
{
"Doc Name": "Business License",
"Renewal Date": "15/10/2026",
"Owner Email": "priya@northwind-dental.com",
"Ph#": "+14155550123",
"Row": 1
}
]
}'Antwort
{
"success": true,
"mapping": {
"Doc Name": "name",
"Renewal Date": "expiry_date",
"Owner Email": "email",
"Ph#": "custom",
"Row": "ignore"
},
"custom_fields": [
{
"header": "Ph#",
"label": "Phone",
"type": "phone"
}
],
"date_format": "DD/MM/YYYY",
"confidence": "high",
"warnings": [],
"ai_scans": {
"used": 9,
"limit": 25,
"remaining": 16,
"resets_at": "2026-10-01T00:00:00.000Z"
}
}Uses 1 AI scan. Max 100 headers; only the first 5 sample rows are used and values are truncated to 80 chars. Each standard field is used at most once; unmatched useful columns map to custom.
When the monthly AI scan quota is used up it returns 429 with an AiScanQuotaError body.
headersarray of stringerforderlichmin items: 1 · max items: 100sampleRowsarray of objectsmax items: 5
200
Column mapping.
successbooleanmappingmap of stringOriginal header to target field.custom_fieldsarray of objectsOne entry for every header mapped tocustom.date_formatstring | nullconfidencestringErlaubthighmediumlowwarningsarray of stringmax items: 5ai_scansobjectAI scan quota after this call.
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
403 | The organization's plan does not include AI scans. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
500 | Unexpected server error. Retry later; quote requestId to support. |
