Lob

Lob U S Verifications API

The U S Verifications API from Lob — 2 operation(s) for u s verifications.

OpenAPI Specification

lob-u-s-verifications-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Lob U S  Verifications API
  version: 1.20.2
  description: "Experience direct mail like never before, with unmatched personalization and scalability \x14 all in one intuitive platform."
  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: U S  Verifications
paths:
  /bulk/us_verifications:
    post:
      operationId: bulk_us_verifications
      summary: Bulk Verify
      description: Verify a list of US or US territory addresses _with a live API key_. Requests to this endpoint with a test API key will return a dummy response based on the primary line you input.
      tags:
      - U S  Verifications
      parameters:
      - in: query
        name: case
        schema:
          type: string
          enum:
          - upper
          - proper
          default: upper
        description: Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. "PO BOX") and proper-cased (e.g. "PO Box"), respectively. Only affects `recipient`, `primary_line`, `secondary_line`, `urbanization`, and `last_line`. Default casing is `upper`.
        required: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/multiple_components_list'
            example:
              addresses:
              - primary_line: 210 King Street
                city: San Francisco
                state: CA
                zip_code: '94107'
              - recipient: Walgreens
                primary_line: Ave Wilson Churchill 123
                secondary_line: ''
                urbanization: URB FAIR OAKS
                city: RIO PIEDRAS
                state: PR
                zip_code: 00926
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/multiple_components_list'
            example:
              addresses:
              - primary_line: 210 King Street
                city: San Francisco
                state: CA
                zip_code: '94107'
              - recipient: Walgreens
                primary_line: Ave Wilson Churchill 123
                secondary_line: ''
                urbanization: URB FAIR OAKS
                city: RIO PIEDRAS
                state: PR
                zip_code: 00926
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/multiple_components_list'
            example:
              addresses:
              - primary_line: 210 King Street
                city: San Francisco
                state: CA
                zip_code: '94107'
              - recipient: Walgreens
                primary_line: Ave Wilson Churchill 123
                secondary_line: ''
                urbanization: URB FAIR OAKS
                city: RIO PIEDRAS
                state: PR
                zip_code: 00926
      responses:
        '200':
          $ref: '#/components/responses/bulk_us_verifications'
        default:
          $ref: '#/components/responses/us_verifications_error'
      x-codeSamples:
      - lang: Shell
        source: 'curl https://api.lob.com/v1/bulk/us_verifications \

          -u <YOUR LIVE API KEY>: \

          --header ''Content-Type: application/x-www-form-urlencoded'' \

          --data-urlencode ''addresses[0][primary_line]=210 King Street'' \

          --data-urlencode ''addresses[0][city]=San Francisco'' \

          --data-urlencode ''addresses[0][state]=CA'' \

          --data-urlencode ''addresses[0][zip_code]=94017''

          '
        label: CURL
      - lang: Typescript
        source: "const UsVerifications = new USVerificationsApi(av_config);\nconst verificationData1: UsVerificationsWritable = {\n  primary_line: '210 King St',\n  city: 'San Francisco',\n  state: 'CA',\n  zip_code: '94107'\n};\nconst verificationData2: UsVerificationsWritable = {\n  primary_line: '185 BERRY ST STE 6600',\n  city: 'SAN FRANCISCO',\n  state: 'CA',\n  zip_code: '94107'\n};\nconst addressList: MultipleComponentsList = {\n  addresses: [verificationData1, verificationData2],\n};\n\ntry {\n  const bulkVerified = await UsVerifications.verifyBulk(addressList);\n} catch (err: any) {\n  console.error(err);\n}\n"
        label: TYPESCRIPT
      - lang: Javascript
        source: "Lob.bulkUSVerifications.verify({\n  addresses: [{\n    primary_line: '210 King St',\n    city: 'San Francisco',\n    state: 'CA',\n    zip_code: '94107'\n  }]\n}), function (err, res) {\n  console.log(err, res);\n});\n"
        label: NODE
      - lang: Ruby
        source: "usVerificationsApi = UsVerificationsApi.new(config)\n\nverificationData0 = MultipleComponents.new({\n  primary_line: \"210 King Street\",\n  city: \"San Francisco\",\n  state: \"CA\",\n  zip_code: \"94017\",\n})\n\nverificationData1 = MultipleComponents.new({\n  primary_line: \"185 BERRY ST STE 6600\",\n  city: \"SAN FRANCISCO\",\n  state: \"CA\",\n  zip_code: \"94017\",\n})\n\n\naddressList = MultipleComponentsList.new({\n  addresses: [\n    verificationData0,\n    verificationData1,\n  ],\n})\n\nbegin\n  bulkVerifiedAddrs = usVerificationsApi.verifyBulk(addressList)\nrescue => err\n  p err.message\nend\n"
        label: RUBY
      - lang: Python
        source: "with ApiClient(configuration) as api_client:\n  api = UsVerificationsApi(api_client)\n\nverification_data_0 = MultipleComponents(\n  primary_line = \"210 King Street\",\n  city = \"San Francisco\",\n  state = \"CA\",\n  zip_code = \"94017\",\n)\n\nverification_data_1 = MultipleComponents(\n  primary_line = \"185 BERRY ST STE 6600\",\n  city = \"SAN FRANCISCO\",\n  state = \"CA\",\n  zip_code = \"94017\",\n)\n\n\naddress_list = MultipleComponentsList(\n  addresses = [\n    verification_data_0,\n    verification_data_1,\n  ],\n)\n\ntry:\n  bulk_verified = api.verifyBulk(address_list)\nexcept ApiException as e:\n  print(e)\n"
        label: PYTHON
      - lang: PHP
        source: "$verificationData0 = new OpenAPI\\Client\\Model\\MultipleComponents(array(\n  'primary_line'     => '210 King Street',\n  'city'     => 'San Francisco',\n  'state'     => 'CA',\n  'zip_code'     => '94017',\n));\n\n$verificationData1 = new OpenAPI\\Client\\Model\\MultipleComponents(array(\n  'primary_line'     => '185 BERRY ST STE 6600',\n  'city'     => 'SAN FRANCISCO',\n  'state'     => 'CA',\n  'zip_code'     => '94017',\n));\n\n$addressList = new OpenAPI\\Client\\Model\\MultipleComponentsList(array(\n  'addresses'     => [\n    $verificationData0,\n    $verificationData1,\n  ]\n));\n\ntry {\n    $result = $apiInstance->verifyBulk($addressList);\n} catch (Exception $e) {\n    echo $e->getMessage(), PHP_EOL;\n}\n"
      - lang: Java
        source: "MultipleComponentsList bulkVerify = new MultipleComponentsList();\nMultipleComponents bulkAddress0 = new MultipleComponents();\nbulkAddress0.setPrimaryLine(\"210 King Street\");\nbulkAddress0.setCity(\"San Francisco\");\nbulkAddress0.setState(\"CA\");\nbulkAddress0.setZipCode(\"94017\");\nbulkVerify.addAddressesItem(bulkAddress0);\n\nMultipleComponents bulkAddress1 = new MultipleComponents();\nbulkAddress1.setPrimaryLine(\"185 BERRY ST STE 6600\");\nbulkAddress1.setCity(\"SAN FRANCISCO\");\nbulkAddress1.setState(\"CA\");\nbulkAddress1.setZipCode(\"94017\");\nbulkVerify.addAddressesItem(bulkAddress1);\n\nUsVerificationsApi apiInstance = new UsVerificationsApi(config);\ntry {\n  UsVerifications bulkVerifyResponse = apiInstance.verifyBulk(bulkVerify, null);\n} catch (ApiException e) {\n  e.printStackTrace();\n}\n"
        label: JAVA
      - lang: Elixir
        source: "Lob.BulkUSVerification.verify.verify(\n%{\n  addresses:[\n    {\n      primary_line: \"210 King Street\",\n      city: \"San Francisco\",\n      state: \"CA\",\n      zip_code: \"94107\"\n    }\n ]\n})\n"
        label: ELIXIR
      - lang: CSharp
        source: "List<MultipleComponents> addresses = new List<MultipleComponents>();\nMultipleComponents bulkAddress0 = new MultipleComponents(\n  null,  // recipient\n  \"210 King Street\",  // primaryLine\n  null,  // secondaryLine\n  null,  // urbanization\n  \"San Francisco\",  // city\n  \"CA\",  // state\n  \"94017\" // zipCode\n);\naddresses.Add(bulkAddress0);\n\nMultipleComponents bulkAddress1 = new MultipleComponents(\n  null,  // recipient\n  \"185 BERRY ST STE 6600\",  // primaryLine\n  null,  // secondaryLine\n  null,  // urbanization\n  \"San Francisco\",  // city\n  \"CA\",  // state\n  \"94017\" // zipCode\n);\naddresses.Add(bulkAddress1);\n\nMultipleComponentsList bulkVerify = new MultipleComponentsList(addresses);\n\nUsVerificationsApi api = new UsVerificationsApi(config);\ntry {\n  UsVerifications bulkVerifyResponse = api.verifyBulk(bulkVerify, null);\n} catch (ApiException e) {\n  Console.WriteLine(e.ToString());\n}\n"
        label: CSHARP
  /us_verifications:
    post:
      operationId: us_verification
      summary: Single Verify
      description: Verify a US or US territory address _with a live API key_. The address can be in components (e.g. `primary_line` is "210 King Street", `zip_code` is "94107") or as a single string (e.g. "210 King Street 94107"), but not as both. Requests using a test API key validate required fields but return empty values unless specific `primary_line` values are provided. See the [US Verifications Test Environment](#section/US-Verifications-Test-Env) for details.
      tags:
      - U S  Verifications
      parameters:
      - in: query
        name: case
        schema:
          type: string
          enum:
          - upper
          - proper
          default: upper
        description: Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. "PO BOX") and proper-cased (e.g. "PO Box"), respectively. Only affects `recipient`, `primary_line`, `secondary_line`, `urbanization`, and `last_line`. Default casing is `upper`.
        required: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/us_verifications_writable'
            examples:
              basic:
                value:
                  primary_line: 210 King Street
                  city: San Francisco
                  state: CA
                  zip_code: '94107'
              full_payload:
                value:
                  recipient: Walgreens
                  primary_line: Ave Wilson Churchill 123
                  secondary_line: ''
                  urbanization: URB FAIR OAKS
                  city: RIO PIEDRAS
                  state: PR
                  zip_code: 00926
              single_line:
                value:
                  address: 210 King Street 94107
              test:
                value:
                  primary_line: po box
                  zip_code: '11111'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/us_verifications_writable'
            examples:
              basic:
                value:
                  primary_line: 210 King Street
                  city: San Francisco
                  state: CA
                  zip_code: '94107'
              full_payload:
                value:
                  recipient: Walgreens
                  primary_line: Ave Wilson Churchill 123
                  secondary_line: ''
                  urbanization: URB FAIR OAKS
                  city: RIO PIEDRAS
                  state: PR
                  zip_code: 00926
              single_line:
                value:
                  address: 210 King Street 94107
              test:
                value:
                  primary_line: po box
                  zip_code: '11111'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/us_verifications_writable'
            examples:
              basic:
                value:
                  primary_line: 210 King Street
                  city: San Francisco
                  state: CA
                  zip_code: '94107'
              full_payload:
                value:
                  recipient: Walgreens
                  primary_line: Ave Wilson Churchill 123
                  secondary_line: ''
                  urbanization: URB FAIR OAKS
                  city: RIO PIEDRAS
                  state: PR
                  zip_code: 00926
              single_line:
                value:
                  address: 210 King Street 94107
              test:
                value:
                  primary_line: po box
                  zip_code: '11111'
      responses:
        '200':
          $ref: '#/components/responses/us_verifications'
        default:
          $ref: '#/components/responses/us_verifications_error'
      x-codeSamples:
      - lang: Shell
        source: "curl https://api.lob.com/v1/us_verifications \\\n  -u <YOUR_LIVE_API_KEY>: \\\n  -d \"primary_line=210 King Street\" \\\n  -d \"city=San Francisco\" \\\n  -d \"state=CA\" \\\n  -d \"zip_code=94107\"\n"
        label: CURL
      - lang: Typescript
        source: "const UsVerification = new USVerificationsApi(av_config);\nconst verificationData1: UsVerificationsWritable = {\n  primary_line: '210 King Street',\n  city: 'San Francisco',\n  state: 'CA',\n  zip_code: '94107'\n};\n\ntry {\n  const singleVerified = await UsVerification.verifySingle(verificationData1);\n} catch (err: any) {\n  console.error(err);\n}\n"
        label: TYPESCRIPT
      - lang: Javascript
        source: "Lob.usVerifications.verify({\n  primary_line: '210 King Street',\n  city: 'San Francisco',\n  state: 'CA',\n  zip_code: '94107'\n}, function (err, res) {\n  console.log(err, res);\n});\n"
        label: NODE
      - lang: Ruby
        source: "usVerificationsApi = UsVerificationsApi.new(config)\n\nverificationData = UsVerificationsWritable.new({\n  primary_line: \"210 King Street\",\n  city: \"San Francisco\",\n  state: \"CA\",\n  zip_code: \"94017\",\n})\n\nbegin\n  singleVerifiedAddr = usVerificationsApi.verifySingle(verificationData)\nrescue => err\n  p err.message\nend\n"
        label: RUBY
      - lang: Python
        source: "with ApiClient(configuration) as api_client:\n  api = UsVerificationsApi(api_client)\nverification_data_1 = UsVerificationsWritable(\n  primary_line = \"210 King Street\",\n  city = \"San Francisco\",\n  state = \"CA\",\n  zip_code = \"94017\",\n)\n\ntry:\n  single_verified = api.verifySingle(verification_data_1)\nexcept ApiException as e:\n  print(e)\n"
        label: PYTHON
      - lang: PHP
        source: "$apiInstance = new OpenAPI\\Client\\Api\\UsVerificationsApi($config, new GuzzleHttp\\Client());\n\n$verificationData = new OpenAPI\\Client\\Model\\UsVerificationsWritable(array(\n  'primary_line'     => '210 King Street',\n  'city'     => 'San Francisco',\n  'state'     => 'CA',\n  'zip_code'     => '94017',\n));\n\ntry {\n    $result = $apiInstance->verifySingle($verificationData);\n} catch (Exception $e) {\n    echo $e->getMessage(), PHP_EOL;\n}\n"
      - lang: Java
        source: "UsVerificationsWritable singleVerify = new UsVerificationsWritable();\nsingleVerify.setPrimaryLine(\"210 King Street\");\nsingleVerify.setCity(\"San Francisco\");\nsingleVerify.setState(\"CA\");\nsingleVerify.setZipCode(\"94017\");\n\nUsVerificationsApi apiInstance = new UsVerificationsApi(config);\ntry {\n  apiInstance.verifySingle(singleVerify, null);\n} catch (ApiException e) {\n  e.printStackTrace();\n}\n"
        label: JAVA
      - lang: Elixir
        source: "Lob.USVerification.verify(%{\n  primary_line: \"210 King Street\",\n  city: \"San Francisco\",\n  state: \"CA\",\n  zip_code: \"94107\"\n})\n"
        label: ELIXIR
      - lang: CSharp
        source: "UsVerificationsWritable singleVerify = new UsVerificationsWritable(\n  null,\n  null,\n  \"210 King Street\",\n  null,\n  null,\n  \"San Francisco\",\n  \"CA\",\n  \"94017\"\n);\n\nUsVerificationsApi api = new UsVerificationsApi(config);\n\ntry {\n  api.verifySingle(singleVerify, null);\n} catch (ApiException e) {\n  Console.WriteLine(e.ToString());\n}\n"
        label: CSHARP
