Skip to Content
HomeLink Hub
Users & Profile

Update the user's address

PUT
/api/v1/user/address

Access: Bearer token required.

Partially updates the user's address; only the fields sent are changed. addresses replaces the whole list of address lines (it is not appended to) and may hold up to 10 entries. The response returns the complete address object.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Request Body

application/json
  1. body
addresses?array<>

Array of address lines, up to 10 entries of at most 255 characters each. Replaces the existing list.

Itemsitems <= 10
country?string

Country, up to 100 characters.

Lengthlength <= 100
state?string

State or region, up to 100 characters.

Lengthlength <= 100
postalCode?string

Postal code, up to 20 characters.

Lengthlength <= 20

Response Body

Address saved

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PUT 'http://localhost:4000/api/v1/user/address' \  -H 'Content-Type: application/json' \  -d '{  "addresses": [    "14 Admiralty Way, Lekki Phase 1"  ],  "country": "Nigeria",  "state": "Lagos",  "postalCode": "106104"}'
Example Response
{  "status": 200,  "success": true,  "message": "Address updated successfully.",  "data": {    "address": {      "addresses": [        "14 Admiralty Way, Lekki Phase 1"      ],      "country": "Nigeria",      "state": "Lagos",      "postalCode": "106104"    }  }}