When trying your JSON I noticed several issues:
First the phone numbers are not valid, we recommend you to use the international format: +34915557722 instead of 91 555 77 22 for the pickup phone number and +34654466999 instead of 654466999 for the dropoff phone number.
Please refer to How should I format phone numbers? for more details.
In addition to my previous answer we noticed that you send Calle del Corregidor Diego de Valderr\xE1bano 25, 28030 Madrid as the dropoff address. There is an encoding issue on the á. We are expecting an UTF-8 encoding.
Both addresses have been validated OK for your “validate” service
and the same error keeps coming.
org.springframework.web.client.HttpServerErrorException: 500 Internal Server Error
Can you help us, please?
{
“job”:{
“pickups”:[
{
“address”:“Calle del Camino de los Vinateros 1, 28030 Madrid”,
“comment”:“Preguntar por Alcampo”,
“contact”:{
“firstname”:“Encagardo”,
“lastname”:“Alcampo”,
“company”:“Alcampo Moratalaz”,
“phone”:“+34914376012”,
“email":"emailTienda@yopmail.com”
}
}
],
“dropoffs”:[
{
“address”:“Calle del Corregidor Diego de Valderrábano 25, 28030 Madrid”,
“comment”:“piso 2, puerta izq.”,
“contact”:{
“firstname”:“Raul”,
“phone”:“+34654666999”
}
}
],
“transport_type”:“motorbike”
}
}
Can you try without the strange \xE1 character in the dropoff address String?
You are currently sending us: Calle del Corregidor Diego de Valderr\xE1bano 25, 28030 Madrid but we are expecting UTF-8 encoding only so it leads to an invalid byte sequence in UTF-8 error.
OK i have tested this address Calle del Corregidor Diego de Valderrabano 25, 28030 Madrid.
the result is ERROR,:
{“error”:“RECORD_INVALID”,“message”:“Unable to save record”,“data”:{“deliveries”:[“is invalid”,“Origin place: can’t be blank”,“Origin place: Address: This location is out of range”]}}
We have validated the two addresses with your “validate” service, and both return us ok. Why does he tell us something else here?
JSON Create Job
{
“job”:{
“pickups”:[
{
“address”:“Calle del Camino de los Vinateros 1, 28030 Madrid”,
“comment”:“Preguntar por Alcampo”,
“contact”:{
“firstname”:“Encagardo”,
“lastname”:“Alcampo”,
“company”:“Alcampo Moratalaz”,
“phone”:“+34914376012”,
“email":"emailTienda@yopmail.com”
}
}
],
“dropoffs”:[
{
“address”:“Calle del Corregidor Diego de Valderrabano 25, 28030 Madrid”,
“comment”:“piso 2, puerta izq.”,
“contact”:{
“firstname”:“Raul”,
“phone”:“+34654666999”
}
}
],
“transport_type”:“motorbike”
}
}
Good, so the error was indeed about the UTF-8 encoding.
In fact the Calle del Camino de los Vinateros 1, 28030 Madrid is indeed out of range, the address you validated before was not exactly the same but CC Moratalaz Camino De Vinateros, 28030 Madrid.
Notice also that when using the validate address endpoint you must specify either picking or delivering type from which the zone coverage depends on.
To deliver from the address above we recommend you to use the following address as the pickup address: Alcampo Moratalaz, Calle del Camino de los Vinateros, s/n, 28017 Madrid, Spain which is inside the picking zone.