Where to Buy
Helps a user discover which of your venues have a given product in stock.
Where to Buy identifies where a Product is available across your eligible Venue(s).
WhereToBuy is the container object which will include an array of either MerchantProductLinks (if sorted by price) or venues (if sorted by distance).
If a merchant product link is returned, it will include the venue that it is contained in.
If a venue is returned, it will include the merchant product link that matches the criteria provided.
See Preferabli.main.whereToBuy(product_id:fulfill_sort:append_nonconforming_results:lock_to_integration:onCompletion:onFailure:) for more information.
Here is an example of how to use Where to Buy:
Preferabli.main.whereToBuy(product_id: product_id) { where_to_buy in
// Do what you want with the merchant product link or venue objects returned.
} onFailure: { error in
// Call failed.
}Updated about 1 year ago
