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=truereturns just the number and skips building the rows. Use it for dashboard tiles instead of requestinglimit=1and readingtotal.- Array filters take a repeated parameter or a single value:
?carrier_name=fedex&carrier_name=dhlor?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-01paymentStatus | Meaning |
|---|---|
pending | Collected from the buyer, not yet paid out to you |
paid | Settled |
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=falseThat 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. A200means 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:
| Action | Reversible? | Effect |
|---|---|---|
| Archive | ✅ Yes | Out of the main list. Still returned with include_archived=true |
| Soft-delete in bulk | ⚠️ Not through the API | Hidden from every listing |
| Permanently delete | ❌ No | Gone 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
| Operation | Reference |
|---|---|
| List shipments | GET /shipments |
| By tracking number | GET /guide/{tracking_number} |
| By month | GET /guide/{MM}/{YYYY} |
| Download labels in bulk | POST /shipments/labels-bulk |
| COD shipments | GET /shipments/cod |
| COD counters | GET /shipments/cod/count |
| Surcharges | GET /shipments/surcharges |
| Cancel in bulk | POST /shipments/bulk/cancel |
| Attach evidence | POST /shipments/save-evidence |
| Archive | POST /shipments/{id}/archive |
| Unarchive | DELETE /shipments/{id}/archive |
| Archive in bulk | POST /shipments/archive/bulk |
| Unarchive in bulk | POST /shipments/archive/unarchive-bulk |
| Soft-delete in bulk | POST /shipments/archive/soft-delete-bulk |
| List archived | GET /shipments/archived |
| Delete permanently | DELETE /shipments/{id}/archive/permanent |
Next steps
The charges a carrier can add to a shipment, and where they appear in the rate response.
What happens when a parcel comes back to you, and what the return trip costs.
Receive shipping events as they happen instead of polling. Set up, test and manage your webhooks.
Updated 18 days ago