Endereço - GrupoBRA/SocialAPI-v2-Doc GitHub Wiki
Obtendo um endereço
Endpoint: /v1/endereco/{end_id}/
GET
Retorno:
{
"success":true,
"data":{
"SocialAPI":{
"end_id":"{id}",
"cidade_cod":999,
"bairro_cod":99,
"end_cep":"78455000",
"end_tipo_lograd":"AVENIDA",
"end_lograd":"Sobe e Desce",
"end_num":"379S",
"end_compl":"Onde ninguém me conhece",
"author":{
"oid":"{oid}",
"uupfid":"{uupfid}",
"nome":"Nome do autor",
"timestamp":123123
}
}
}
}
Inserindo um endereço
Endpoint: /v1/endereco/
POST
Payload:
{
"cidade_cod":999,
"bairro_cod":99,
"end_cep":"78455000",
"end_tipo_lograd":"AVENIDA",
"end_lograd":"Sobe e Desce",
"end_num":"379S",
"end_compl":"Onde ninguém me conhece",
"device":{
"id":"7df0723b4c86ab59711ea26c66642c47",
"log":{
"lat":"-7.9839111",
"lon":"-34.8387671"
}
}
}
Retorno:
Status code: 201
{
"success":true,
"data":{
"SocialAPI":{
"end_id": "{end_id}"
}
}
}
Removendo um endereço
Endpoint: /v1/endereco/{end_id}/
DELETE
Payload:
{
"device":{
"id":"7df0723b4c86ab59711ea26c66642c47",
"log":{
"lat":"-7.9839111",
"lon":"-34.8387671"
}
}
}
Retorno:
Status code: 204