FAQs
Find answers to the most common questions about integrating with the Envia Shipping, Queries, and Geocodes APIs. Questions are organized by topic — use the navigation below to jump to what you need.
Find your answer
Not sure where to start? Use this decision tree:
| Symptom | Go to |
|---|---|
| Getting address or "no coverage" errors | Addresses & location data |
| Authentication or 401 errors | Authentication & environments |
| Not sure which carrier or service to use | Carriers & services |
| Unexpected rate results or pricing questions | Rates & pricing |
| Label creation fails or returns unexpected data | Labels & shipments |
| Pickup scheduling or pickup vs generate questions | Pickups |
| Tracking not updating or webhook issues | Tracking & webhooks |
| International shipment or customs questions | International shipping |
| None of the above | Getting help |
Self-serve diagnostic tools
Before opening a support ticket, use these tools to diagnose issues yourself. They cover the majority of integration problems.
| Tool | URL | What it tells you |
|---|---|---|
| Validate a postal code | GET https://geocodes.envia.com/zipcode/{country}/{postalCode} | Correct city, state code, and locality for any postal code — no auth required |
| Get state codes | GET https://queries.envia.com/state?country_code={XX} | Envia's 2-letter state codes for a country |
| Check address structure | GET https://queries.envia.com/address-structure/{country} | Required fields and validation rules per country |
| List carriers for a country | GET https://queries.envia.com/carrier?country_code={XX} | Available carriers and their capabilities |
| Test a webhook | POST /ship/webhook/test/ | Sends a test payload to verify your webhook endpoint |
Tip: The Geocodes API requires no authentication and is the fastest way to validate addresses during development.
Authentication & environments
I'm getting a 401 Unauthorized error
This means your API token is missing, expired, or does not match the environment you are calling.
Checklist:
- Verify the
Authorization: Bearer <token>header is present in your request - Confirm the token belongs to the same environment as the base URL:
- Sandbox tokens →
api-test.envia.com/queries-test.envia.com - Production tokens →
api.envia.com/queries.envia.com
- Sandbox tokens →
- Check that the token has not been revoked in Dashboard → Desarrolladores → Acceso de API
Tokens are not interchangeable between environments. See API Authentication for setup details.
How do I switch from sandbox to production?
- Create a production account at accounts.envia.com/signup
- Generate a production API key in the production dashboard
- Replace your base URLs (
api-test→api,queries-test→queries) - Use separate webhook URLs for each environment
See the full Production Readiness Checklist for every item to verify before going live.
Does the Geocodes API require authentication?
No. The Geocodes API has a single production URL (https://geocodes.envia.com/) and does not require a Bearer token. You can call it directly from a browser or frontend application.
Addresses & location data
Why am I getting 'no coverage' or 'invalid address' errors?
The most common cause is incorrect state codes. Envia uses its own 2-letter state codes, which may differ from codes used by other platforms (Shopify, WooCommerce, ISO 3166-2, etc.).
For example, in Argentina:
| Province | Envia code | Shopify code | ISO 3166-2 |
|---|---|---|---|
| Córdoba | CB | X | AR-X |
| Ciudad Autónoma de Buenos Aires | DF | C | AR-C |
| Tierra del Fuego | TF | V | AR-V |
Fix: Always retrieve Envia's state codes from the Queries API — do not reuse codes from other platforms.
GET https://queries.envia.com/state?country_code=ARHow do I validate a postal code before quoting?
Use the Geocodes API — no authentication required:
GET https://geocodes.envia.com/zipcode/{country}/{postalCode}The response returns the correct city, state code, and locality for that postal code. Use these values in your rate and label requests to avoid address-related errors.
Do address field requirements change by country?
Yes. Required fields, formats, and validation rules vary by country. Some countries require a district or locality field; others do not. Use the address structure endpoint to get the exact requirements:
GET https://queries.envia.com/address-structure/{country}I get different errors with different carriers for the same address
Each carrier validates addresses independently with different strictness levels. Some carriers are strict about state codes, while others rely on postal codes.
To avoid issues across all carriers:
- Validate postal codes using the Geocodes API to get the canonical state, city, and locality
- Use Envia's 2-letter state codes from the Queries API — not codes from external platforms
- Check the address structure for the destination country to ensure all required fields are present
Carriers & services
How do I find which carriers are available for my route?
Use the Queries API to get carriers by country:
GET https://queries.envia.com/carrier?country_code=ARReplace AR with any supported 2-letter country code (MX, BR, CO, CL, US, CA, ES, IN, etc.).
For a real-time check that accounts for your account configuration, use the rate endpoint directly — it only returns carriers and services that can actually fulfill the shipment.
Can I filter rates by a specific carrier?
Yes. Add the carrier field to the shipment object in your rate request:
{
"shipment": {
"carrier": "correoArgentino",
"type": 1
}
}Omit the carrier field to get rates from all available carriers for the route. The rate endpoint accepts one carrier per request — to compare multiple carriers, call it once per carrier.
What shipment types are available?
The shipment.type field accepts these values:
| Type | Value | Description |
|---|---|---|
| Parcel | 1 | Standard package shipments |
| LTL (Less than Truckload) | 2 | Freight shipments that share truck space |
Most carriers support Parcel (type 1) only. Sending an unsupported type returns an error. Check the Supported Carriers page — the LTL column shows which carriers support LTL.
FTL (Full Truckload) shipments are currently managed through the cargo.envia.com platform and are not yet available via API.
How do I know which shipment type a carrier supports?
Use the Queries API to get carriers filtered by shipment type:
GET https://queries.envia.com/available-carrier/{country}/{international}/{shipment_type_id}Rates & pricing
Why am I getting empty rate results?
Empty rate results usually mean one of:
- The carrier does not serve the route — Verify carrier availability with the Queries API
- Invalid address data — Validate postal codes with the Geocodes API and state codes with the Queries API
- Unsupported package dimensions or weight — Each carrier has its own limits; check the Supported Carriers page
- Wrong shipment type — Confirm the carrier supports the
shipment.typevalue you are sending (most only support1for parcel)
Why do rates differ between sandbox and production?
Sandbox returns simulated rates for testing purposes. Production returns real rates from carriers based on your account's negotiated pricing, carrier contracts, and current surcharges. Always do final price validation in production.
Can I get rates in a specific currency?
Yes. Include the currency field in the settings object of your rate request:
{
"settings": {
"currency": "USD"
}
}If omitted, rates are returned in the default currency for your account's country.
Labels & shipments
The Shipping API returned HTTP 200 but the response contains an error
This is a known behavior of the Shipping API. Some errors return HTTP 200 with "meta": "error" in the body instead of a 4xx status code.
Always check the meta field in every Shipping API response — do not rely solely on the HTTP status code.
{
"meta": "error",
"error": {
"code": 400,
"description": "Invalid Option",
"message": "The origin.postalCode field is required."
}
}See Error Response Formats for the full error shapes returned by each API and a normalization helper.
How do I cancel a label?
Use the cancel endpoint with the shipmentId returned when the label was created:
POST https://api.envia.com/ship/cancel/Cancelling a label before the carrier scans it triggers an automatic refund to your account balance. Once a carrier has scanned the package, cancellation may no longer be possible.
Can I create a label with multiple packages?
Yes. Include multiple objects in the packages array of your label request. Each package gets its own tracking number in the response.
See the Shipping Multiple Packages workflow guide for a complete example.
Pickups
How does pickup work? Does every carrier support it?
Pickup behavior varies by carrier — some support standalone scheduling, others schedule automatically during label creation, and some only accept drop-offs at branches. Use Get Carrier Actions to check what each carrier supports.
Can I schedule a pickup for multiple tracking numbers at once?
Yes. The POST /ship/pickup/ endpoint accepts multiple tracking numbers in a single request. All tracking numbers must belong to the same carrier and originate from the same address. For high-volume operations, see the Pickup & Manifest Workflow.
Tracking & webhooks
How do I track a shipment?
Use the tracking endpoint with one or more tracking numbers:
POST https://api.envia.com/ship/generaltrack/{
"trackingNumbers": ["7072262094"]
}The response includes the current status, carrier name, and a chronological list of events.
My webhook endpoint is not receiving events
Checklist:
- Your endpoint URL must be publicly reachable via HTTPS (not HTTP, not localhost)
- Your endpoint must respond with a 2xx status code within 5 seconds — slower responses may be treated as failures
- Verify the webhook is registered and active using
GET https://queries.envia.com/webhooks - Confirm you registered separate webhook URLs for sandbox and production
- Test delivery with the Test Webhook endpoint to isolate whether the issue is in registration or in your endpoint
See the Webhooks Guide for setup and troubleshooting details.
How do I handle duplicate webhook deliveries?
Webhooks may be delivered more than once (e.g., due to network retries). Implement idempotency by tracking the shipmentId and event type you have already processed. If you receive a duplicate, acknowledge it with a 2xx response but skip reprocessing.
International shipping
What additional data is required for international shipments?
International shipments require customs information in the customsSettings object, including:
- HS codes for each item (see HS Codes)
- Declared value per package
- Country of origin for manufactured goods
- Commercial invoice for certain destinations (see Commercial Invoice)
See the International Shipping Workflow for a complete step-by-step example.
Do I need to create a commercial invoice separately?
It depends on the carrier and destination. Some carriers generate the commercial invoice automatically from the customs data in your label request. Others require you to upload it as a separate document.
Use the Commercial Invoice endpoint when a separate document is needed.
How do I classify my products with HS codes?
Use the HS code classification utility to get the correct code for your product:
Full reference → Classify HS Code
For a detailed explanation of how HS codes work and why they matter, see the HS Codes guide.
Common mistakes
These are the issues that trip up most integrators. Addressing them early saves significant debugging time.
| # | Mistake | Impact | Fix |
|---|---|---|---|
| 1 | Using state codes from Shopify, WooCommerce, or ISO 3166-2 instead of Envia's codes | "No coverage" errors, failed labels | Always fetch state codes from GET /state?country_code={XX} |
| 2 | Not checking the meta field in Shipping API responses | Silent failures — HTTP 200 with an error in the body | Check meta === "error" on every Shipping API response |
| 3 | Using a sandbox token with a production URL (or vice versa) | 401 Unauthorized | Match token environment to base URL |
| 4 | Sending multiple carriers in a single rate request | Unexpected results or errors | The rate endpoint accepts one carrier per request |
| 5 | Assuming address fields are the same across countries | Validation errors in specific countries | Use GET /address-structure/{country} to get country-specific requirements |
| 6 | Not handling the three different error response formats | Missed errors, broken error handling | See Error Response Formats for a normalization helper |
| 7 | Webhook endpoint responds too slowly or over HTTP | Missed events, delivery failures | Ensure HTTPS and respond with 2xx within 5 seconds |
Getting help
1. Search the docs
Most questions are answered in the documentation. Use the search bar at the top of this page, or explore these key resources:
How each API returns errors, with a normalization helper.
The full shipping flow from quote to delivery with code examples.
Carrier capabilities, label formats, and shipment type support.
Everything to verify before going live.
2. Open a support ticket
If you cannot find an answer in the docs, open a ticket with the following information for the fastest resolution:
- Endpoint URL and HTTP method
- Full request body (redact sensitive data)
- Full response body including
carrier_messageif present - Timestamp of the request
- Environment (sandbox or production)
Updated 13 days ago
