POST
/
v1
/
:customer
/
addresses
Criando Endereços
curl --request POST \
  --url https://lojinha.dev/api/v1/:customer/addresses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "address": {
    "alias": "<string>",
    "zipcode": "<string>",
    "street": "<string>",
    "state": "<string>",
    "city": "<string>",
    "country": "<string>",
    "neightborhood": "<string>",
    "number": "<string>",
    "complement": "<string>"
  }
}'
{
  "address": {
    "id": "96c0e914-0094-4694-b735-a54633f8dfbc",
    "alias": "Casa",
    "zipcode": "87045-700",
    "street": "Praça Pioneiro Antônio Laurentino Tavares",
    "state": "PR",
    "city": "Maringá",
    "country": "Brasil",
    "neightborhood": "Jd. América",
    "number": "200",
    "complement": "Casa Azul",
    "customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
    "createdAt": "2023-07-24T14:46:19.941Z",
    "updatedAt": null,
    "deletedAt": null
  }
}
Cria um endereço para um cliente.

URL

customer
uuid
required
ID do cliente.

Body

address
object
required
Dados do endereço do cliente.

Resposta

address
object
Endereço do cliente.
{
  "address": {
    "id": "96c0e914-0094-4694-b735-a54633f8dfbc",
    "alias": "Casa",
    "zipcode": "87045-700",
    "street": "Praça Pioneiro Antônio Laurentino Tavares",
    "state": "PR",
    "city": "Maringá",
    "country": "Brasil",
    "neightborhood": "Jd. América",
    "number": "200",
    "complement": "Casa Azul",
    "customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
    "createdAt": "2023-07-24T14:46:19.941Z",
    "updatedAt": null,
    "deletedAt": null
  }
}