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
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
}
}
Show child attributes
{
"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
}
}