Skip to main content

Error Codes Reference

Complete reference of GoRoute API error codes and how to resolve them.

HTTP Status Codes​

Success Codes​

CodeMeaningDescription
200OKRequest successful
201CreatedResource created successfully
202AcceptedRequest accepted for processing
204No ContentRequest successful, no content to return

Client Error Codes​

CodeMeaningDescriptionAction
400Bad RequestInvalid request format or parametersFix request and retry
401UnauthorizedInvalid or missing API keyCheck API key
403ForbiddenInsufficient permissionsContact support
404Not FoundResource doesn't existCheck ID/endpoint
405Method Not AllowedWrong HTTP methodUse correct method
409ConflictResource conflict (duplicate)Use different ID
415Unsupported Media TypeWrong Content-TypeSet correct header
422Unprocessable EntityValidation failedFix data and retry
429Too Many RequestsRate limit exceededWait and retry

Server Error Codes​

CodeMeaningDescriptionAction
500Internal Server ErrorUnexpected errorRetry, contact support if persists
502Bad GatewayUpstream service errorRetry after delay
503Service UnavailableTemporarily unavailableRetry after delay
504Gateway TimeoutRequest timed outRetry with smaller payload

API Error Codes​

Authentication Errors (AUTH_xxx)​

CodeMessageDescriptionResolution
AUTH_001Invalid API keyAPI key is malformed or invalidCheck API key format
AUTH_002API key expiredAPI key has been revokedGenerate new key in dashboard
AUTH_003API key disabledKey temporarily disabledContact support
AUTH_004Insufficient permissionsKey lacks required scopeRequest permission upgrade
AUTH_005IP not allowedRequest from unauthorized IPAdd IP to allowlist
{
"error": {
"code": "AUTH_001",
"message": "Invalid API key",
"details": "The provided API key does not match any active keys"
}
}

Validation Errors (VAL_xxx)​

CodeMessageDescriptionResolution
VAL_001Invalid XMLXML is malformedFix XML syntax
VAL_002Schema validation failedDoesn't match UBL schemaFix structure
VAL_003Schematron errorBusiness rule violationFix business rule
VAL_004Invalid identifierPeppol ID format wrongCheck scheme/ID format
VAL_005Invalid document typeUnsupported document typeUse supported type
VAL_006Invalid date formatDate not ISO 8601Use YYYY-MM-DD
VAL_007Amount mismatchTotals don't calculateFix line/tax totals
VAL_008Missing required fieldRequired field emptyAdd required field
VAL_009Invalid currencyCurrency code invalidUse ISO 4217 code
VAL_010Invalid country codeCountry code invalidUse ISO 3166-1 alpha-2
{
"error": {
"code": "VAL_003",
"message": "Schematron validation failed",
"details": [
{
"rule": "BR-16",
"severity": "error",
"message": "Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110)",
"location": "/Invoice/cac:LegalMonetaryTotal"
}
]
}
}

Participant Errors (PART_xxx)​

CodeMessageDescriptionResolution
PART_001Participant not foundNot registered on PeppolVerify identifier
PART_002Participant not activeRegistration inactiveContact recipient
PART_003Invalid schemeScheme not recognizedUse valid scheme code
PART_004Capability not supportedDocument type not supportedCheck SMP registration
PART_005SMP lookup failedCould not query SMPRetry, contact support
{
"error": {
"code": "PART_001",
"message": "Participant not found",
"details": {
"scheme": "0192",
"identifier": "123456789",
"suggestion": "Verify the identifier with the recipient"
}
}
}

Transaction Errors (TX_xxx)​

CodeMessageDescriptionResolution
TX_001Duplicate transactionTransaction ID already existsUse different ID
TX_002Transaction not foundTransaction ID doesn't existCheck transaction ID
TX_003Transaction expiredTransaction too old to modifyCreate new transaction
TX_004Invalid stateCannot perform action in current stateWait or check status
TX_005Delivery failedDocument could not be deliveredCheck error details
TX_006TimeoutProcessing timed outRetry
{
"error": {
"code": "TX_005",
"message": "Delivery failed",
"details": {
"transaction_id": "tx_abc123",
"reason": "Recipient endpoint returned HTTP 500",
"attempts": 3,
"last_attempt": "2024-01-15T10:30:00Z"
}
}
}

Organization Errors (ORG_xxx)​

CodeMessageDescriptionResolution
ORG_001Organization not foundOrg ID doesn't existCheck organization ID
ORG_002Organization suspendedAccount suspendedContact support
ORG_003Quota exceededMonthly quota reachedUpgrade plan
ORG_004Feature not availableFeature not in planUpgrade plan

Document Errors (DOC_xxx)​

CodeMessageDescriptionResolution
DOC_001Document too largeExceeds size limitReduce size or use batch
DOC_002Attachment too largeAttachment exceeds limitReduce attachment size
DOC_003Invalid attachment typeMIME type not supportedUse supported type
DOC_004Document not foundDocument ID not foundCheck document ID

Schematron Error Codes​

EN16931 (European Standard)​

RuleDescription
BR-01An Invoice shall have a Specification identifier
BR-02An Invoice shall have an Invoice number
BR-03An Invoice shall have an Invoice issue date
BR-04An Invoice shall have an Invoice type code
BR-05An Invoice shall have an Invoice currency code
BR-06An Invoice shall have a Seller name
BR-07An Invoice shall have a Buyer name
BR-16Total amount with VAT = Total without VAT + VAT amount

Peppol BIS 3.0​

RuleDescription
PEPPOL-EN16931-R001Document MUST have business process identifier
PEPPOL-EN16931-R002Document MUST have specification identifier
PEPPOL-EN16931-R003Document type code MUST be a valid Peppol code
PEPPOL-EN16931-R007ProcessID MUST be valid
PEPPOL-EN16931-R120Scheme ID must be from code list

XRechnung (Germany)​

RuleDescription
BR-DE-1Buyer reference MUST be provided
BR-DE-2Leitweg-ID format MUST be correct
BR-DE-5Bank account MUST be IBAN format
BR-DE-15Country code MUST be provided

Error Response Format​

All errors follow this structure:

{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message",
"details": {
// Additional context
},
"request_id": "req_abc123",
"documentation_url": "https://docs.goroute.ai/errors/ERROR_CODE"
}
}

Handling Errors​

Python Example​

def handle_api_error(response):
"""Handle GoRoute API errors."""

if response.status_code == 200:
return response.json()

error = response.json().get("error", {})
code = error.get("code", "UNKNOWN")
message = error.get("message", "Unknown error")

if code.startswith("AUTH_"):
raise AuthenticationError(message)
elif code.startswith("VAL_"):
raise ValidationError(message, error.get("details"))
elif code.startswith("PART_"):
raise ParticipantError(message)
elif code.startswith("TX_"):
raise TransactionError(message)
elif response.status_code == 429:
raise RateLimitError(message)
elif response.status_code >= 500:
raise ServerError(message)
else:
raise APIError(message)

JavaScript Example​

async function handleApiError(response) {
if (response.ok) {
return response.json();
}

const error = await response.json();
const { code, message, details } = error.error;

switch (code?.split('_')[0]) {
case 'AUTH':
throw new AuthenticationError(message);
case 'VAL':
throw new ValidationError(message, details);
case 'PART':
throw new ParticipantError(message);
case 'TX':
throw new TransactionError(message);
default:
throw new APIError(message);
}
}

Next Steps​