---
title: "Update address"
---

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

Path: Sureshake API › entities

`PUT /v2/entities/{id}/addresses/{addressId}`

## Path parameters

- `id` (`entity-update-address.path.id`; string, required)
  - format `uuid`
- `addressId` (`entity-update-address.path.addressId`; string, required)
  - format `uuid`

## Request body

- `addressType` (`entity-update-address.addressType`; string, optional)
  - one of `"headquarters"`, `"office"`, `"mailing"`, `"billing"`, `"shipping"`, `"registered"`, `"branch"`, `"warehouse"`, `"other"`
- `isPrimary` (`entity-update-address.isPrimary`; boolean, optional)
- `isActive` (`entity-update-address.isActive`; boolean, optional)
- `label` (`entity-update-address.label`; string, optional, nullable)
  - maxLength 100
- `notes` (`entity-update-address.notes`; string, optional, nullable)
  - maxLength 500
- `phone` (`entity-update-address.phone`; string, optional, nullable)
  - maxLength 50
- `fax` (`entity-update-address.fax`; string, optional, nullable)
  - maxLength 50
- `email` (`entity-update-address.email`; string, optional, nullable)
  - format `email`
- `effectiveFrom` (`entity-update-address.effectiveFrom`; string, optional, nullable)
  - format `date-time`
- `effectiveUntil` (`entity-update-address.effectiveUntil`; string, optional, nullable)
  - format `date-time`

## Example request

```json
{
  "addressType": "headquarters",
  "isPrimary": true,
  "isActive": true,
  "label": "string",
  "notes": "string",
  "phone": "string",
  "fax": "string",
  "email": "user@example.com",
  "effectiveFrom": "2019-08-24T14:15:22Z",
  "effectiveUntil": "2019-08-24T14:15:22Z"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.sureshake.com/v2/entities/<id>/addresses/<addressId>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "addressType": "headquarters",
  "isPrimary": true,
  "isActive": true,
  "label": "string",
  "notes": "string",
  "phone": "string",
  "fax": "string",
  "email": "user@example.com",
  "effectiveFrom": "2019-08-24T14:15:22Z",
  "effectiveUntil": "2019-08-24T14:15:22Z"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/entities/<id>/addresses/<addressId>';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    addressType: 'headquarters',
    isPrimary: true,
    isActive: true,
    label: 'string',
    notes: 'string',
    phone: 'string',
    fax: 'string',
    email: 'user@example.com',
    effectiveFrom: '2019-08-24T14:15:22Z',
    effectiveUntil: '2019-08-24T14:15:22Z'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/entities/<id>/addresses/<addressId>"

payload = {
    "addressType": "headquarters",
    "isPrimary": True,
    "isActive": True,
    "label": "string",
    "notes": "string",
    "phone": "string",
    "fax": "string",
    "email": "user@example.com",
    "effectiveFrom": "2019-08-24T14:15:22Z",
    "effectiveUntil": "2019-08-24T14:15:22Z"
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "address": {
    "addressType": "headquarters",
    "isPrimary": true,
    "isActive": true,
    "label": "string",
    "notes": "string",
    "phone": "string",
    "fax": "string",
    "email": "user@example.com",
    "effectiveFrom": "2019-08-24T14:15:22Z",
    "effectiveUntil": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "addressId": "785d1fc4-8ab5-48f1-8685-117cac9865d6",
    "createdBy": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
```

- `address` (`entity-update-address.response.200.address`; object, required)
  - `addressType` (`entity-update-address.response.200.address.addressType`; string, required)
    - one of `"headquarters"`, `"office"`, `"mailing"`, `"billing"`, `"shipping"`, `"registered"`, `"branch"`, `"warehouse"`, `"other"`
  - `isPrimary` (`entity-update-address.response.200.address.isPrimary`; boolean, required)
  - `isActive` (`entity-update-address.response.200.address.isActive`; boolean, required)
  - `effectiveFrom` (`entity-update-address.response.200.address.effectiveFrom`; string, required)
    - format `date-time`
  - `id` (`entity-update-address.response.200.address.id`; string, required)
    - format `uuid`
  - `entityId` (`entity-update-address.response.200.address.entityId`; string, required)
    - format `uuid`
  - `addressId` (`entity-update-address.response.200.address.addressId`; string, required)
    - format `uuid`
  - `createdBy` (`entity-update-address.response.200.address.createdBy`; string, required)
  - `createdAt` (`entity-update-address.response.200.address.createdAt`; string, required)
    - format `date-time`
  - `label` (`entity-update-address.response.200.address.label`; string, optional, nullable)
    - maxLength 100
  - `notes` (`entity-update-address.response.200.address.notes`; string, optional, nullable)
    - maxLength 500
  - `phone` (`entity-update-address.response.200.address.phone`; string, optional, nullable)
    - maxLength 50
  - `fax` (`entity-update-address.response.200.address.fax`; string, optional, nullable)
    - maxLength 50
  - `email` (`entity-update-address.response.200.address.email`; string, optional, nullable)
    - format `email`
  - `effectiveUntil` (`entity-update-address.response.200.address.effectiveUntil`; string, optional, nullable)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.400.error`; object, required)
  - `code` (`entity-update-address.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.401.error`; object, required)
  - `code` (`entity-update-address.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.403.error`; object, required)
  - `code` (`entity-update-address.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.404.error`; object, required)
  - `code` (`entity-update-address.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.409.error`; object, required)
  - `code` (`entity-update-address.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 422

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.422.error`; object, required)
  - `code` (`entity-update-address.response.422.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.422.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.422.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.422.error.traceId`; string, optional) — Unique ID for log correlation

### 429

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.429.error`; object, required)
  - `code` (`entity-update-address.response.429.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.429.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.429.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.429.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.500.error`; object, required)
  - `code` (`entity-update-address.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`entity-update-address.response.503.error`; object, required)
  - `code` (`entity-update-address.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`entity-update-address.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`entity-update-address.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`entity-update-address.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/entity-update-address/index.md
