Map spreadsheet columns to expiry fields with AI

posthttps://api.expiryedge.com/v1/mapImportColumns
any role30/minAny method
Request
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
    }
  ]
}'
Response
{
  "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.

Body parameters

application/json
  • headersarray of stringrequired
    min items: 1 · max items: 100
  • sampleRowsarray of objects
    max items: 5

Returns

200
Column mapping.
  • successboolean
  • mappingmap of string
    Original header to target field.
  • custom_fieldsarray of objects
    One entry for every header mapped to custom.
  • date_formatstring | null
  • confidencestring
    Allowedhighmediumlow
  • warningsarray of string
    max items: 5
  • ai_scansobject
    AI scan quota after this call.

Errors

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.