API

Custom address validation

Setup a webhook for custom address validation

Last updated July 14th, 2020

If you need to run custom address validation against incoming orders, you can setup a custom endpoint in the Order processing tab within you channel settings.

The endpoint should recieve a PUT request with the following payload.

{
    "sale": {
        "shippingFullName": "Test Customer",
        "shippingFirstName": "Test",
        "shippingLastName": "Customer",
        "shippingName": "",
        "shippingAddressLineOne": "1600 Pennsylvania Ave",
        "shippingAddressLineTwo": "",
        "shippingCity": "Washington",
        "shippingState": "DC",
        "shippingCountry": "United States",
        "shippingZip": "20500",
    }
}

The endpoint should then return the amended data under an instance object, as follows:

{
    "instance": {
        "shippingFullName": "Test Customer",
        "shippingFirstName": "Test",
        "shippingLastName": "Customer",
        "shippingName": "",
        "shippingAddressLineOne": "1600 Pennsylvania Avenue",
        "shippingAddressLineTwo": "",
        "shippingCity": "Washington",
        "shippingState": "DC",
        "shippingCountry": "US",
        "shippingZip": "20500",
    }
}
Back to API