• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialproductivity

address-validation

プラグイン
shippo
ソース
GitHub で見る ↗
説明

Shippo API を使ってお届け先住所を確認・整理・統一する このスキルは、配送サービス向け API(Shippo)を通じて、お客様から入力されたお届け先住所の情報を確認し、正しい形式に整理して、統一された形で処理します。 住所の誤記や不完全な入力を自動的に検出・修正し、配送手続きをスムーズに進めるのに役立ちます。

原文を表示

Validate, parse, and standardize shipping addresses via the Shippo API

ユースケース
  • お届け先住所を確認するとき
  • 住所情報を正しい形式に整理するとき
  • 複数の住所表記を統一するとき
  • 住所の誤記を修正するとき
  • 配送手続きを進めるとき
本文(日本語訳)

住所検証

住所フィールドの形式

Shippo APIは、ほとんどのエンドポイント(CreateShipmentを含む)で住所情報にv1フィールド名を使用します。以下の形式を常に使用してください:

フィールド 説明 例
name フルネーム Jane Smith
street1 住所第1行 731 Market St
street2 住所第2行(オプション) Suite 200
city 市区町村 San Francisco
state 都道府県 CA
zip 郵便番号 94103
country ISO 3166-1 alpha-2国コード US
email メールアドレス(国際送信者は必須) jane@example.com
phone 電話番号(国際送信者は必須) +1-555-123-4567

注記:CreateAddressとValidateAddressはv2フィールド名(address_line_1、city_locality、state_province、postal_code)を使用しますが、CreateShipmentに住所をインラインで渡す場合は、上記のv1名を使用する必要があります。


構造化された住所を検証する

  1. 最低限、street1、city、state、zip、country(ISO 3166-1 alpha-2)を集めます。
  2. CreateAddressを住所フィールドで呼び出します。これによって住所が保存され、オブジェクトIDが返されます。
  3. ValidateAddressを住所フィールドで呼び出して検証結果を取得します。注記:このエンドポイントはオブジェクトIDではなく、住所フィールドをクエリパラメータとして受け取ります。
  4. レスポンスのanalysis.validation_result.valueを確認します。値は"valid"(有効)、"invalid"(無効)、または"partially_valid"(修正を適用した住所が見つかった)です。詳細はanalysis.validation_result.reasonsを確認してください。
  5. 標準化された住所をユーザーに報告します。修正されたフィールド(changed_attributesに列挙)を強調表示してください。analysis.address_type("residential"「住宅用」、"commercial"「商業用」、または"unknown")に注目します。住宅用分類は運送業者の追加料金に影響します。
  6. 無効な場合:理由の説明を伝えてください。APIがrecommended_addressを返す場合は、それをユーザーに提示してください。
  7. partially_validの場合:修正内容を表示し、その修正が許可可能かどうかをユーザーに確認してください。

フリーフォーム形式の住所を解析する

  1. ParseAddressを生のテキスト(例:「123 Main St, Springfield IL 62704」)で呼び出します。
  2. 構造化されたアウトプットが完全かどうか確認します。解析レスポンスはv2フィールド名を使用します:address_line_1、city_locality、state_province、postal_code。
  3. 注記:解析レスポンスにはcountryが含まれません。ユーザーに国を尋ねるか推定し、次に進む前に追加する必要があります。
  4. 解析結果を検証するには、フィールドをCreateAddress次にValidateAddressに渡します(上記のステップ2から構造化住所のワークフローに従ってください)。

国際住所

  • 常にcountryフィールドを必須にしてください。推測しないでください。
  • ラテン文字以外を、そのまま渡してください。APIがエンコーディングを処理します。
  • 検証の詳しさは国によって異なります。米国、カナダ、英国、オーストラリア、主要なEU加盟国は詳細な検証があります。その他の国は構造的な完全性を確認するだけの可能性があります。この制限についてユーザーに知らせてください。

一括住所検証