components:
  schemas:
    us_verifications:
      type: object
      required:
      - addresses
      - errors
      properties:
        addresses:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/us_verification'
            - $ref: '#/components/schemas/error'
        errors:
          description: Indicates whether any errors occurred during the verification process.
          type: boolean
    error:
      type: object
      description: Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - message
          - status_code
          - code
          properties:
            message:
              type: string
              description: A human-readable message with more details about the error
              example: Rate limit exceeded. Please wait 5 seconds and try your request again.
            status_code:
              $ref: '#/components/schemas/failure_status_code'
            code:
              type: string
              enum:
              - bad_request
              - conflict
              - feature_limit_reached
              - internal_server_error
              - invalid
              - not_deletable
              - not_found
              - request_timeout
              - service_unavailable
              - unrecognized_endpoint
              - unsupported_lob_version
              - address_length_exceeds_limit
              - bank_account_already_verified
              - bank_error
              - billing_address_required
              - custom_envelope_inventory_depleted
              - deleted_bank_account
              - failed_deliverability_strictness
              - file_pages_below_min
              - file_pages_exceed_max
              - file_size_exceeds_limit
              - foreign_return_address
              - inconsistent_page_dimensions
              - invalid_bank_account
              - invalid_bank_account_verification
              - invalid_check_international
              - invalid_country_covid
              - invalid_file
              - invalid_file_dimensions
              - invalid_file_download_time
              - invalid_file_url
              - invalid_image_dpi
              - invalid_international_feature
              - invalid_perforation_return_envelope
              - invalid_template_html
              - mail_use_type_can_not_be_null
              - merge_variable_required
              - merge_variable_whitespace
              - payment_method_unverified
              - pdf_encrypted
              - special_characters_restricted
              - unembedded_fonts
              - email_required
              - invalid_api_key
              - publishable_key_not_allowed
              - rate_limit_exceeded
              - unauthorized
              - unauthorized_token
              description: 'A pre-defined string identifying an error. Error codes fall into three categories:


                **GENERIC**

                * `bad_request` - 422: an invalid request was made. See error message for details.

                * `conflict` - 409/422: this operation would leave data in a conflicted state.

                * `feature_limit_reached` - 403: the account has reached its resource limit and requires upgrading to add more.

                * `internal_server_error` - 500: an error has occured on Lob''s servers. Please try request again.

                * `invalid` - 422: an invalid request was made. See error message for details.

                * `not_deletable` - 422: an attempt was made to delete a resource, but the resource cannot be deleted.

                * `not_found` - 404: the requested resource was not found.

                * `request_timeout` - 408: the request took too long. Please try again.

                * `service_unavailable` - 503: the Lob servers are temporarily unavailable. Please try agian.

                * `unrecognized_endpoint` - 404: the requested endpoint doesn''t exist.

                * `unsupported_lob_version` - 422: an unsupported Lob API version was requested.


                **ADVANCED**

                * `address_length_exceeds_limit` - 422: the sum of to.address_line1 and to.address_line2 cannot surpass 50 characters.

                * `bank_account_already_verified` - 422: the bank account has already been verified.

                * `bank_error` - 422: there''s an issue with the bank account.

                * `billing_address_required` - 403: in order to create a live mail piece, your account needs to set up a billing address.

                * `custom_envelope_inventory_depleted` - 422: custom envelope inventory is depleted, and more will need to be ordered.

                * `deleted_bank_account` - 404: checks cannot be created with a deleted bank account.

                * `failed_deliverability_strictness` - 422: the `to` address doesn''t meet strictness requirements. See <a href="https://dashboard.lob.com/#/settings/account" target="_blank">Account Settings</a> to configure strictness.

                * `file_pages_below_min` - 422: not enough pages.

                * `file_pages_exceed_max` - 422: too many pages.

                * `file_size_exceeds_limit` - 422: the file size is too large. See description for details.

                * `foreign_return_address` - 422: the `from` address must be a US address.

                * `inconsistent_page_dimensions` - 422: all pages of the input file must have the same dimensions.

                * `invalid_bank_account` - 422: the provided bank routing number is invalid.

                * `invalid_bank_account_verification` - 422: verification amounts do not match.

                * `invalid_check_international` - 422: checks cannot be sent internationally.

                * `invalid_country_covid` - 422: the postal service in the specified country is currently unable to process the request due to COVID-19 restrictions.

                * `invalid_file` - 422: the file is invalid.

                * `invalid_file_dimensions` - 422: file dimensions are incorrect for the selected mail type.

                * `invalid_file_download_time` - 422: file download from remote server took too long.

                * `invalid_file_url` - 422: the file URL when creating a resource is invalid.

                * `invalid_image_dpi` - 422: DPI must be at least 300.

                * `invalid_international_feature` - 422: the specified product cannot be sent to the destination.

                * `invalid_perforation_return_envelope` - 422: both `return_envelope` and `perforation` must be used together.

                * `invalid_template_html` - 422: the provided HTML is invalid.

                * `mail_use_type_can_not_be_null` - 422: use_type must be one of "marketing" or "operational". Alternatively, an admin can set the account default use type in Account Settings.

                * `merge_variable_required` - 422: a required merge variable is missing.

                * `merge_variable_whitespace` - 422: merge variable names cannot contain whitespace.

                * `payment_method_unverified` - 401: you must have a verified bank account or credit card to submit live requests.

                * `pdf_encrypted` - 422: an encrypted PDF was provided.

                * `special_characters_restricted` - 422: cannot use special characters for merge variable names.

                * `unembedded_fonts` - 422: the provided PDF contains non-standard unembedded fonts. See description for details.


                **AUTHENTICATION**

                * `email_required` - 401: account must have a verified email address before creating live resources.

                * `invalid_api_key` - 401/403: the API key is invalid.

                * `publishable_key_not_allowed` - 403: the requested operation needs a secret key, not a publishable key. See [API Keys](#section/API-Keys) for more information.

                * `rate_limit_exceeded` - 429: requests were sent too quickly and must be slowed down.

                * `unauthorized` - 401: the request isn''t authorized.

                * `unauthorized_token` - 401: token isn''t authorized.

                '
    us_verifications_writable:
      oneOf:
      - $ref: '#/components/schemas/multiple_components'
      - $ref: '#/components/schemas/single_line_address'
    us_ver_id:
      type: string
      description: Unique identifier prefixed with `us_ver_`.
      pattern: ^us_ver_[a-zA-Z0-9_]+$
    lob_confidence_score:
      type: object
      description: Lob Confidence Score is a nested object that provides a numerical value between 0-100 of the likelihood that an address is deliverable based on Lobs mail delivery data to over half of US households.
      required:
      - score
      - level
      properties:
        score:
          type: number
          nullable: true
          format: float
          description: 'A numerical score between 0 and 100 that represents the percentage of mailpieces Lob has sent to this addresses that have been delivered successfully over the past 2 years. Will be `null` if no tracking data exists for this address.

            '
          default: null
          minimum: 0
          maximum: 100
        level:
          type: string
          enum:
          - high
          - medium
          - low
          - ''
          description: "Indicates the likelihood that the address is a valid, mail-receiving address. Possible values are:\n  - `high`  Over 70% of mailpieces Lob has sent to this address were delivered successfully and recent mailings were also successful.\n  - `medium`  Between 40% and 70% of mailpieces Lob has sent to this address were delivered successfully.\n  - `low`  Less than 40% of mailpieces Lob has sent to this address were delivered successfully and recent mailings weren't successful.\n  - `\"\"`  No tracking data exists for this address or lob deliverability was unable to find a corresponding level of mail success.\n"
    multiple_components_list:
      type: object
      required:
      - addresses
      properties:
        addresses:
          type: array
          minItems: 1
          maxItems: 20
          items:
            $ref: '#/components/schemas/multiple_components'
    dpv_footnote:
      type: string
      enum:
      - AA
      - A1
      - BB
      - CC
      - N1
      - F1
      - G1
      - U1
      - M1
      - M3
      - P1
      - P3
      - R1
      - R7
      - RR
      example: AA
    state:
      type: string
      description: 'The <a href="https://en.wikipedia.org/wiki/ISO_3166-2" target="_blank">ISO 3166-2</a> two letter code for the state.

        '
      maxLength: 2
    city_no_description:
      type: string
      maxLength: 200
    single_line_address:
      type: object
      required:
      - address
      properties:
        address:
          type: string
          description: 'The entire address in one string (e.g., "210 King Street 94107"). _Does not support a recipient and will error when other payload parameters are provided._

            '
          maxLength: 500
    multiple_components:
      allOf:
      - anyOf:
        - title: US verification object with `city` and `state`
          required:
          - city
          - state
        - title: US verification object with `zip_code`
          required:
          - zip_code
      - type: object
        required:
        - primary_line
        properties:
          recipient:
            $ref: '#/components/schemas/recipient'
          primary_line:
            $ref: '#/components/schemas/primary_line_us'
          secondary_line:
            $ref: '#/components/schemas/secondary_line'
          urbanization:
            $ref: '#/components/schemas/urbanization'
          city:
            allOf:
            - $ref: '#/components/schemas/city_no_description'
            - type: string
              description: The name of the city. `city` and `state` are required if no `zip_code` is passed.
          state:
            type: string
            description: The <a href="https://en.wikipedia.org/wiki/ISO_3166-2:US" target="_blank">ISO 3166-2</a> two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed.
            maxLength: 50
          zip_code:
            allOf:
            - description: Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`).
            - $ref: '#/components/schemas/zip_code'
    secondary_line:
      type: string
      description: 'The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long.

        '
      maxLength: 200
    zip_code_plus_4:
      type: string
      pattern: ^\d{4}$
    urbanization:
      type: string
      description: 'Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See <a href="https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name." target="_blank">USPS documentation</a> for clarification.

        '
      maxLength: 200
    deliverability_analysis:
      type: object
      description: A nested object containing a breakdown of the deliverability of an address.
      required:
      - dpv_confirmation
      - dpv_cmra
      - dpv_vacant
      - dpv_active
      - dpv_inactive_reason
      - dpv_throwback
      - dpv_non_delivery_day_flag
      - dpv_non_delivery_day_values
      - dpv_no_secure_location
      - dpv_door_not_accessible
      - dpv_footnotes
      - ews_match
      - lacs_indicator
      - lacs_return_code
      - suite_return_code
      properties:
        dpv_confirmation:
          type: string
          enum:
          - Y
          - S
          - D
          - N
          - ''
          description: "Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS. Possible values are:\n* `Y`  The address is deliverable by the USPS.\n* `S`  The address is deliverable by removing the provided secondary unit designator. This information may be incorrect or unnecessary.\n* `D`  The address is deliverable to the building's default address but is missing a secondary unit designator and/or number.\n  There is a chance the mail will not reach the intended recipient.\n* `N`  The address is not deliverable according to the USPS, but parts of the address are valid (such as the street and ZIP code).\n* `''`  This address is not deliverable. No matching street could be found within the city or ZIP code.\n"
          example: Y
        dpv_cmra:
          type: string
          enum:
          - Y
          - N
          - ''
          description: 'Indicates whether or not the address is <a href="https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency" target="_blank">CMRA-authorized</a>. Possible values are:

            * `Y`  Address is CMRA-authorized.

            * `N`  Address is not CMRA-authorized.

            * `''''`  A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).

            '
          example: N
        dpv_vacant:
          type: string
          enum:
          - Y
          - N
          - ''
          description: 'Indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries. Possible values are:

            * `Y`  Address is vacant.

            * `N`  Address is not vacant.

            * `''''`  A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string).

            '
          example: N
        dpv_active:
          type: string
          enum:
          - Y
          - N
          - ''
          description: 'Corresponds to the USPS field `dpv_no_stat`. Indicates that an address has been vacated in the recent

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lob/refs/heads/main/openapi/lob-u-s-verifications-api-openapi.yml