Sponsoring

Checkout

verify/shipping.json

method: GET

secured: true

url: /v1/promote/checkout/verify/shipping.json

Returns information about the available shipping options for an active cart. In order to save the need for a second API call the Balance information is also presented in the response (it has the same format as the payment.json API. If the cart has enough information to calculate shipping information then you will see a response like this:

{
    "Balance": {...},
    "AutoShipBalance": {...},
    "Details": {...},
    "RequireSignature": null,
    "ShippingMethods": [
        {
            "value": 11130,
            "label": "Delivered",
            "selected": true
        },
        {
            "value": 11131,
            "label": "Delivered-Next Day",
            "selected": false
        }
    ],
    "success": true,
    "error": null
}

The following values are significant

Property Notes
ShippingMethods.value This is the number representing a shipping method, and must be passed to this API to change the shippign method.
ShippingMethods.label This is the market specifc label to show to the user (it is provided by the Shipping Web Service on the server).
ShippingMethods.selected This indicates if this shipping method is the one currently associated with the order.

method: POST

secured: true

url: /v1/promote/checkout/verify/shipping.json

Field Notes
ShippingMethod The ID of a shipping method.
Type: Integer (this value can be found in the response of a GET to this API)

If the request is valid you will see a response like this:

{
    "Balance": {...},
    "AutoShipBalance": {...},
    "Details": {...},
    "RequireSignature": null,
    "ShippingMethods": null,
    "success": true,
    "error": null
}