Packages

Save the boxes you ship in, and reuse their dimensions on every shipment.

A package preset is a box you use often: its dimensions, its weight, its units. Save it once and reference it instead of re-typing five numbers on every shipment — and, more importantly, stop mistyping them.

Create one

API reference → Create package

curl -X POST https://queries.test.envia.com/packages \
  -H "Authorization: Bearer $ENVIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Caja estándar 30x20x15",
    "package_type_id": 1,
    "length": 30,
    "width": 20,
    "height": 15,
    "length_unit": "CM",
    "weight_unit": "KG",
    "weight": 2.5,
    "content": "Refacciones",
    "amount": 1
  }'

Seven fields are required: name, package_type_id, length, width, height, length_unit, weight_unit.

weight is optional, the units are not. You can save a box without knowing what it will weigh, but not without saying whether 30 means centimetres or inches.

package_type_id comes from GET /package-types. Read it — the values are carrier-dependent, and that endpoint is public so you can call it while building a form.

Don't start from zero

Two catalogs save a new client the setup:

Recommended packagesWhat Envia suggests for a country, based on what ships well there
Carrier standard packagesThe carriers' own boxes and envelopes, with their published dimensions

The second one matters for accuracy: when the carrier supplies the packaging, using their dimensions is what makes the quote come out right.

Finding them

API reference → Get all packages · List all packages

# With search and sorting
curl -G https://queries.test.envia.com/all-packages \
  -H "Authorization: Bearer $ENVIA_TOKEN" -d search=caja -d sort_by=name

# Just paginated
curl -G https://queries.test.envia.com/packages \
  -H "Authorization: Bearer $ENVIA_TOKEN" -d limit=50

Both return the same presets. /all-packages is the one with search; /packages only paginates. The operation ids are historical and confusing — GET /packages is published as all-packages — so go by the path, not the slug.

Importing many

POST /packages/upload takes a file as multipart/form-data, up to 10 MB.

Per-shop packages

shop_id on create, update and upload scopes the preset to one connected store instead of the whole account. Use it when different stores ship in different boxes.

Endpoints

Next steps


Did this page help you?