> ## 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.

# Add shipping address

> Add a new shipping address to the authenticated shopper's address book.

## Request

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

{
    "name": "Jane Smith",
    "phone": "+2348099887766",
    "address": "12 Marina Road",
    "city": "Lagos",
    "state": "Lagos",
    "country": "Nigeria",
    "isDefault": false
}
```

## Body parameters

| Field       | Type    | Description                                 |
| ----------- | ------- | ------------------------------------------- |
| `name`      | string  | **Required.** Recipient name (2–100 chars). |
| `phone`     | string  | **Required.** Contact phone (6–30 chars).   |
| `email`     | string  | Optional. Recipient email.                  |
| `address`   | string  | Optional. Street address.                   |
| `city`      | string  | Optional.                                   |
| `state`     | string  | Optional.                                   |
| `zipCode`   | string  | Optional.                                   |
| `country`   | string  | Optional.                                   |
| `latitude`  | number  | Optional. `-90` to `90`.                    |
| `longitude` | number  | Optional. `-180` to `180`.                  |
| `landmark`  | string  | Optional.                                   |
| `isDefault` | boolean | Optional. Make this the default address.    |

## Successful response

```json theme={null}
{
    "status": 200,
    "success": true,
    "message": "Address added successfully",
    "data": {
        "address": {
            "_id": "651f8a9b2c3d4e5f60718300",
            "user": "651f8a1b2c3d4e5f60718293",
            "name": "Jane Smith",
            "phone": "+2348099887766",
            "address": "12 Marina Road",
            "city": "Lagos",
            "state": "Lagos",
            "country": "Nigeria",
            "isDefault": false,
            "createdAt": "2026-06-18T03:21:00.000Z",
            "updatedAt": "2026-06-18T03:21:00.000Z"
        }
    }
}
```

## Error response

```json theme={null}
{
    "status": 400,
    "success": false,
    "message": "\"phone\" is required",
    "data": {}
}
```


## OpenAPI

````yaml POST /user/address
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:
    post:
      summary: Add a shipping address
      description: Add a new shipping address to the authenticated shopper's address book.
      parameters:
        - $ref: '#/components/parameters/XShopIdHeader'
      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 added.
          content:
            application/json:
              schema:
                type: object
        '201':
          description: Address added.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Validation error.
        '401':
          description: Authentication required.
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.

````