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 & Postal Validation

    • Normalize addresses, confirm locality/state relationships, and look up the correct postal_code/district.
    • Reduce failed label creations and delivery exceptions by validating inputs up front.
  • 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:

  1. Validate & Discover (Queries): confirm address → check available carriers/services.
  2. Execute (Shipping): request rates → choose service → create label → schedule pickup.
  3. Monitor (Queries/Shipping): fetch shipment/pickup logs and statuses for dashboards or CX.

🛟

Need Help?

For any inquiries or assistance, our support team is here to help you with your integration. Contact us for guidance, troubleshooting, or feature requests.