感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

Shipping address restriction samples

When you create a Checkout Session, you can use the deliverySpecifications parameter to specify shipping restrictions and prevent buyers from selecting unsupported addresses from their Amazon address book. You can restrict addresses to specific countries using ISO 3166 country codes. Below are samples for handling common use-cases.


Allow US addresses only

{
    "webCheckoutDetails": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page"
    },
    "storeId": "amzn1.application-oa2-client.c48db267f2d44b6bbe2f65aadee22ea6",
    "deliverySpecifications": {
        "addressRestrictions": {
            "type": "Allowed",
            "restrictions": {
                "US": {
                }
            }
        }
    }
}  

Allow continental US addresses only

{
    "webCheckoutDetails": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page"
    },
    "storeId": "amzn1.application-oa2-client.c48db267f2d44b6bbe2f65aadee22ea6",
    "deliverySpecifications": {
        "addressRestrictions": {
            "type": "NotAllowed",
            "restrictions": {
                "US": {
                    "statesOrRegions":["AK","HI"]
                },
                "GB": {
                },
                "DE": {
                },
                "FR": {
                },
                "IT": {
                },
                "ES": {
                },
                "IN": {
                },
                "JP": {
                }
            }
        }
    }
}  

Allow EU addresses only

{
    "webCheckoutDetails": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page"
    },
    "storeId": "amzn1.application-oa2-client.c48db267f2d44b6bbe2f65aadee22ea6",
    "deliverySpecifications": {
        "addressRestrictions": {
            "type": "Allowed",
            "restrictions": {
                "AT": {
                },
                "BE": {
                },
                "BG": {
                },
                "HR": {
                },
                "CY": {
                },
                "CZ": {
                },
                "DK": {
                },
                "EE": {
                },
                "FI": {
                },
                "FR": {
                },
                "DE": {
                },
                "GR": {
                },
                "HU": {
                },
                "IE": {
                },
                "IT": {
                },
                "LV": {
                },
                "LT": {
                },
                "LU": {
                },
                "MT": {
                },
                "NL": {
                },
                "PL": {
                },
                "PT": {
                },
                "RO": {
                },
                "SK": {
                },
                "SI": {
                },
                "ES": {
                },
                "SE": {
                }
            }
        }
    }
}

Restrict specific ZIP codes

{
    "webCheckoutDetails": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page"
    },
    "storeId": "amzn1.application-oa2-client.c48db267f2d44b6bbe2f65aadee22ea6",
    "deliverySpecifications": {
        "addressRestrictions": {
            "type": "NotAllowed",
            "restrictions": {
                "US": {
                    "zipCodes": ["12345", "55555"]
                }
            }
        }
    }
}

Restrict PO box addresses

{
    "webCheckoutDetails": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page"
    },
    "storeId": "amzn1.application-oa2-client.c48db267f2d44b6bbe2f65aadee22ea6",
    "deliverySpecifications": {
        "specialRestrictions": ["RestrictPOBoxes"]
    }
}  

Restrict packstation addresses

{
    "webCheckoutDetails": {
        "checkoutReviewReturnUrl":"https://a.com/merchant-review-page"
    },
    "storeId": "amzn1.application-oa2-client.c48db267f2d44b6bbe2f65aadee22ea6",
    "deliverySpecifications": {
        "specialRestrictions": ["RestrictPackstations"]
    }
}