Skip to main content

Error Codes

All Klervex API errors use the KLV_ prefix followed by a category and number.

Error Format

{
"error": {
"code": "KLV_VALIDATION_001",
"message": "Human-readable error description",
"field": "path.to.field"
}
}

Authentication Errors

CodeHTTP StatusDescription
KLV_AUTH_001401Missing or invalid API key
KLV_AUTH_002401API key expired or revoked
KLV_AUTH_003403Insufficient permissions

Validation Errors

CodeHTTP StatusDescription
KLV_VALIDATION_001400HS code not found in destination country tariff
KLV_VALIDATION_002400Party matches sanctions list entry
KLV_VALIDATION_003400Invalid port code (not in UN/LOCODE)
KLV_VALIDATION_004400Incoterms mismatch with transport mode
KLV_VALIDATION_005400Required field missing
KLV_VALIDATION_006400Total value does not match line items
KLV_VALIDATION_007400Country-specific rule violation

Extraction Errors

CodeHTTP StatusDescription
KLV_EXTRACT_001400Unsupported file format
KLV_EXTRACT_002422Could not extract data from document
KLV_EXTRACT_003413File too large (max 10MB)

Document Errors

CodeHTTP StatusDescription
KLV_DOC_001400Shipment not validated — validate before generating
KLV_DOC_002400Unsupported document type
KLV_DOC_003500Document generation failed

Resource Errors

CodeHTTP StatusDescription
KLV_NOT_FOUND404Resource not found
KLV_CONFLICT409Resource already exists

Rate Limit Errors

CodeHTTP StatusDescription
KLV_RATE_001429API rate limit exceeded
KLV_QUOTA_001429Daily extraction quota exceeded
KLV_QUOTA_002429Daily validation quota exceeded