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'?
- To obtain an access token for authorization. (correct)
- To retrieve product information.
- To create a new user account.
- To start a new session in the application.
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'?
- PUT
- DELETE
- GET
- POST (correct)
What does the 'beforeSend' function in the second AJAX request handle?
What does the 'beforeSend' function in the second AJAX request handle?
- Attaching the access token to the request. (correct)
- Validating the user credentials.
- Defining the data to be sent with the request.
- Setting the content type for the request.
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?
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?
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?
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?
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?
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?
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?
What is the purpose of the 'beforeSend' function in the AJAX requests?
What is the purpose of the 'beforeSend' function in the AJAX requests?
What is the final step in the shopping process described?
What is the final step in the shopping process described?
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?
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?
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?
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?
What is the primary purpose of the Storefront API?
What is the primary purpose of the Storefront API?
Which two actions are involved in signing into Configured Commerce?
Which two actions are involved in signing into Configured Commerce?
What allows for seamless upgrades in the Configured Commerce REST APIs?
What allows for seamless upgrades in the Configured Commerce REST APIs?
How does the Administrative API differ from the Storefront API?
How does the Administrative API differ from the Storefront API?
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?
What feature of the Storefront API enhances developer flexibility?
What feature of the Storefront API enhances developer flexibility?
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?
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?
What type of request is used to retrieve product details by productId?
What type of request is used to retrieve product details by productId?
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?
What is the purpose of the 'beforeSend' function in the AJAX request?
What is the purpose of the 'beforeSend' function in the AJAX request?
What should be modified when retrieving product details based on search results?
What should be modified when retrieving product details based on search results?
How is a wishlist created in the provided code?
How is a wishlist created in the provided code?
What information is required when adding a product to a wishlist?
What information is required when adding a product to a wishlist?
What action will the second AJAX request accomplish?
What action will the second AJAX request accomplish?
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?
Flashcards
Configured Commerce REST API
Configured Commerce REST API
Set of RESTful services for interacting with Configured Commerce data using JSON objects, based on common HTTP verbs.
Storefront API
Storefront API
API for digital commerce functions (products, carts, user accounts), designed to be developer-friendly, flexible, and scalable.
Administrative API
Administrative API
Provides data access to all Configured Commerce objects, useful for integrating with other platforms.
HTTP Verbs
HTTP Verbs
Signup and view all the flashcards
Sign In B2B Session
Sign In B2B Session
Signup and view all the flashcards
Identity Server
Identity Server
Signup and view all the flashcards
Product Catalog Retrieval
Product Catalog Retrieval
Signup and view all the flashcards
Category Retrieval
Category Retrieval
Signup and view all the flashcards
Product Search
Product Search
Signup and view all the flashcards
Product Detail Retrieval
Product Detail Retrieval
Signup and view all the flashcards
Wishlist Creation
Wishlist Creation
Signup and view all the flashcards
Adding to Wishlist
Adding to Wishlist
Signup and view all the flashcards
Shopping Cart Addition
Shopping Cart Addition
Signup and view all the flashcards
Cart Quantity Update
Cart Quantity Update
Signup and view all the flashcards
Order Submission
Order Submission
Signup and view all the flashcards
POST request
POST request
Signup and view all the flashcards
GET request
GET request
Signup and view all the flashcards
PATCH request
PATCH request
Signup and view all the flashcards
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.