Address Validation

作者 goshippocf8e96532f24無授權條款3 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 週前更新

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

AI 產生的概覽

透過 Shippo API 驗證、解析並標準化配送地址。

功能
此技能引導代理使用 Shippo API 端點驗證、解析與標準化配送地址。內容涵蓋 v1 與 v2 欄位命名規則、CreateAddress 加 ValidateAddress 的工作流程、解讀驗證結果與更正項目、解析自由格式地址字串、處理國際地址、批次驗證、重新驗證以及重複地址錯誤。產出為標準化地址,包含更正欄位、驗證狀態以及住宅或商業分類。
適用情境
當代理需要在出貨前檢查或正規化配送地址、將非結構化地址解析為各組成部分,或批次處理地址進行驗證時使用。也適用於處理國際地址或解決 Shippo 帳戶中的重複地址錯誤。
執行需求
需要存取 Shippo API 及相應的 API 認證資訊。不包含指令碼,僅為操作說明。
<!-- ⚠️ 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:

FieldDescriptionExample
nameFull nameJane Smith
street1Street address line 1731 Market St
street2Street address line 2 (optional)Suite 200
cityCitySan Francisco
stateState or provinceCA
zipPostal code94103
countryISO 3166-1 alpha-2 country codeUS
emailEmail (required for international senders)[email protected]
phonePhone (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

來源與署名

來源:goshippo/ai位於providers/claude/plugin/skills/address-validation提交cf8e965

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 goshippo/ai 的技能

Upgrade Shippo

goshippo

說明 Shippo API 版本變更、Webhook 承載內容版本管理,以及託管 Shippo MCP 伺服器的疑難排解。

Software Development32 週前更新

Tracking

goshippo

透過 Shippo API 跨貨運業者追蹤包裹,包含貨態歷程與追蹤 webhook。

Productivity & Workflow32 週前更新

Shippo Support Ticket

goshippo

Generate a complete, auto-classified, ready-to-paste Shippo support ticket for a single shipment or label. Use when a support agent or customer needs to escalate a shipping issue (lost/delayed package, unused-label refund, billing/rate adjustment, address exception, customs hold, carrier-account, or tracking-webhook problem). Given a tracking number + carrier, a transaction (label) ID, or a shipment ID, it classifies the issue, runs the right read-only Shippo MCP lookups, computes the triage timeline, and emits both a copy-paste support message and a routing-tagged JSON block so the ticket lands in the right pipeline first time.

待分類32 週前更新

Shippo Best Practices

goshippo

Guides Shippo integration decisions, choosing between Rates at Checkout vs. full Shipments+Transactions vs. Batch processing, address validation strategy (v1 vs v2 fields), domestic vs international workflows (customs declarations, incoterms), label format selection, and webhook setup. Use when planning, building, or reviewing any Shippo integration, including building checkout flows, bulk fulfillment pipelines, address validation, label generation, package tracking, customs handling, or webhook subscriptions.

待分類32 週前更新

Shipping Analysis

goshippo

透過 Shippo API 分析運費、比較承運商、最佳化包裹尺寸並檢視歷史運費支出。

Business & Finance32 週前更新

Rate Shopping

goshippo

透過 Shippo API 比較多家貨運商的運費,並推薦最便宜、最快或最超值的方案。

Business & Finance32 週前更新