---
title: "Update address"
method: PATCH
path: "/ecommerce/addresses/{addressId}"
tags: ["🛒 Ecommerce"]
---

# Update address

`PATCH /ecommerce/addresses/{addressId}`

The API endpoint allows a logged-in user to update their address based on the `addressId` provided.

This functionality ensures that users can only update their own addresses within the context of an ecommerce application.

By accessing this endpoint and providing the `addressId` of the address to be updated and necessary fields, the logged-in user can modify the address details such as street, city, state, or postal code etc.

## Request body

- object
  - `addressLine1` string
  - `addressLine2` string
  - `city` string
  - `state` string
  - `pincode` string
  - `country` string

## Response `200`

Update address

- object
  - `data` object
    - `__v` number
    - `_id` string
    - `addressLine1` string
    - `addressLine2` string
    - `city` string
    - `country` string
    - `createdAt` string
    - `owner` string
    - `pincode` string
    - `state` string
    - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
