# Address

## Create Organization Address

`$ nirvana organizations:address create`

**post** `/v1/organizations/{organization_id}/address`

Create the address for an organization

### Parameters

- `--organization-id: string`

  Organization ID

- `--city: string`

  City or locality.

- `--country: string`

  Two-letter ISO 3166-1 alpha-2 country code.

- `--line1: string`

  First line of the street address.

- `--postal-code: string`

  Postal or ZIP code.

- `--line2: optional string`

  Second line of the street address (suite, unit, building).

- `--state: optional string`

  State, province, or region. Required by some tax jurisdictions (e.g. US, CA).

- `--tax-id: optional string`

  Tax identification number (e.g. VAT, EIN, ABN). Optional.

- `--tax-id-type: optional string`

  Type of the tax identification number (e.g. eu_vat, us_ein, gb_vat, au_abn). Optional.

### Returns

- `organization_address: object { id, city, country, 9 more }`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string`

    State, province, or region. Null when not provided.

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.

### Example

```cli
nirvana organizations:address create \
  --api-key 'My API Key' \
  --organization-id organization_id \
  --city 'San Francisco' \
  --country US \
  --line1 '123 Main St' \
  --postal-code 94105
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "city": "San Francisco",
  "country": "US",
  "created_at": "2025-01-01T00:00:00Z",
  "line1": "123 Main St",
  "line2": "Suite 400",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "postal_code": "94105",
  "state": "CA",
  "tax_id": "EU372000000",
  "tax_id_type": "eu_vat",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Get Organization Address

`$ nirvana organizations:address get`

**get** `/v1/organizations/{organization_id}/address`

Get the address for an organization

### Parameters

- `--organization-id: string`

  Organization ID

### Returns

- `organization_address: object { id, city, country, 9 more }`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string`

    State, province, or region. Null when not provided.

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.

### Example

```cli
nirvana organizations:address get \
  --api-key 'My API Key' \
  --organization-id organization_id
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "city": "San Francisco",
  "country": "US",
  "created_at": "2025-01-01T00:00:00Z",
  "line1": "123 Main St",
  "line2": "Suite 400",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "postal_code": "94105",
  "state": "CA",
  "tax_id": "EU372000000",
  "tax_id_type": "eu_vat",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Update Organization Address

`$ nirvana organizations:address update`

**patch** `/v1/organizations/{organization_id}/address`

Update the address for an organization

### Parameters

- `--organization-id: string`

  Organization ID

- `--city: optional string`

  City or locality.

- `--country: optional string`

  Two-letter ISO 3166-1 alpha-2 country code.

- `--line1: optional string`

  First line of the street address.

- `--line2: optional string`

  Second line of the street address (suite, unit, building). Omit to leave
  unchanged, send null to clear, or send a value to set it.

- `--postal-code: optional string`

  Postal or ZIP code.

- `--state: optional string`

  State, province, or region. Omit to leave unchanged, send null to clear,
  or send a value to set it.

- `--tax-id: optional string`

  Tax identification number (e.g. VAT, EIN, ABN). Omit to leave unchanged,
  send null to clear, or send a value to set it.

- `--tax-id-type: optional string`

  Type of the tax identification number (e.g. eu_vat, us_ein, gb_vat, au_abn).
  Omit to leave unchanged, send null to clear, or send a value to set it.

### Returns

- `organization_address: object { id, city, country, 9 more }`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string`

    State, province, or region. Null when not provided.

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.

### Example

```cli
nirvana organizations:address update \
  --api-key 'My API Key' \
  --organization-id organization_id
```

#### Response

```json
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "city": "San Francisco",
  "country": "US",
  "created_at": "2025-01-01T00:00:00Z",
  "line1": "123 Main St",
  "line2": "Suite 400",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "postal_code": "94105",
  "state": "CA",
  "tax_id": "EU372000000",
  "tax_id_type": "eu_vat",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

## Domain Types

### Organization Address

- `organization_address: object { id, city, country, 9 more }`

  Organization address details.

  - `id: string`

    Address ID.

  - `city: string`

    City or locality.

  - `country: string`

    Two-letter ISO 3166-1 alpha-2 country code.

  - `created_at: string`

    When the address was created.

  - `line1: string`

    First line of the street address.

  - `line2: string`

    Second line of the street address. Null when not provided.

  - `organization_id: string`

    Organization ID the address belongs to.

  - `postal_code: string`

    Postal or ZIP code.

  - `state: string`

    State, province, or region. Null when not provided.

  - `tax_id: string`

    Tax identification number. Null when not provided.

  - `tax_id_type: string`

    Type of the tax identification number. Null when not provided.

  - `updated_at: string`

    When the address was updated.
