Saved Addresses
Save your origin and return addresses, and reuse them on every shipment.
These are your addresses: the warehouses you ship from, your return address, and any destination you use often enough to keep.
The operations — list, create, set a default, bulk import — are in Saved Addresses.
Saved addresses or customers?
Saved addresses are where you ship from (and your own return points).
Customers & Recipients are who you ship to.
If you are looking for where to store a client's delivery address, that is the other one.
Before you start
- Base URL:
https://queries.envia.com· Sandbox:https://queries.test.envia.com - Auth:
Authorization: Bearer <your_token>— the same token as the Shipping API. - Check the country's requirements first. Address requirements by country tells you which fields the carrier will demand. In Mexico some carriers refuse a label without the colonia in
district, Brazil needs a CPF or CNPJ inidentificationNumber, and Colombia takes the DANE code incity.
Create an address
API reference → Create saved address
The fields go at the root of the body. There is no nested address object.
curl -X POST https://queries.test.envia.com/user-address \
-H "Authorization: Bearer $ENVIA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Bodega Monterrey",
"phone": "8181234567",
"phone_code": "52",
"street": "Av. Constitución",
"number": "1450",
"district": "Centro",
"city": "Monterrey",
"state": "NL",
"country": "MX",
"postal_code": "64000",
"type": 1,
"alias": "Bodega MTY"
}'| Required on create | Why it trips people up |
|---|---|
name | Minimum 2 characters |
phone | 8 to 15 digits. Required on create, optional on update |
street | |
city | Maximum 60 characters |
state | The code, not the name. NL, not Nuevo León. Maximum 4 characters |
country | ISO 3166-1 alpha-2: MX, CO, BR |
type decides what the address is for: 1 origin (you ship from here), 2 destination.
Update one
API reference → Update saved address
Same flat shape. Here phone becomes optional, but name, street, city, state and country are still required — send them even if they did not change.
curl -X PUT https://queries.test.envia.com/user-address/8891 \
-H "Authorization: Bearer $ENVIA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Bodega Monterrey Norte",
"street": "Av. Constitución",
"city": "Monterrey",
"state": "NL",
"country": "MX",
"postal_code": "64000"
}'Find them
API reference → List saved addresses by type · List saved addresses
# All of them
curl -G https://queries.test.envia.com/all-addresses \
-H "Authorization: Bearer $ENVIA_TOKEN" -d limit=50
# Only origins, searching by name
curl -G https://queries.test.envia.com/all-addresses/origin \
-H "Authorization: Bearer $ENVIA_TOKEN" \
-d search=Monterrey -d sort_by=name -d sort_direction=ascGET /all-addresses/{type} takes origin or destination, and is the one with search, country and carrier filters. The plain list has only pagination.
Deleting can be refused
API reference → Delete saved address
curl -X DELETE https://queries.test.envia.com/user-address/8891 \
-H "Authorization: Bearer $ENVIA_TOKEN"The service checks first that the address is not in use — as a favourite, or as the default of a connected shop. If it is, the delete is rejected. Reassign the default first, or unmark the favourite with Toggle favourite, then delete.
Importing many at once
Two steps, and the order matters:
- Download the template for the country you are importing —
GET /user-address/bulk/template?country_code=MX. The columns change per country, because the required fields change. - Upload the filled-in
.xlsxtoPOST /user-address/bulk/import, with the samecountry_codeand theaddress_typeyou want.
If the columns do not match the template, the whole import fails — not just the bad rows.
Endpoints
| Operation | Reference |
|---|---|
| List all | GET /all-addresses |
| List by type | GET /all-addresses/{type} |
| Create | POST /user-address |
| Update | PUT /user-address/{address_id} |
| Delete | DELETE /user-address/{address_id} |
| Get default | GET /default-user-address/{type_id} |
| Toggle favourite | POST /favorite-address |
| Address categories | GET /address-categories |
| Default print settings | GET /default-user-print/{carrier_id} |
| Bulk template | GET /user-address/bulk/template |
| Bulk import | POST /user-address/bulk/import |
Next steps
Save the boxes you ship in, and reuse their dimensions on every shipment.
Save the people and businesses you ship to, and reuse them on every shipment.
What an address needs in each country, where each value comes from, and five rules that apply everywhere.
Updated 14 days ago