GET delivery methods
Walley Checkout fetches the list of available delivery methods every time the customer changes any relevant information that might lead to a change in available delivery methods, e.g. the customer changes delivery address or updates the cart.
When the Checkout sends the GET request to the delivery adapter, it has some default query parameters that are always included, see nShift or custom adapter. Apart from the default parameters, you can set custom parameters that is related to articles in the cart.
This is done by adding
shippingProperties to the cart object in either Initialize Checkout or Update Cart as a JSON object that will be be added in the request query parameters automatically the following way:
"description": "A bulky product",
"sku": "a unique alphanumeric code for article identification"
The following scenario would result in the following GET-request to the delivery adapter to fetch the available delivery methods:
Note that the example with height, width and isBulky are just examples. Any key/value pair can be used and will be translated to query parameters accordingly.
If using a custom delivery adapter, where the privateId is sent in the query, it is possible to Acquire Checkout Information to get more information. Consider that this will add some time for your customer in the checkout so use it only if necessary.
If, for any reasons, Walley Checkout does not receive any delivery methods from the delivery adapter, there is a setting that you will set up at Walley in advance that will decide if the purchase should be stopped or not.
- true: We will show an error and stop the purchase if we cannot fetch at least one valid delivery method
- false: We will allow the customer to complete the purchase, saying that a delivery method will be selected automatically without cost