Skip to main content

Error Codes

The API returns structured errors with a code and message. This page documents the error codes you may receive when calling Create Guarantee (POST /guarantees) and how to resolve them.

Create Guarantee (POST /guarantees)

These codes are returned in the response body with HTTP status 400 when a guarantee cannot be created due to validation or business rules.

Cause and resolution

LI_01 — License not active

What happened: The license associated with your API key or the license query parameter is not currently active. What to do: Verify that the license UID is correct and that the license has been activated. Contact your Anzi representative if the license should be active.

GUA_06 — Duplicate external reference

What happened: The externalReference you sent is already associated with an existing guarantee for this license. What to do: If you are re-submitting a credit that was already registered (e.g. re-uploading a corrected file), no action is needed — the guarantee already exists. Do not register the same credit under a different reference: each real credit must keep exactly one externalReference (e.g. your internal credit or loan ID).

GUA_08 — Premium percentage out of range

What happened: The premiumPercentage in the request is outside the min/max range defined in the License configuration. What to do: Check your License terms for the allowed premium percentage range. Ensure the value you send is within that range (inclusive).

GUA_16 — Disbursement date before previous month or after today

What happened: The disbursementDate is either before the previous calendar month or after the current date. What to do: Use a disbursement date that is within the previous month or the current month (not in the future and not older than the previous month).

GUA_26 — Missing coverage value (SURETY)

What happened: For a SURETY-type license, the system could not compute a coverage value for this guarantee. What to do: Ensure the loan amount and license configuration allow the coverage calculation to produce a valid result. Contact your Anzi representative if this error persists.

GUA_27 — Portfolio / coverage cap exceeded (SURETY)

What happened: For a SURETY-type license, the sum of loanAmount already associated with existing guarantees plus the loanAmount of the new guarantee would exceed the Portfolio Coverage Cap allowed by the License. What to do: Reduce the loanAmount of this guarantee, or wait until other guarantees free up cap (e.g. closed or novated). You can also contact your Anzi representative if you need to adjust the license cap.

GUA_28 — Coverage exceeds maximum allowed

What happened: The coverage amount for this guarantee (derived from loan amount and coverage rules) exceeds the maximum per-guarantee coverage allowed by the License. What to do: Lower the loan amount or the effective coverage so it stays within the license’s maximum coverage per guarantee.

GUA_29 — Invalid loan amount

What happened: The loanAmount does not comply with the License configuration (e.g. below minimum, above maximum, or not allowed by product rules). What to do: Check the License’s min/max loan amount and product rules. Send a loanAmount within the allowed range and that matches the license terms.

GUA_30 — Invalid loan durations

What happened: The combination of dates or terms (e.g. disbursementDate, paymentTerm, or implied loan duration) is not allowed by the License (e.g. duration too short or too long). What to do: Ensure disbursementDate and paymentTerm (and any other term-related fields) result in a loan duration that is within the License’s allowed range.

GUA_37 — Cannot calculate guarantee premium

What happened: The premium could not be calculated, usually because required data for variable premium calculation is missing or invalid (e.g. loan terms, rates, or dates). What to do: Verify that all fields required for premium calculation are present and valid (amounts, dates, terms). For variable premium licenses, ensure interest rate and payment schedule data are correct and consistent.

GUA_52 — Invalid disbursement date format

What happened: The disbursementDate value could not be parsed as a valid date. What to do: Send disbursementDate in ISO 8601 format (e.g. 2025-09-05T00:00:00.000Z). Ensure the date string is well-formed and represents a real calendar date.

GUA_67 — Calculated premium out of license bounds

What happened: The premium percentage that was automatically calculated (based on loan term and the license’s rate table) falls outside the license’s configured minimum/maximum premium bounds. What to do: Adjust the loan term or amount so the resulting premium percentage falls within the license’s allowed range. Contact your Anzi representative if you believe the license rate table needs updating.

GE_01 — Bad Request (generic)

What happened: The request failed a general validation or business rule that is not mapped to a specific GUA_xx code. What to do: Review the request body against the Create Guarantee schema and the Guarantee Overview. Check required fields, formats (e.g. dates, IDs), and license constraints. If the issue persists, use the exact code and message when contacting support.

Batch creation per-row codes (POST /guarantees/batch)

These codes never fail the whole request — each row reports its own outcome:
  • GUA_90 rows appear in invalidExternalReferencesPreview (returned when the error preview is requested) and are counted by alreadyRegisteredCount, never by failureCount.
  • GUA_91 rows appear in invalidExternalReferencesPreview, count towards failureCount, and are included in the failed-rows report.
  • GUA_92 warnings travel in softDuplicateWarnings; the row itself IS created.
GUA_90 and GUA_92 rows are never part of the failed-rows report.

GUA_90 — Row already registered (identical)

What happened: The row’s externalReference is already registered for this license with the same loan amount, promissory note and disbursement date — typically because you re-uploaded a complete corrected file. What to do: Nothing. The guarantee already exists; the row is counted as already registered, not as a failure.

GUA_91 — Row already registered with different data

What happened: The row’s externalReference is already registered for this license, but the loan amount, promissory note or disbursement date differ from what is stored. What to do: Do not change the reference to force the row through — each real credit must keep exactly one externalReference. If the stored guarantee needs correction, contact support.

GUA_92 — Possible duplicate under a different reference

What happened: The row was created successfully, but another guarantee of this license matches the same borrower, loan amount and disbursement date under a different reference — a probable duplicate registration of the same credit. What to do: Review both references. If they are the same real credit, contact support to resolve the duplicate; if they are genuinely distinct credits, no action is needed.

Infrastructure errors

FL_19 — File upload to storage failed

What happened: The generated file (e.g. a batch result report) could not be uploaded to storage. Returned with HTTP status 500. What to do: Try again later. If the error persists, contact support — the batch itself may have been processed; only the report file failed to upload.

REP_00 — Charts signing key not configured

What happened: The reports embed-token endpoint (admin back office) is missing its Charts signing key configuration. Returned with HTTP status 500. What to do: This is an operational configuration issue on Anzi’s side — report it to the platform team; there is nothing to change in your request.