Envia Queries API – Overview
The Queries API is your read-optimized layer for discovery, validation, and account insights. Use it to look up the data you need before you ship (validate addresses, find postal codes, check carrier/service availability) and after you ship (review shipments, pickups, and logs). It complements the Shipping API: discover & validate with Queries → execute with Shipping → monitor with both.
What you can do with the Queries API
-
Address Structure Discovery
- Get address structure requirements and validation rules for different countries.
- Discover required fields, data types, and formatting rules to build country-specific address forms.
-
Carrier & Service Availability
- See which carriers/services are available per country/region/ZIP.
- Explore service constraints (e.g., supported package types, size/weight ranges) to guide checkout choices.
-
Account Resources
- List shops/e-commerce connections, webhooks, payment/invoice references, and other configuration you’ll use across environments and stores.
-
Shipments & Pickups (Read-only)
- Fetch shipment lists/history and pickup logs for analytics, reconciliation, and customer support tooling.
-
Reference Data for UX
- Countries, states, cities, serviceable areas—everything you need to power autocompletes and selectors in your app.
Environments & Authentication
- Production:
https://queries.envia.com/ - Sandbox/Test:
https://queries-test.envia.com/
Auth: Same Bearer token you use for the Shipping API. In your MPI (Envia dashboard), go to Developers to generate/manage tokens. Include it in every request via Authorization: Bearer <token>.
When to call Queries vs. Shipping
- Use Queries when you need to know something (validate, discover, list, or inspect).
- Use Shipping when you need to do something (rate, label, track, pickup, cancel).
A typical flow:
- Validate Address (Geocodes): validate zip code → locate city if needed.
- Discover Options (Queries): check available carriers/services → get address structure requirements.
- Execute (Shipping): request rates → choose service → create label → schedule pickup.
- Monitor (Queries/Shipping): fetch shipment/pickup logs and statuses for dashboards or CX.
Need Help?Have questions or need assistance with your integration?
Our support team is ready to help 🚀Create a support ticket here and we’ll guide you with setup, troubleshooting, or feature requests.
Updated about 19 hours ago
