Podcast
Questions and Answers
What is the purpose of the initial AJAX request to '/identity/connect/token'?
What is the purpose of the initial AJAX request to '/identity/connect/token'?
Which HTTP method is used when creating a session with the AJAX request to '/api/v1/sessions'?
Which HTTP method is used when creating a session with the AJAX request to '/api/v1/sessions'?
What does the 'beforeSend' function in the second AJAX request handle?
What does the 'beforeSend' function in the second AJAX request handle?
Why is the bearer token not included in the request to retrieve the product catalog?
Why is the bearer token not included in the request to retrieve the product catalog?
Signup and view all the answers
Which property of the AJAX request to '/api/v1/products' specifies the page number?
Which property of the AJAX request to '/api/v1/products' specifies the page number?
Signup and view all the answers
What will the success callback function of the request to retrieve all categories log?
What will the success callback function of the request to retrieve all categories log?
Signup and view all the answers
What mechanism is primarily used for handling cross-domain requests in the initial AJAX call?
What mechanism is primarily used for handling cross-domain requests in the initial AJAX call?
Signup and view all the answers
When searching for a product using a query, which method should be specified to retrieve the relevant products?
When searching for a product using a query, which method should be specified to retrieve the relevant products?
Signup and view all the answers
What HTTP method is used to add a product to the shopping cart?
What HTTP method is used to add a product to the shopping cart?
Signup and view all the answers
Which of the following data fields is necessary when updating the quantity of a product in the shopping cart?
Which of the following data fields is necessary when updating the quantity of a product in the shopping cart?
Signup and view all the answers
What is the purpose of the 'beforeSend' function in the AJAX requests?
What is the purpose of the 'beforeSend' function in the AJAX requests?
Signup and view all the answers
What is the final step in the shopping process described?
What is the final step in the shopping process described?
Signup and view all the answers
Which URL is used to change the quantity of a specific product in the shopping cart?
Which URL is used to change the quantity of a specific product in the shopping cart?
Signup and view all the answers
In the context of submitting an order, what additional information must be provided?
In the context of submitting an order, what additional information must be provided?
Signup and view all the answers
When the success callback is executed for adding a product, what type of data does it log?
When the success callback is executed for adding a product, what type of data does it log?
Signup and view all the answers
Which of the following is NOT a step mentioned in managing an online shopping cart?
Which of the following is NOT a step mentioned in managing an online shopping cart?
Signup and view all the answers
What is the primary purpose of the Storefront API?
What is the primary purpose of the Storefront API?
Signup and view all the answers
Which two actions are involved in signing into Configured Commerce?
Which two actions are involved in signing into Configured Commerce?
Signup and view all the answers
What allows for seamless upgrades in the Configured Commerce REST APIs?
What allows for seamless upgrades in the Configured Commerce REST APIs?
Signup and view all the answers
How does the Administrative API differ from the Storefront API?
How does the Administrative API differ from the Storefront API?
Signup and view all the answers
What sequence of actions does the basic commerce workflow using the Storefront API not include?
What sequence of actions does the basic commerce workflow using the Storefront API not include?
Signup and view all the answers
What feature of the Storefront API enhances developer flexibility?
What feature of the Storefront API enhances developer flexibility?
Signup and view all the answers
What is the first step in the basic commerce workflow using the Storefront API?
What is the first step in the basic commerce workflow using the Storefront API?
Signup and view all the answers
Which HTTP verbs are primarily used in the conception of the API objects?
Which HTTP verbs are primarily used in the conception of the API objects?
Signup and view all the answers
What type of request is used to retrieve product details by productId?
What type of request is used to retrieve product details by productId?
Signup and view all the answers
Which data type is specified for the AJAX calls in the provided code?
Which data type is specified for the AJAX calls in the provided code?
Signup and view all the answers
What is the purpose of the 'beforeSend' function in the AJAX request?
What is the purpose of the 'beforeSend' function in the AJAX request?
Signup and view all the answers
What should be modified when retrieving product details based on search results?
What should be modified when retrieving product details based on search results?
Signup and view all the answers
How is a wishlist created in the provided code?
How is a wishlist created in the provided code?
Signup and view all the answers
What information is required when adding a product to a wishlist?
What information is required when adding a product to a wishlist?
Signup and view all the answers
What action will the second AJAX request accomplish?
What action will the second AJAX request accomplish?
Signup and view all the answers
Which of the following is true about the 'productId' used in the requests?
Which of the following is true about the 'productId' used in the requests?
Signup and view all the answers
Study Notes
Configured Commerce REST APIs
- The Configured Commerce REST API is made up of RESTful-based services that interact with Configured Commerce data using JSON objects.
- The API objects and their respective methods are based on common HTTP verbs.
Storefront API
- Built with the following considerations:
- Open up the platform for connected commerce.
- Allow developers to create customizations outside the platform.
- Offer a developer-friendly, flexible, and modern experience.
- Allow for seamless upgrades.
- Create a facade for the application to minimize interruption during improvements.
- Ensure scalability.
Storefront API vs Administrative API
- Storefront API: Delivers digital commerce functionality (viewing products, adding products to carts, user account management).
- Administrative API: Provides data-level access to all objects. Used for integrating other platforms requiring access to all Configured Commerce objects.
Building a Digital Commerce Workflow with Storefront API using jQuery
-
Sign In and Create B2B Session:
- Requires two requests: authentication with Identity Server and creation of a Configured Commerce session.
- The first request authenticates with Identity Server using a POST request to
/identity/connect/token
. - The second request creates a session within Configured Commerce using a POST request to
/api/v1/sessions
.
-
Retrieve Product Catalog:
- Retrieves the product catalog available within the current context (user, customer, website).
- Uses a GET request to
/api/v1/products
.
-
Retrieve All Categories:
- Retrieves all categories.
- Uses a GET request to
/api/v1/categories
.
-
Search for Product Using a Query:
- Uses a GET request to
/api/v1/products
. - Includes the
query
parameter for the search term.
- Uses a GET request to
-
Retrieve Product Details:
- Returns details of a specific product identified by
productId
. - Uses a GET request to
/api/v1/products
. - Includes the
productId
parameter.
- Returns details of a specific product identified by
-
Create Wishlist and Add Product to Wish List:
- Creates a new wishlist with a POST request to
/api/v1/wishlists
. - Adds a product to the wishlist with a POST request to
/api/v1/wishlists/{wishListId}/wishlistlines
.
- Creates a new wishlist with a POST request to
-
Add Product to Shopping Cart:
- Adds a product to the current user's cart with a POST request to
/api/v1/carts/current/cartlines
. - Includes
productId
andqtyOrdered
parameters.
- Adds a product to the current user's cart with a POST request to
-
Change Quantity of Product in Shopping Cart:
- Updates the quantity of a product in the cart using a PATCH request to
/api/v1/carts/current/cartlines/{cartLineId}
. - Includes the
id
(cartLineId) andqtyOrdered
parameters.
- Updates the quantity of a product in the cart using a PATCH request to
-
Submit Order:
- Completes the order using a PATCH request to
/api/v1/carts/current
. - The request data includes updated cart details (shipping information, payment method, etc.).
- Completes the order using a PATCH request to
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the key features and functionalities of Configured Commerce REST APIs, including the distinction between Storefront and Administrative APIs. It highlights how these APIs facilitate connected commerce, enhance developer experiences, and ensure scalability. Test your knowledge on the integration and usage of these APIs in a modern storefront setup.