一括検証エンドポイントはありません。住所ごとにCreateAddressを呼び出します。結果(行番号、有効/無効、修正内容、エラー、住宅用分類)を追跡し、完了時に概要を報告してください。50件以上のアドレスの場合は、処理時間について事前に説明し、進捗の更新を提供してください。


既存の住所を再度検証する

ValidateAddressを住所フィールドで呼び出します。このエンドポイントはオブジェクトIDではなく、住所フィールドで検証します。


重複した住所

CreateAddressが「住所が重複しています」というエラーを返す場合、その住所はアカウント内に既に存在します。ListAddressesで取得するか、検証に直接進んでください。


クイックリファレンス

住所を検証する: CreateAddress(住所を保存)+ ValidateAddress(同じフィールドで検証)

解析してから検証: ParseAddress → 国を追加 → CreateAddress + ValidateAddress

原文(English)を表示

<!-- ⚠️ DO NOT EDIT. Auto-generated from skills/address-validation/SKILL.md by scripts/sync.js Edits here will be overwritten on the next sync. To change this content, edit the canonical source and re-run the sync script. -->

Address Validation

Address Field Format

The Shippo API uses v1 field names for address components in most endpoints (including CreateShipment). Always use:

Field Description Example
name Full name Jane Smith
street1 Street address line 1 731 Market St
street2 Street address line 2 (optional) Suite 200
city City San Francisco
state State or province CA
zip Postal code 94103
country ISO 3166-1 alpha-2 country code US
email Email (required for international senders) jane@example.com
phone Phone (required for international senders) +1-555-123-4567

Note: CreateAddress and ValidateAddress take the v2 field names (address_line_1, city_locality, state_province, postal_code), but when passing addresses inline to CreateShipment, you must use the v1 names above.


Validate a Structured Address

  1. Collect at minimum: street1, city, state, zip, country (ISO 3166-1 alpha-2).
  2. Call CreateAddress with the address fields. This creates the address and returns an object ID.
  3. Call ValidateAddress with the address fields to get validation results. Note: this endpoint takes address fields as query parameters, not an object ID.
  4. Check analysis.validation_result.value in the response. Values: "valid", "invalid", or "partially_valid" (address found with corrections applied). Check analysis.validation_result.reasons for details.
  5. Report the standardized address back. Highlight any corrected fields (listed in changed_attributes). Note analysis.address_type ("residential", "commercial", or "unknown") -- residential classification affects carrier surcharges.
  6. If invalid: relay the reason descriptions. If the API returns a recommended_address, present it to the user.
  7. If partially_valid: show what was corrected and ask the user to confirm the corrections are acceptable.

Parse a Freeform Address

  1. Call ParseAddress with the raw string (e.g., "123 Main St, Springfield IL 62704").
  2. Review the structured output for completeness. The parse response uses v2 field names: address_line_1, city_locality, state_province, postal_code.
  3. Note: the parse response does not include country. You must ask the user for the country or infer it, then add it before proceeding.
  4. Validate the parsed result by passing the fields to CreateAddress then ValidateAddress (follow the structured address workflow above from step 2).

International Addresses

  • Always require the country field. Do not guess.
  • Pass non-Latin characters as-is; the API handles encoding.
  • Validation depth varies by country. US, CA, GB, AU, and major EU countries have deep validation. Others may only confirm structural completeness. Inform the user of this limitation.

Bulk Address Validation

There is no batch validation endpoint. Call CreateAddress per address. Track results (row number, valid/invalid, corrections, errors, residential classification) and report a summary when done. For 50+ addresses, set expectations about processing time and provide progress updates.


Re-validate an Existing Address

Call ValidateAddress with the address fields. This endpoint validates by address fields, not by object ID.


Duplicate Addresses

If CreateAddress returns a "Duplicate address" error, the address already exists in the account. Retrieve it via ListAddresses or proceed directly to validation.


Quick Reference

Validate an address: CreateAddress (saves address) + ValidateAddress (validates with same fields)

Parse then validate: ParseAddress -> add country -> CreateAddress + ValidateAddress

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。