Intelligent search powered by OpenAI
POST
REQUIRED
REQUIRED
REQUIRED
400Error
UNKNOWN_FIELD
Unknown field.
INVALID_NAME
The `name` field must be string - Ensure the `name` value is textual without numeric or special characters.
BAD_REQUEST
Errors caused by inconsistencies in the request information. See below for possible responses.
bad_request:
The name of the following parameters is wrong [additional_info.payer] - This error is displayed when `additional_info.payer` is incorrectly informed. In this case, review whether the entered name is correct and make a new request.bad_request:
The store coordinates are outside the site - Ensure that the entered coordinates are within the specified location.INVALID_BUSINESS_HOURS
The `business_hours` field must be a json_object - Verify the format and include necessary attributes such as open and close times.
INVALID_DAY
The `day` field must be a json_array - Ensure that the field contains an array of valid day names.
INVALID_LOCATION
The `location` field must be json_object - Check that the location details like latitude and longitude are properly formatted as JSON.
INVALID_STREET_NAME
The `street_name` field must be string - Confirm that the field contains only textual information with no special characters or numbers.
INVALID_STREET_NUMBER
The `street_number` field must be string - Ensure the field contains textual representations of numbers or special characters if needed.
INVALID_CITY_NAME
The `city_name` field must be a string - Verify that the field is correctly filled with city names and contains no numbers or special characters.
INVALID_STATE_NAME
The `state_name` field must be a string - Check that the state names are correctly entered without numeric or special characters.
INVALID_REFERENCE
The `reference` field must be a string - Ensure the field is filled with textual information that aids in identifying the location.
VALIDATION_ERROR
This error is generated due to a fault or absence in a specific field. It can also occur when a required parameter is not provided in the request. Check the 'description' or 'message' associated with the error for more details and proceed with the appropriate correction.
validation_error:
`Name must be defined`. Check all required fields and ensure that all have been filled as indicated in the description.validation_error:
`Monday exceeds the maximum length of 4 for Opening Hours`. Review the `opening_hours` field and ensure it does not exceed the maximum limit of 4 schedules. The day of the week returned in the code will vary according to the day that is exceeding the allowed number of schedules.validation_error:
location.state_name was invalid - This error occurs when entering the name of a city that does not correspond to the previously defined city. To correct this, check the 'location.state_name' and 'location.city_name' fields and make sure they are filled out correctly. It can also occur when a parameter is missing in the request, please validate the 'description' or 'message' of the error for more information.validation_error:
`The business_hours field can't be null`. Please check the `business_hours` field and enter the information as instructed.validation_error:
`Monday has overlapping hours`. This error occurs when days and times that overlap are entered. The day of the week will return according to the days when the times are overlapping. Review the opening hours and ensure that none overlap.validation_error:
`Closing hours must be greater than opening hours`. Review the `business_hours` parameter and ensure that the opening and closing time attributes are correct.403Error
Forbidden
You do not have permission to perform this operation. Please contact an administrator for assistance and make sure that the user_id used is the same as your account.
curl -X POST \
'https://api.mercadopago.com/users/{user_id}/stores'\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TEST-4599*********755-11221*********d497ae962*********ecf8d85-1*********' \
-d '{
"name": "Sucursal Instore",
"business_hours": {
"monday": [
{
"open": "08:00",
"close": "12:00"
}
],
"tuesday": [
{
"open": "09:00",
"close": "18:00"
}
]
},
"external_id": "SUC001",
"location": {
"street_number": "0123",
"street_name": "Example Street Name.",
"city_name": "City name.",
"state_name": "State name.",
"latitude": 27.175193925922862,
"longitude": 78.04213533235064,
"reference": "Near to Mercado Pago"
}
}'
{
"id": 1234567,
"name": "Sucursal Instore",
"date_created": "2019-08-08T19:29:45.019Z",
"business_hours": {
"monday": [
{
"open": "08:00",
"close": "12:00"
}
],
"tuesday": [
{
"open": "09:00",
"close": "18:00"
}
]
},
"location": {
"address_line": "Example Street Name, 0123, City name, State name.",
"latitude": 27.175193925922862,
"longitude": 78.04213533235064,
"reference": "Near to Mercado Pago"
},
"external_id": "SUC001"
}