This endpoint allows you to create a new address for a specific customer. You must send the customer ID in the path and the address data (zip code, street name, city, state, country, and optional fields such as street number, floor, apartment, and comments) in the request body. In case of success, the request will return a response with status 201.
POST
REQUIRED
REQUIRED
REQUIRED
REQUIRED
400Request error.
100
The credentials are required. Provide a valid access token in the Authorization header.
209
A required parameter cannot be null. Check that all mandatory fields are provided with valid values.
214
The zip code format is invalid. Provide a valid postal code according to the country's format.
217
The parameter must be a string. Check the data type of the field and ensure it is sent as a string.
222
The parameter length exceeds the maximum allowed or must be a positive value. Check the field length and value constraints.
validation_error
Validation error. One or more fields failed validation. Check the request body and ensure all required fields are correctly formatted.
401Error. Access Token not authorized.
unauthorized
Unauthorized access. The provided access token is invalid or expired. Verify your credentials and try again.
404Error. Requested resource not found.
not_found
The requested resource was not found. Verify that the customer ID and address ID are correct and that the address exists.
500Generic error.
internal_error
Internal server error. Please try again later or contact support if the issue persists.
curl -X POST \
'https://api.mercadopago.com/v1/customers/{id}/addresses'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer APP_USR-1*********685765-12*********1b4332e5c*********e077d7679*********664' \
-d '{
"zip_code": "C1264AAK",
"street_name": "Rua Exemplo",
"street_number": 3039,
"name": "Home",
"phone": "2323-5555",
"floor": "3",
"apartment": "A",
"comments": "Near the park",
"city": {
"id": "BR-SP-44",
"name": "Buenos Aires"
},
"state": {
"id": "BR-SP",
"name": "CABA"
},
"neighborhood": {
"name": "Parque Patricios"
}
}'{
"id": "1162600213",
"phone": "2323-5555",
"name": "Home",
"floor": "3",
"apartment": "A",
"street_name": "Rua Exemplo",
"street_number": "3039",
"zip_code": "C1264AAK",
"city": {
"id": "BR-SP-44",
"name": "Buenos Aires"
},
"state": {
"id": "BR-SP",
"name": "São Paulo"
},
"country": {
"id": "AR",
"name": "Argentina"
},
"neighborhood": {
"name": "Parque Patricios"
},
"municipality": {},
"comments": "Near the park",
"date_created": "2021-03-16T15:45:17.000-04:00",
"normalized": true,
"live_mode": true,
"verifications": {}
}