Running Your Operation

The calls you use every day once you are shipping: warehouse paperwork, counts, notes and search.

Most of this documentation explains how to start shipping: quote, label, track. This page is about the other half — what you call every day once orders are already flowing.

It is the difference between an integration that creates labels and one that a warehouse can actually run on.

The number for your dashboard

API reference → Order counts by stage

curl --request GET \
  --url "https://queries.test.envia.com/orders/orders-information-by-status" \
  --header "Authorization: Bearer $ENVIA_TOKEN"
{
  "unfullfilledOrders": 166,
  "readyToFulFill": 151,
  "readyToShip": 22,
  "pickUpInTransit": 8,
  "percentagePickUpInTransit": 4.6,
  "outForDelivery": 3,
  "delivered": 1204
}

Do not page through /v4/orders to count. This returns the counts and the percentages already worked out, in one call, and it is what the platform's own dashboard uses.

Note it comes back as a flat object — no data wrapper.

Warehouse paperwork, as PDFs

Three operations turn a list of order ids into something a packer can hold. All three return application/pdf, not JSON — write the body to a file, do not parse it.

What it is
POST /orders/picking-listWhat to pull from the shelves, grouped so it is one walk of the warehouse, not one walk per order
POST /orders/packing-slipOne slip per order, to go in the box
POST /orders/picking-list-packing-slipBoth, in the order a packer uses them
curl --request POST \
  --url "https://queries.test.envia.com/orders/picking-list-packing-slip" \
  --header "Authorization: Bearer $ENVIA_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{ "order_ids": [54774, 54775, 54776], "with_return_policy": true }'

The third one is the one to use for a morning batch: pick everything in one pass, then pack each order against its slip.

Tags, for the states we do not have

API reference → Tag orders

An order's status is ours. Tags are yours — urgente, mayoreo, revisar con el cliente, whatever your operation actually distinguishes.

curl --request POST \
  --url "https://queries.test.envia.com/orders/tags" \
  --header "Authorization: Bearer $ENVIA_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{ "order_ids": [54774, 54775], "tags": ["urgente", "mayoreo"] }'

Tags that do not exist are created. GET /orders/tags returns everything already in use — offer that list rather than a free-text box, or you end up with urgente, Urgente and URGENTE as three different tags.

Removing them takes tag_ids, not names. Read the ids from GET /orders/tags first. It is the one asymmetry in this pair.

Notes that survive the person who wrote them

POST /orders/order-comments/{order_id} attaches an internal note to an order. The buyer never sees it.

This is where "the customer asked for delivery after 6pm" goes, so it is still there when someone else picks the order up tomorrow.

Search that crosses shops

Two different searches, and the difference matters:

Scope
GET /v4/orders/searchWithin one shop, one search term
GET /search-orderAcross every shop, by named field: identifier, name or client_name

If you run several storefronts, the second is the one your support team wants — client_name in particular. A buyer who writes in does not know which of your shops they bought from, and rarely quotes an order number.

GET /order-search is the same operation under a second path. Use /search-order.

Small things that make a screen feel finished

GET /v4/orders/adjacent returns the order before and after a given one, so a detail view can offer previous and next without reloading the list.

POST /orders/pin-favorite-order pins an order to the top of your lists.

When the shipment goes wrong, or comes back

Two screens in an operation are not about orders at all, and both have their own API:

The exception queue. When a carrier flags a shipment as lost, damaged, wrongly addressed or held in customs, Envia records an incidence. GET /shipment-incidences/metrics gives you the four counters for a header badge; GET /shipment-incidences?attention_status=unattended gives you the shipments with a problem and no claim filed yet. See Incidences Overview.

The returns queue. A package coming back on purpose is a return: you create the label with the Shipping API, then record it against the order with POST /orders/{shop_id}/{order_id}/return, which also tells the connected store. See Returns Overview.

Related pages


Next steps


Did this page help you?