Pepesto Grocery Shopping API
Overview
Pepesto provides a service that allows client apps and agents to enable grocery shopping for their users. To do this, they provide Pepesto with a list of recipes and/or a shopping list. Pepesto processes this information and returns a redirect URL.
The redirect URL can be opened by the end user in a browser, or embedded in an app or website. On that URL, users can modify their shopping cart and purchase the groceries through one of the many supermarkets in Europe supported by Pepesto.
To call the demo, use the following command:
curl -X POST "https://s.pepesto.com/api/shop" \ -H "Content-Type: application/json" \ -d '{ "content_urls": ["https://www.bbcgoodfood.com/recipes/pizza-margherita-4-easy-steps"], "content_text": "also add milk, bananas, and kitchen towel" }'
API Documentation
Request
type ShopRequest struct { // List of URLs containing recipes or shopping lists. // The content must be accessible via a simple HTTP GET request (no authentication, no client-side JavaScript, etc.). // If the content is not accessible, use a scraping service and pass the content as plain text in the field below. ContentUrls []string `json:"content_urls"` // Free-form text describing a recipe or a shopping list. ContentText string `json:"content_text"` // Image of a recipe or a shopping list. ContentImageUrl string `json:"content_image"` }
Response
type ShopResponse struct { // A URL pointing to "https://s.pepesto.com". // Opening the result page allows the user to view the intended products and complete the purchase. // The result page can either be opened in an external browser, or embedded as an iframe in a client website, or app. RedirectUrl string `json:"redirect_url"` }
Embedding the Result Page
To embed the result page, use the following HTML:
<div id="dockable-iframe-container"></div> <script src="https://s.pepesto.com/dockable.js" pepesto-source-url="REDIRECT_URL_RETURNED_BY_THE_SHOPPING_API"></script>
Demo
Output
Result URL: https://app.pepesto.com
<div id="dockable-iframe-container"></div> <script src="https://s.pepesto.com/dockable.js" pepesto-source-url="https://app.pepesto.com"></script>
IFrame Output
Curious to learn more or have a demo?
Reach out to us today and let's explore how Pepesto's API could help you and your audience.