Shopping

Checkout

verify/address.json

method: GET

secured: true

url: /v1/shopping/checkout/verify/address.json

Returns the currently assigned shiopping address of the cart (or if none has been assigned then the profile's shipping address)

{
    "Phone": "510-825-3218",
    "Email": "jason@sperske.com",
    "ShipToEMail": "",
    "Name": "Jason Sperske",
    "AddressPrimary": "3500 Gateway Blvd ",
    "AddressSecondary": "",
    "AddressTertiary": "",
    "City": "Fremont",
    "Province": "CA",
    "PostalCode": "94538-6584",
    "success": true,
    "error": null
}

method: POST

secured: true

url: /v1/shopping/checkout/verify/address.json

Sets a shipping address for the cart (and responds with verificaiton information)

Field Notes
Branch The ID of a branch to have the order set for pick up at.
Type: Integer (0 or null will not set the order for pickup) (optional)
Email An email address to send the recipt to. This email address includes the last 4 digits of the credit card used as well as the prices, taxes nd totals.
Type: String
ShipToEmail An optional email address to send an order manifest to. This email only containts the ship to address, the items and quantities, no credit ard informaiton or prices are included. This is commonly used when an order is made on behalf of a customer (when the distributor sets a retail price).
Type: String (optional)
Phone An optional phone number associated with the order (in case there are any issues related to shipping).
Type: String (###)###-#### (optional)
PONumber An optional purchase order number associated with the order.
Type: String (optional)
ShipToInstruction An optional set of shipping instructions associated with the order.
Type: String (optional)
Name A name associated to the order (will appear on shipping label).
Type: String
ShipToId The ID of a distributor that the order is being shipped to (if looked up).
Type: String (##-####) (optional)
Choice When an alternate address is presented you can choose to accept or override. This field makes note of that choice.
Type: String (Accept|Override) (optional)
AddressPrimary The first line of a shipping address.
Type: String
AddressSecondary The second line of a shipping address.
Type: String (optional)
AddressTertiary The third line of a shipping address.
Type: String (optional)
City The city to be shipped to.
Type: String
Province The province/state to be shipped to.
Type: String (optional in markets that don't have provinces)
PostalCode The postal code to be shipped to.
Type: String

If the request is invalid but an valid address can be suggested you will see a response like this:

{
    "CanCorrect": true,
    "HasRequiredFields": true,
    "IsPOBox": false,
    "CanShipToProvince": true,
    "ValidContactInformation": true,
    "Name": "Jason Sperske",
    "AddressPrimary": "3500 Gateway Blvd ",
    "AddressSecondary": null,
    "AddressTertiary": null,
    "City": "Fremont",
    "Province": "CA",
    "PostalCode": "94538-6584",
    "BranchCount": 2,
    "success": false,
    "error": [
        {
            "field": "Address",
            "error": "ErrorSuggestedFix",
            "message": "Are you sure that this is a valid shipping address? Our address verification system indicates a problem with your mailing address. Please review your address thoroughly (Number and Street, City, State, Zip).However, if you feel this is the correct information, click \"Ship To This Address\". Please note that an incorrect address might cause a delay in the delivery of your order. If you need help, please contact call your local Distributor Services office for assistance."
        }
    ]
}

If you send a acceptable address (or accept the address suggested by the end point) you will see a response like this:

{
    "CanCorrect": false,
    "HasRequiredFields": true,
    "IsPOBox": false,
    "CanShipToProvince": false,
    "ValidContactInformation": true,
    "Name": null,
    "AddressPrimary": null,
    "AddressSecondary": null,
    "AddressTertiary": null,
    "City": null,
    "Province": null,
    "PostalCode": null,
    "BranchCount": 2,
    "success": true,
    "error": null
}