Skip to content
Docs

Create Organization Address

client.Organizations.Address.New(ctx, organizationID, body) (*OrganizationAddress, error)
POST/v1/organizations/{organization_id}/address

Create the address for an organization

ParametersExpand Collapse
organizationID string
body AddressNewParams
City param.Field[string]

City or locality.

maxLength255
minLength1
Country param.Field[string]

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

Line1 param.Field[string]

First line of the street address.

maxLength255
minLength1
PostalCode param.Field[string]

Postal or ZIP code.

maxLength255
minLength1
Line2 param.Field[string]Optional

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

maxLength255
State param.Field[string]Optional

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

maxLength255
TaxID param.Field[string]Optional

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

maxLength255
TaxIDType param.Field[string]Optional

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

maxLength255
ReturnsExpand Collapse
type OrganizationAddress struct{…}

Organization address details.

ID string

Address ID.

City string

City or locality.

Country string

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

CreatedAt Time

When the address was created.

formatdate-time
Line1 string

First line of the street address.

Line2 string

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

OrganizationID string

Organization ID the address belongs to.

PostalCode string

Postal or ZIP code.

State string

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

TaxID string

Tax identification number. Null when not provided.

TaxIDType string

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

UpdatedAt Time

When the address was updated.

formatdate-time

Create Organization Address

package main

import (
  "context"
  "fmt"

  "github.com/nirvana-labs/nirvana-go"
  "github.com/nirvana-labs/nirvana-go/option"
  "github.com/nirvana-labs/nirvana-go/organizations"
)

func main() {
  client := nirvana.NewClient(
    option.WithAPIKey("My API Key"),
  )
  organizationAddress, err := client.Organizations.Address.New(
    context.TODO(),
    "organization_id",
    organizations.AddressNewParams{
      City: "San Francisco",
      Country: "US",
      Line1: "123 Main St",
      PostalCode: "94105",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", organizationAddress.ID)
}
{
  "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"
}
Returns Examples
{
  "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"
}