Skip to main content

Documentation Index

Fetch the complete documentation index at: https://packageretriever.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Error Code Reference

Every error follows this format:
{
  "error": {
    "code": "RESOURCE.CATEGORY.SPECIFIC",
    "message": "Human-readable description.",
    "suggestion": "What to do next.",
    "docs_url": "https://docs.packageretriever.com/reference/errors#CODE",
    "request_id": "req_xxxxxxxxx"
  }
}
Catch error categories programmatically:
if (error.code.startsWith('LABEL.')) { /* handle label errors */ }
if (error.code.startsWith('WALLET.')) { /* handle wallet errors */ }

Authentication Errors

CodeHTTPDescriptionFix
AUTH.KEY.MISSING401No Authorization headerAdd Authorization: Bearer pr_live_YOUR_KEY
AUTH.KEY.INVALID401Key not found or malformedCheck key format: pr_live_ or pr_test_ + 32 hex chars
AUTH.KEY.REVOKED401Key has been revokedCreate a new key in dashboard
AUTH.KEY.EXPIRED401Key past expiration dateCreate a new key or update expiration
AUTH.KEY.INSUFFICIENT_SCOPE403Key missing required scopeAdd the required scope to your key or create a new one
AUTH.KEY.SANDBOX_IN_PRODUCTION403Test key used for live resourceUse a pr_live_ key
AUTH.RATE_LIMIT.EXCEEDED429Too many requestsWait for Retry-After seconds

Validation Errors

CodeHTTPDescriptionFix
VALIDATION.FIELD.REQUIRED422Required field missingInclude the field named in error.field
VALIDATION.FIELD.INVALID422Field value invalidCheck constraints in API reference

Rate Errors

CodeHTTPDescriptionFix
RATE.EXPIRED422Rate older than 15 minutesRe-fetch rates via POST /v1/rates and use new rate_id
RATE.NOT_FOUND404Rate ID doesn’t existFetch rates first, then use a rate_id from the response
RATE.CARRIER.UNAVAILABLE503A carrier API is downRates from other carriers are still returned; retry for missing carrier

Label Errors

CodeHTTPDescriptionFix
LABEL.ADDRESS.UNDELIVERABLE422Carrier can’t deliver to this addressValidate address first with POST /v1/addresses/validate
LABEL.WEIGHT.EXCEEDED422Package over carrier max weightReduce weight or use freight
LABEL.SERVICE.UNAVAILABLE422Service not available for this routeRe-fetch rates to see available services
LABEL.VOID.INELIGIBLE422Carrier has scanned the packageCannot void after first carrier scan
LABEL.VOID.ALREADY_REQUESTED422Void already in progressCheck status via GET /v1/labels/:id
LABEL.NOT_FOUND404Label ID doesn’t existCheck the label ID
LABEL.CREATION.FAILED500Unexpected error during creationRetry; contact support with request_id if persistent

Wallet Errors

CodeHTTPDescriptionFix
WALLET.INSUFFICIENT_BALANCE402Not enough fundsTop up wallet, then retry
WALLET.PAYMENT.FAILED402Card charge declinedUpdate payment method in dashboard
WALLET.PAYMENT_METHOD.MISSING402No card on fileAdd a payment method in wallet settings

Carrier Account Errors

CodeHTTPDescriptionFix
CARRIER.ACCOUNT.INVALID_CREDENTIALS422Carrier rejected credentialsVerify credentials in dashboard
CARRIER.ACCOUNT.NOT_FOUND404Account ID doesn’t existList accounts via GET /v1/carrier-accounts
CARRIER.ERROR.UNKNOWN502Unexpected carrier errorRetry; check raw_carrier_error field for details

Batch Errors

CodeHTTPDescriptionFix
BATCH.SIZE.EXCEEDED422More than 5,000 itemsSplit into multiple batches
BATCH.ITEMS.REQUIRED422Empty items arrayProvide at least 1 item
BATCH.NOT_FOUND404Batch ID doesn’t existCheck the batch ID
BATCH.ALREADY_PROCESSING422Buy called on active batchPoll GET /v1/batches/:id for progress

Address Errors

CodeHTTPDescriptionFix
ADDRESS.VALIDATION.FAILED422Address is undeliverableCheck for typos; try a different address
ADDRESS.VALIDATION.AMBIGUOUS422Multiple possible matchesUse one of the suggestions in the response
ADDRESS.VALIDATION.SERVICE_ERROR503Validation service temporarily downRetry in a few seconds

Tracker Errors

CodeHTTPDescriptionFix
TRACKER.NOT_FOUND404Tracker ID doesn’t existRegister via POST /v1/trackers first