Shipments

Find, filter and manage the shipments you have created, including cash on delivery and surcharges.

Once a label exists, this is where you work with it: find it, watch what it costs you, and keep the list tidy.

Creating and tracking labels lives elsewhere. Use the Shipping API to quote, generate, track and cancel. This page is about the shipments that already exist.

Find shipments

API reference → List shipments

curl -G https://queries.test.envia.com/shipments \
  -H "Authorization: Bearer $ENVIA_TOKEN" \
  -d date_from=2026-09-01 \
  -d date_to=2026-09-30 \
  -d carrier_name=fedex \
  -d limit=100
{
  "data": [ /* the shipments */ ],
  "total": 1284,
  "total_incidents": 12,
  "total_reported": 8,
  "total_completed": 4
}

total is the count matching your filter, ignoring pagination. The three incident counters come along unless you pass include_incidents=false.

Two things worth knowing:

  • count_only=true returns just the number and skips building the rows. Use it for dashboard tiles instead of requesting limit=1 and reading total.
  • Array filters take a repeated parameter or a single value: ?carrier_name=fedex&carrier_name=dhl or ?carrier_name=fedex.

Looking for one shipment you already have the tracking number for? Get shipment by tracking number is direct and cheaper.

Cash on delivery

API reference → List cash-on-delivery shipments

The carrier collects from the buyer and pays you later. The question you actually need answered is what have they collected but not paid me yet — that is paymentStatus.

curl -G https://queries.test.envia.com/shipments/cod \
  -H "Authorization: Bearer $ENVIA_TOKEN" \
  -d paymentStatus=pending \
  -d startDate=2026-09-01
paymentStatusMeaning
pendingCollected from the buyer, not yet paid out to you
paidSettled

For dashboard totals without the rows, use COD counters. Pass csv=true on the list to get a file instead of JSON.

Surcharges

API reference → List shipments with surcharges

Carriers re-charge after pickup when the real weight or dimensions differ from what was declared. Those charges land after the fact and are the most common source of cost you didn't plan for.

curl -G https://queries.test.envia.com/shipments/surcharges \
  -H "Authorization: Bearer $ENVIA_TOKEN" \
  -d difference_weight=true \
  -d invoiced=false

That combination — caused by a weight difference, not yet invoiced to you — is the one to reconcile regularly. If a charge looks wrong, ticket_id links to the support ticket disputing it.

Cancel in bulk

API reference → Cancel shipments in bulk

curl -X POST https://queries.test.envia.com/shipments/bulk/cancel \
  -H "Authorization: Bearer $ENVIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "shipments": [778123, 778124, 778125] }'
{ "message": "Processing..." }
⚠️

This is asynchronous. A 200 means the request was accepted, not that the shipments were canceled. Poll List shipments to confirm the outcome.

For a single shipment, prefer Cancel a shipment on the Shipping API — it answers synchronously and tells you the refund.

Keep the list tidy

API reference → Archive shipments in bulk

Three levels, increasingly permanent:

ActionReversible?Effect
Archive✅ YesOut of the main list. Still returned with include_archived=true
Soft-delete in bulk⚠️ Not through the APIHidden from every listing
Permanently delete❌ NoGone from every listing and export

Archiving is what you want for day-to-day tidying. Bulk operations take up to 100 ids per call.

curl -X POST https://queries.test.envia.com/shipments/archive/bulk \
  -H "Authorization: Bearer $ENVIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "shipment_ids": [778123, 778124], "archived_reason": "bulk" }'

Delivery evidence

API reference → Attach delivery evidence

Attach a proof of delivery by URL — upload the file to your own storage first and pass the public link:

curl -X POST https://queries.test.envia.com/shipments/save-evidence \
  -H "Authorization: Bearer $ENVIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "tracking_number": "794657543210", "url": "https://cdn.mitienda.mx/pod/794657543210.jpg", "service_id": 45 }'

Endpoints

Next steps


Did this page help you?