Skip to main content
PATCH
/
user
/
address
/
{addressId}
/
default
Set default shipping address
curl --request PATCH \
  --url https://store.salesive.com/api/v1/user/address/{addressId}/default \
  --header 'Authorization: Bearer <token>' \
  --header 'x-shop-id: <api-key>'
{}

Request

PATCH /user/address/{addressId}/default
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Path parameters

ParameterTypeDescription
addressIdstringThe id of the address to set as default.
Setting a new default automatically clears the previous default address.

Successful response

{
    "status": 200,
    "success": true,
    "message": "Default address updated",
    "data": {
        "address": {
            "_id": "651f8a9b2c3d4e5f60718300",
            "name": "Jane Smith",
            "isDefault": true,
            "updatedAt": "2026-06-18T03:26:00.000Z"
        }
    }
}

Error responses

{
    "status": 400,
    "success": false,
    "message": "\"addressId\" length must be 24 characters long",
    "data": {}
}
{
    "status": 404,
    "success": false,
    "message": "Address not found or unauthorized",
    "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Path Parameters

addressId
string
required

Response

Default address updated.

The response is of type object.