Error Codes

When a request fails, Corvo returns a JSON error envelope with a stable machine-readable code and a human-readable message.

Response400Error envelope
{
  "error": {
    "message": "Either name or company is required",
    "code": "VALIDATION_ERROR"
  }
}
TypeScript
const response = await fetch("https://corvo.to/api/v1/shipments", options);

if (!response.ok) {
  const { error } = await response.json();

  switch (error.code) {
    case "RATE_LIMITED":
      console.error("retry after", response.headers.get("Retry-After"));
      break;
    case "RATE_EXPIRED":
      console.error("recreate the draft before buying again");
      break;
    default:
      console.error(error.code, error.message);
  }
}

Reference

Authentication

CodeHTTPDescription
UNAUTHORIZED401Missing authentication.
INVALID_API_KEY401Malformed, revoked, or unknown API key.
EMAIL_NOT_VERIFIED403The key owner must verify their email before creating shipments.

Documents

CodeHTTPDescription
UPLOAD_QUOTA_EXCEEDED429Too many unattached pending or confirmed uploads for the organization.
UPLOAD_NOT_FOUND404Unknown tracked upload ID or missing pending object.
UPLOAD_ALREADY_CONFIRMED409The tracked upload was already confirmed.
UPLOAD_EXPIRED410The tracked upload expired before confirmation.
PDF_TOO_LARGE400The uploaded PDF exceeds 50 MB.
INVALID_PDF400The file is not a valid PDF.
ENCRYPTED_PDF400Password-protected PDFs are not supported.
EMPTY_PDF400The PDF contains zero pages.

Shipments

CodeHTTPDescription
VALIDATION_ERROR400Request body, query params, or path params failed validation.
DOCUMENT_NOT_FOUND404The referenced document key was not found for this organization.
SHIPMENT_NOT_FOUND404No shipment exists with that ID for the authenticated organization.
RATE_NOT_FOUND404The selected quote does not belong to the shipment.
RATE_EXPIRED410The draft quote expired. Recreate the draft and select a fresh quote.
INVALID_STATUS_TRANSITION409The requested transition is not allowed from the shipment's current state.
NOT_CERTIFIED_MAIL400Mailing record summaries are only available for certified-mail shipments.
NO_TRACKING_NUMBER400Mailing record summary and evidence-bundle downloads require a purchased shipment with a tracking number.
EVIDENCE_EXPIRED410The shipment's evidence retention window has elapsed. Evidence downloads are no longer available.

Billing and upstream services

CodeHTTPDescription
CUSTOMER_NOT_FOUND400The organization has no Stripe customer configured.
NO_PAYMENT_METHOD400The organization has no default payment method on file.
PAYMENT_FAILED402Stripe could not capture the charge.
ADDRESS_VERIFICATION_FAILED502Carrier address verification failed.
SHIPMENT_CREATION_FAILED502EasyPost could not create the shipment for quoting.
RATE_PURCHASE_FAILED502EasyPost could not buy the selected rate.
PRICING_NOT_CONFIGURED500Corvo pricing configuration is missing or invalid.

System

CodeHTTPDescription
RATE_LIMITED429Application-level rate limit exceeded.
INTERNAL_ERROR500Unexpected untyped server error.