Import expiries from spreadsheet rows

posthttps://api.expiryedge.com/v1/bulkImportExpiries
editor or admin60/minIdempotency-KeyJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/bulkImportExpiries' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "records": [
    {
      "name": "Northwind Dental - State Dental License",
      "type": "License",
      "expiry_date": "2026-10-15",
      "priority": "High",
      "notification_email": "priya@northwinddental.com"
    },
    {
      "name": "Northwind Dental - Radiation Equipment Registration",
      "type": "Registration",
      "expiry_date": "2027-01-31",
      "value": "450",
      "currency": "USD"
    }
  ]
}'
Antwort
{
  "message": "2 expiries imported successfully",
  "successCount": 2,
  "errors": [],
  "warnings": [],
  "notificationWarnings": [],
  "missingContactEmails": [],
  "assignedTeamId": "team_3Fh8"
}

All-or-nothing, max 5000 rows. Rows with errors abort the whole import with 200 and aborted: true. An identical payload re-sent later replays the first result with deduped: true; 409 while it is still running.

Header

  • Idempotency-Keystring
    Optional client-generated key (1-255 characters of letters, digits, - _ : .).
    pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body-Parameter

application/json
  • recordsarray of objects
    min items: 1 · max items: 5000
  • expiriesarray of objects
    Alias of records.
    min items: 1 · max items: 5000
  • template_idstring
    Custom expiry template applied to every row; template columns are validated against it.

Rückgabe

200
Import result. Check aborted; when true nothing was written and errors lists every bad row.
  • messagestringerforderlich
  • successCountintegererforderlich
    Rows imported (0 when aborted).
  • errorsarray of stringerforderlich
    Per-row error messages (Row 3: Name is required).
  • abortedboolean
    True when any row failed validation; nothing was imported.
  • dedupedboolean
    True when this is a replay of an earlier identical import.
  • warningsarray of string
  • notificationWarningsarray of objects
  • missingContactEmailsarray of string
  • assignedTeamIdstring | null
    Default team the imported rows were assigned to.

Fehler

400
No rows, unknown template, bad token (401) or a failed commit (500, nothing written). errors repeats the message.
401
No rows, unknown template, bad token (401) or a failed commit (500, nothing written). errors repeats the message.
403
Role is viewer, or the import would exceed the plan's expiry limit (code: LIMIT_REACHED).
409
The same payload is already being imported by an earlier request.
413
More than 5000 rows (code: TOO_MANY_ROWS).
422
The Idempotency-Key was already used with a different request body.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
No rows, unknown template, bad token (401) or a failed commit (500, nothing written). errors repeats the message.