Lob.com Addresses API
To add an address to your address book, you create a new address object. You can retrieve and delete individual addresses as well as get a list of addresses. Addresses are identified by a unique random ID. back to top
To add an address to your address book, you create a new address object. You can retrieve and delete individual addresses as well as get a list of addresses. Addresses are identified by a unique random ID. back to top
openapi: 3.0.3
info:
title: Lob Accounts Addresses API
version: 1.22.0
description: 'The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p>
'
license:
name: MIT
url: https://mit-license.org/
contact:
name: Lob Developer Experience
url: https://support.lob.com/
email: lob-openapi@lob.com
termsOfService: https://www.lob.com/legal
servers:
- url: https://api.lob.com/v1
description: production
security:
- basicAuth: []
tags:
- name: Addresses
description: 'To add an address to your address book, you create a new address object. You can retrieve and delete individual
addresses as well as get a list of addresses. Addresses are identified by a unique random ID.
<div class="back-to-top" ><a href="#" onclick="toTopLink()">back to top</a></div>
'
paths:
/addresses:
get:
operationId: addresses_list
summary: List
description: Returns a list of your addresses. The addresses are returned sorted by creation date, with the most recently created addresses appearing first.
tags:
- Addresses
parameters:
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/before_after'
- $ref: '#/components/parameters/include'
- $ref: '#/components/parameters/date_created'
- $ref: '#/components/parameters/metadata'
responses:
'200':
$ref: '#/components/responses/all_addresses'
default:
$ref: '#/components/responses/address_error'
x-codeSamples:
- lang: Shell
source: "curl -X GET \"https://api.lob.com/v1/addresses?limit=2\" \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
label: CURL
- lang: Typescript
source: "try {\n const addresses = await new AddressesApi(config).list(2);\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.addresses.list({limit: 2}, function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Ruby
source: "addressesApi = AddressesApi.new(config)\n\nbegin\n addresses = addressesApi.list({ limit: 2 })\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Python
source: "with ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n addresses = api.list(limit=2)\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->list(\n 2, // limit\n );\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
- lang: Java
source: "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n AddressList response = apiInstance.list(\n 2, // limit\n null, // before\n null, // after\n null, // include\n null, // dateCreated\n null // metadata\n );\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
label: JAVA
- lang: Elixir
source: 'Lob.Address.list(%{limit: 2})
'
label: ELIXIR
- lang: CSharp
source: "AddressesApi api = new AddressesApi(config);\n\nList<string> includeList = new List<string>();\nincludeList.Add(\"total_count\");\nDictionary<String, String> metadata = new Dictionary<String, String>();\nmetadata.Add(\"name\", \"Harry\");\nDictionary<String, DateTime> dateCreated = new Dictionary<String, DateTime>();\nDateTime dateCreatedDate = DateTime.Today.AddMonths(-1);\ndateCreated.Add(\"lt\", dateCreatedDate);\n\ntry {\n AddressList response = api.list(\n 2, // limit\n null, // before\n null, // after\n includeList, // include\n dateCreated, // dateCreated\n metadata // metadata\n );\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\nAddressList = apiClient.AddressesApi.List(context).Execute()\nif err != nil {\n return err\n}\n"
label: GO
post:
operationId: address_create
summary: Create
description: Creates a new address given information
tags:
- Addresses
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/address_editable'
examples:
full_us:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: 210 King St
address_line2: '# 6100'
address_city: San Francisco
address_state: CA
address_zip: '94107'
address_country: US
ncoa_us_test:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: NCOA
address_line2: '#6100'
address_city: San Francisco
address_state: CA
address_zip: '94107'
address_country: US
full_intl:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: 370 WATER ST
address_line2: ''
address_city: SUMMERSIDE
address_state: PRINCE EDWARD ISLAND
address_zip: C1N 1C4
address_country: CA
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/address_editable'
examples:
full_us:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: 210 King St
address_line2: '# 6100'
address_city: San Francisco
address_state: CA
address_zip: '94107'
address_country: US
ncoa_us_test:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: NCOA
address_line2: '# 6100'
address_city: San Francisco
address_state: CA
address_zip: '94107'
address_country: US
full_intl:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: 370 WATER ST
address_line2: ''
address_city: SUMMERSIDE
address_state: PRINCE EDWARD ISLAND
address_zip: C1N 1C4
address_country: CA
encoding:
metadata:
style: deepObject
explode: true
multipart/form-data:
schema:
$ref: '#/components/schemas/address_editable'
examples:
full_us:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: 210 King St
address_line2: '# 6100'
address_city: San Francisco
address_state: CA
address_zip: '94107'
address_country: US
ncoa_us_test:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: NCOA
address_line2: '# 6100'
address_city: San Francisco
address_state: CA
address_zip: '94107'
address_country: US
full_intl:
value:
description: Harry - Office
name: Harry Zhang
company: Lob
email: harry@lob.com
phone: '5555555555'
address_line1: 370 WATER ST
address_line2: ''
address_city: SUMMERSIDE
address_state: PRINCE EDWARD ISLAND
address_zip: C1N 1C4
address_country: CA
responses:
'200':
$ref: '#/components/responses/post_address'
default:
$ref: '#/components/responses/address_error'
x-codeSamples:
- lang: Shell
source: "curl https://api.lob.com/v1/addresses \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: \\\n -d \"description=Harry - Office\" \\\n -d \"name=Harry Zhang\" \\\n -d \"company=Lob\" \\\n -d \"email=harry@lob.com\" \\\n -d \"phone=5555555555\" \\\n -d \"address_line1=210 King St\" \\\n -d \"address_line2=# 6100\" \\\n -d \"address_city=San Francisco\" \\\n -d \"address_state=CA\" \\\n -d \"address_zip=94107\" \\\n -d \"address_country=US\"\n"
label: CURL
- lang: Typescript
source: "const addressCreate = new AddressEditable({\n description: 'Harry - Office',\n name: 'Harry Zhang',\n company: 'Lob',\n email: 'harry@lob.com',\n phone: '5555555555',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107',\n address_country: 'US'\n});\n\ntry {\n const myAddress = await new AddressesApi(config).create(addressCreate);\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.addresses.create({\n description: 'Harry - Office',\n name: 'Harry Zhang',\n company: 'Lob',\n email: 'harry@lob.com',\n phone: '5555555555',\n address_line1: '210 King St',\n address_line2: '# 6100',\n address_city: 'San Francisco',\n address_state: 'CA',\n address_zip: '94107',\n address_country: 'US'\n}, function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Ruby
source: "addressCreate = AddressEditable.new({\n description: \"Harry - Office\",\n name: \"Harry Zhang\",\n company: \"Lob\",\n email: \"harry@lob.com\",\n phone: \"5555555555\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_zip: \"94107\",\n address_country: \"US\",\n});\n\naddressApi = AddressesApi.new(config)\n\nbegin\n createdAddress = addressApi.create(addressCreate)\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Python
source: "address_editable = AddressEditable(\n description = \"Harry - Office\",\n name = \"Harry Zhang\",\n company = \"Lob\",\n email = \"harry@lob.com\",\n phone = \"5555555555\",\n address_line1 = \"210 King St\",\n address_line2 = \"# 6100\",\n address_city = \"San Francisco\",\n address_state = \"CA\",\n address_zip = \"94107\",\n address_country = CountryExtended(\"US\"),\n)\n\nwith ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n created_address = api.create(address_editable)\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\n$address_editable = new OpenAPI\\Client\\Model\\AddressEditable(\n array(\n \"description\" => \"Harry - Office\",\n \"name\" => \"Harry Zhang\",\n \"company\" => \"Lob\",\n \"email\" => \"harry@lob.com\",\n \"phone\" => \"5555555555\",\n \"address_line1\" => \"210 King St\",\n \"address_line2\" => \"# 6100\",\n \"address_city\" => \"San Francisco\",\n \"address_state\" => \"CA\",\n \"address_zip\" => \"94107\",\n \"address_country\" => \"US\",\n )\n);\n\ntry {\n $result = $apiInstance->create($address_editable);\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
- lang: Java
source: "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n AddressEditable addressEditable = new AddressEditable();\n addressEditable.setDescription(\"Harry - Office\");\n addressEditable.setName(\"Harry Zhang\");\n addressEditable.setCompany(\"Lob\");\n addressEditable.setEmail(\"harry@lob.com\");\n addressEditable.setPhone(\"5555555555\");\n addressEditable.setAddressLine1(\"210 King St\");\n addressEditable.setAddressLine2(\"# 6100\");\n addressEditable.setAddressCity(\"San Francisco\");\n addressEditable.setAddressState(\"CA\");\n addressEditable.setAddressZip(\"94107\");\n addressEditable.setAddressCountry(CountryExtended.US);\n\n Address result = apiInstance.create(addressEditable);\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
label: JAVA
- lang: Elixir
source: "Lob.Address.create(%{\n description: \"Harry - Office\",\n name: \"Harry Zhang\",\n company: \"Lob\",\n email: \"harry@lob.com\",\n phone: \"5555555555\",\n address_line1: \"210 King St\",\n address_line2: \"# 6100\",\n address_city: \"San Francisco\",\n address_state: \"CA\",\n address_country: \"US\",\n address_zip: \"94107\"\n})\n"
label: ELIXIR
- lang: CSharp
source: "AddressesApi api = new AddressesApi(config);\n\nAddressEditable addressEditable = new AddressEditable(\n \"210 King St\", // addressLine1\n \"# 6100\", // addressLine2\n \"San Francisco\", // addressCity\n \"CA\", // addressState\n \"94107\", // addressZip\n CountryExtended.US, // addressCountry\n \"Harry - Office\", // description\n \"Harry Zhang\", // name\n \"Lob\", // company\n \"5555555555\", // phone\n \"harry@lob.com\" // email\n);\n\ntry {\n Address result = api.create(addressEditable);\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\n\nvar addressCreate = *lob.NewAddressEditable()\naddressCreate.SetDescription(\"Harry - Office\")\naddressCreate.SetName(\"Harry Zhang\")\naddressCreate.SetCompany(\"Lob\")\naddressCreate.SetEmail(\"harry@lob.com\")\naddressCreate.SetPhone(\"5555555555\")\naddressCreate.SetAddressLine1(\"210 King St\")\naddressCreate.SetAddressLine2(\"# 6100\")\naddressCreate.SetAddressCity(\"San Francisco\")\naddressCreate.SetAddressState(\"CA\")\naddressCreate.SetAddressZip(\"94107\")\naddressCreate.SetAddressCountry(\"US\")\n\n\n\ncreatedaddress, _, err := apiClient.AddressesApi.Create(context).AddressEditable(addressCreate).Execute()\n\nif err != nil {\n return err\n}\n"
label: GO
/addresses/{adr_id}:
parameters:
- in: path
name: adr_id
description: id of the address
required: true
schema:
$ref: '#/components/schemas/adr_id'
get:
operationId: address_retrieve
summary: Retrieve
description: Retrieves the details of an existing address. You need only supply the unique identifier that was returned upon address creation.
tags:
- Addresses
responses:
'200':
$ref: '#/components/responses/address'
default:
$ref: '#/components/responses/address_error'
x-codeSamples:
- lang: Shell
source: "curl https://api.lob.com/v1/addresses/adr_fa85158b26c3eb7c \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
label: CURL
- lang: Typescript
source: "try {\n const address = await new AddressesApi(config).get('adr_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.addresses.retrieve('adr_fa85158b26c3eb7c', function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Ruby
source: "addressApi = AddressesApi.new(config)\n\nbegin\n retrievedAddress = addressApi.get(\"adr_fa85158b26c3eb7c\")\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Python
source: "with ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n address = api.get(\"adr_fa85158b26c3eb7c\")\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->get(\"adr_fa85158b26c3eb7c\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
- lang: Java
source: "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n Address response = apiInstance.get(\"adr_fa85158b26c3eb7c\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
label: JAVA
- lang: Elixir
source: 'Lob.Address.retrieve("adr_fa85158b26c3eb7c")
'
label: ELIXIR
- lang: CSharp
source: "AddressesApi api = new AddressesApi(config);\n\ntry {\n Address response = api.get(\"adr_fa85158b26c3eb7c\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\nfetchedAddress, _, err := apiClient.AddressesApi.Get(context,\"adr_fa85158b26c3eb7c\").Execute()\n\nif err != nil {\n return err\n}\n"
label: GO
delete:
operationId: address_delete
summary: Delete
description: Deletes the details of an existing address. You need only supply the unique identifier that was returned upon address creation.
tags:
- Addresses
responses:
'200':
$ref: '#/components/responses/address_deleted'
default:
$ref: '#/components/responses/address_error'
x-codeSamples:
- lang: Shell
source: "curl -X DELETE https://api.lob.com/v1/addresses/adr_43769b47aed248c2 \\\n -u test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc:\n"
label: CURL
- lang: Typescript
source: "try {\n const deleteAddress = await new AddressesApi(config).delete('adr_xxxx');\n} catch (err: any) {\n console.error(err);\n}\n"
label: TYPESCRIPT
- lang: Javascript
source: "Lob.addresses.delete('adr_43769b47aed248c2', function (err, res) {\n console.log(err, res);\n});\n"
label: NODE
- lang: Ruby
source: "addressApi = AddressesApi.new(config)\n\nbegin\n deletedAddress = addressApi.delete(\"adr_43769b47aed248c2\")\nrescue => err\n p err.message\nend\n"
label: RUBY
- lang: Python
source: "with ApiClient(configuration) as api_client:\n api = AddressesApi(api_client)\n\ntry:\n deleted_resource = api.delete(\"adr_43769b47aed248c2\")\nexcept ApiException as e:\n print(e)\n"
label: PYTHON
- lang: PHP
source: "$apiInstance = new OpenAPI\\Client\\Api\\AddressesApi($config, new GuzzleHttp\\Client());\n\ntry {\n $result = $apiInstance->delete(\"adr_43769b47aed248c2\");\n} catch (Exception $e) {\n echo $e->getMessage(), PHP_EOL;\n}\n"
- lang: Java
source: "AddressesApi apiInstance = new AddressesApi(config);\n\ntry {\n AddressDeletion response = apiInstance.delete(\"adr_43769b47aed248c2\");\n} catch (ApiException e) {\n e.printStackTrace();\n}\n"
label: JAVA
- lang: Elixir
source: 'Lob.Address.delete("adr_43769b47aed248c2")
'
label: ELIXIR
- lang: CSharp
source: "AddressesApi api = new AddressesApi(config);\n\ntry {\n AddressDeletion response = api.delete(\"adr_43769b47aed248c2\");\n} catch (ApiException e) {\n Console.WriteLine(e.ToString());\n}\n"
label: CSHARP
- lang: Go
source: "var context = context.Background()\ncontext = context.WithValue(suite.ctx, lob.ContextBasicAuth, lob.BasicAuth{UserName: os.Getenv(\"<YOUR_API_KEY>\")})\n\nvar apiClient = *lob.NewAPIClient(configuration)\n\ndeletedAddress, _, err := apiClient.AddressesApi.Delete(context, \"adr_43769b47aed248c2\").Execute()\n\nif err != nil {\n return err\n}\n"
label: GO
components:
schemas:
address_fields_us:
type: object
required:
- address_line1
- address_city
- address_state
- address_zip
properties:
address_line1:
type: string
description: The primary number, street name, and directional information.
maxLength: 64
address_line2:
type: string
description: An optional field containing any information which can't fit into line 1.
maxLength: 64
nullable: true
address_city:
type: string
maxLength: 200
address_state:
type: string
description: 2 letter state short-name code
pattern: ^[a-zA-Z]{2}$
address_zip:
type: string
description: 'Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.
'
pattern: ^\d{5}(-\d{4})?$
object:
type: string
description: Value is resource type.
date_created:
type: string
format: date-time
description: A timestamp in ISO 8601 format of the date the resource was created.
lob_base:
type: object
required:
- date_created
- date_modified
- object
properties:
date_created:
$ref: '#/components/schemas/date_created'
date_modified:
$ref: '#/components/schemas/date_modified'
deleted:
$ref: '#/components/schemas/deleted'
object:
$ref: '#/components/schemas/object'
country_extended:
type: string
description: Must be a 2 letter country short-name code (ISO 3166). Does not accept `US`, `AS`, `PR`, `FM`, `GU`, `MH`, `MP`, `PW`, or `VI`. For these addresses, please use the US verification API. Also does not accept `PS`, which is not currently supported.
enum:
- AD
- AE
- AF
- AG
- AI
- AL
- AN
- AO
- AQ
- AR
- AT
- AU
- AW
- AZ
- BA
- BB
- BD
- BE
- BF
- BG
- BH
- BI
- BJ
- BM
- BN
- BO
- BQ
- BR
- BS
- BT
- BW
- BY
- BZ
- CA
- CD
- CG
- CH
- CI
- CK
- CL
- CM
- CN
- CO
- CR
- CS
- CU
- CV
- CW
- CY
- CZ
- DE
- DJ
- DK
- DM
- DO
- DZ
- EC
- EE
- EG
- EH
- ER
- ES
- ET
- FI
- FJ
- FK
- FO
- FR
- GA
- GB
- GD
- GE
- GH
- GI
- GL
- GM
- GN
- GQ
- GR
- GS
- GT
- GW
- GY
- HK
- HN
- HR
- HT
- HU
- ID
- IE
- IL
- IN
- IO
- IQ
- IR
- IS
- IT
- JM
- JO
- JP
- KE
- KG
- KH
- KI
- KM
- KN
- KP
- KR
- KW
- KY
- KZ
- LA
- LB
- LC
- LI
- LK
- LR
- LS
- LT
- LU
- LV
- LY
- MA
- MC
- MD
- ME
- MG
- MK
- ML
- MM
- MN
- MO
- MR
- MS
- MT
- MU
- MV
- MW
- MX
- MY
- MZ
- NA
- NE
- NF
- NG
- NI
- NL
- 'NO'
- NP
- NR
- NU
- NZ
- OM
- PA
- PE
- PG
- PH
- PK
- PL
- PN
- PT
- PY
- QA
- RO
- RS
- RU
- RW
- SA
- SB
- SC
- SD
- SE
- SG
- SH
- SI
- SK
- SL
- SM
- SN
- SO
- SR
- SS
- ST
- SV
- SX
- SY
- SZ
- TC
- TD
- TG
- TH
- TJ
- TK
- TL
- TM
- TN
- TO
- TR
- TT
- TV
- TW
- TZ
- UA
- UG
- UY
- UZ
- VA
- VC
- VE
- VG
- VN
- VU
- WS
- YE
- ZA
- ZM
- ZW
address_us:
allOf:
- $ref: '#/components/schemas/lob_base'
- type: object
required:
- id
- address_line1
- address_city
- address_state
- address_zip
anyOf:
- title: address obj with `name` defined
required:
- name
- title: address obj with `company` defined
required:
- company
properties:
id:
$ref: '#/components/schemas/adr_id'
object:
type: string
description: Value is resource type.
enum:
- address
default: address
description:
$ref: '#/components/schemas/resource_description'
name:
type: string
description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address.
'
maxLength: 40
nullable: true
company:
type: string
description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. This field can be used for any secondary recipient information which is not part of the actual mailing address (Company Name, Department, Attention Line, etc).
'
maxLength: 40
nullable: true
phone:
type: string
description: Must be no longer than 40 characters.
maxLength: 40
nullable: true
email:
type: string
description: Must be no longer than 100 characters.
maxLength: 100
nullable: true
address_line1:
type: string
description: The primary number, street name, and directional information.
maxLength: 64
address_line2:
type: string
description: An optional field containing any information which can't fit into line 1.
maxLength: 64
nullable: true
address_city:
type: string
maxLength: 200
address_state:
type: string
description: 2 letter state short-name code
pattern: ^[a-zA-Z]{2}$
address_zip:
type: string
description: 'Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`.
'
pattern: ^\d{5}(-\d{4})?$
address_country:
type: string
enum:
- UNITED STATES
description: Full name of country
minLength: 13
maxLength: 13
metadata:
$ref: '#/components/schemas/metadata'
recipient_moved:
type: boolean
description: 'Only returned for accounts on certain <a href="https://dashboard.lob.com/#/settings/editions" target="_blank">Print & Mail Editions</a>. Value is `true` if the address was altered because the recipient filed for a <a href="#tag/National-Change-of-Address">National Change of Address Linkage (NCOALink)</a>, `false` if the NCOALink check was run but no altered address was found, and `null` if the NCOALink check was not run. The NCOALink check does not happen for non-US addresses, for non-deliverable US addresses, or for addresses created before the NCOALink feature was added to your account.
'
nullable: true
example:
id: adr_e68217bd744d65c8
description: Harry - Office
name: HARRY ZHANG
company: LOB
phone: '5555555555'
email: harry@lob.com
address_line1: 210 KING ST STE 6100
address_line2: null
address_city: SAN FRANCISCO
address_state: CA
address_zip: 94107-1741
address_country: UNITED STATES
metadata: {}
recipient_moved: false
date_created: '2019-08-12T00:16:00.361Z'
date_modified: '2019-08-12T00:16:00.361Z'
object: address
address_editable_us:
allOf:
- $ref: '#/components/schemas/address_fields_us'
- type: object
anyOf:
- title: address obj with `name` defined
required:
- name
- title: address obj with `company` defined
required:
- company
properties:
description:
$ref: '#/components/schemas/resource_description'
name:
type: string
description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address.
'
maxLength: 40
nullable: true
company:
$ref: '#/components/schemas/company'
phone:
type: string
description: Must be no longer than 40 characters.
maxLength: 40
nullable: true
email:
type: string
description: Must be no longer than 100 characters.
maxLength: 100
nullable: true
address_country:
type: string
enum:
- US
default: US
metadata:
$ref: '#/components/schemas/metadata'
date_filter:
type: object
additionalProperties:
type: string
description: 'Filter by ISO-8601 date or datetime, e.g. `{ "gt": "2012-01-01", "lt": "2012-01-31T12:34:56Z" }` where `gt` is >, `lt` is <, `gte` is ≥, and `lte` is ≤.'
company:
type: string
description: 'Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. This field can be used for any secondary recipient information which is not part of the actual mailing address (Company Name, Department, Attention Line, etc).
'
maxLength: 40
nullable: true
adr_id:
type: string
description: Unique identifier prefixed with `adr_`.
pattern: ^adr_[a-zA-Z0-9]+$
resource_description:
type: string
description: 'An internal description that identifies this resource. Must be no longer than 255 characters.
'
maxLength: 255
nullable: true
address_intl:
allOf:
- $ref: '#/components/schemas/lob_base'
- type: object
required:
- id
- address_line1
- address_country
anyOf:
- title: address obj with `name` defined
require
# --- truncated at 32 KB (62 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lobcom/refs/heads/main/openapi/lobcom-addresses-api-openapi.yml