> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update shipping address

> Update an existing shipping address in the shopper's address book.

## Request

```http theme={null}
PATCH /user/address/{addressId}
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
Content-Type: application/json

{
    "name": "Jane A. Smith",
    "phone": "+2348011112222"
}
```

## Path parameters

| Parameter   | Type   | Description                      |
| ----------- | ------ | -------------------------------- |
| `addressId` | string | The id of the address to update. |

<Note>
  Updating the **core address fields** (`address`, `city`, `state`, or `country`)
  re-runs address validation against the shipping provider, which requires the
  address to also carry an `email` and `latitude`/`longitude`. Updating only
  contact fields such as `name` or `phone` skips that step.
</Note>

## Successful response

```json theme={null}
{
    "status": 200,
    "success": true,
    "message": "Address updated successfully",
    "data": {
        "address": {
            "_id": "651f8a9b2c3d4e5f60718300",
            "name": "Jane A. Smith",
            "phone": "+2348011112222",
            "city": "Lagos",
            "state": "Lagos",
            "country": "Nigeria",
            "isDefault": false,
            "updatedAt": "2026-06-18T03:25:00.000Z"
        }
    }
}
```

## Error responses

```json theme={null}
{
    "status": 400,
    "success": false,
    "message": "\"addressId\" length must be 24 characters long",
    "data": {}
}
```

```json theme={null}
{
    "status": 404,
    "success": false,
    "message": "Address not found or unauthorized",
    "data": {}
}
```


## OpenAPI

````yaml PATCH /user/address/{addressId}
openapi: 3.1.0
info:
  title: Salesive Store API
  description: >-
    REST interface for querying products, categories, and merchandising banners
    exposed by Salesive storefronts.
  version: 1.0.0
servers:
  - description: Production
    url: https://store.salesive.com/api/v1
security:
  - BearerAuth: []
    ShopIdHeader: []
paths:
  /user/address/{addressId}:
    patch:
      summary: Update a shipping address
      description: >-
        Update an existing address. Changing core fields (`address`, `city`,
        `state`, `country`) triggers address validation, which requires `email`
        and coordinates.
      parameters:
        - $ref: '#/components/parameters/XShopIdHeader'
        - name: addressId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - phone
              properties:
                name:
                  type: string
                  example: Jane Smith
                phone:
                  type: string
                  example: '+2348099887766'
                email:
                  type: string
                  format: email
                  example: jane@example.com
                address:
                  type: string
                  example: 12 Marina Road
                city:
                  type: string
                  example: Lagos
                state:
                  type: string
                  example: Lagos
                zipCode:
                  type: string
                  example: '100001'
                country:
                  type: string
                  example: Nigeria
                latitude:
                  type: number
                  example: 6.5244
                longitude:
                  type: number
                  example: 3.3792
                landmark:
                  type: string
                isDefault:
                  type: boolean
                  example: false
      responses:
        '200':
          description: Address updated.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid address id.
        '404':
          description: Address not found.
components:
  parameters:
    XShopIdHeader:
      name: x-shop-id
      in: header
      description: >-
        Optional identifier that scopes responses to a specific storefront when
        the referer cannot be inferred.
      required: false
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT issued by the Salesive Store API for authenticated shoppers.
    ShopIdHeader:
      type: apiKey
      in: header
      name: x-shop-id
      description: >-
        Optional storefront identifier sent as a header to scope responses to a
        specific shop. Try It requests remember this value once provided.

````