Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 58 Next »

Purpose

The purpose of this document is to list the high-level API endpoints required for headless commerce(B2C). This will helps in finalizing API design.

API Endpoints

Authentication

Sr No.API EndpointDescriptionTasksStatusPhase
1POST /guest-tokenThis API will return a token for a guest account.
PlanningI
2POST /customer-tokenThis API will return a token for the registered user.
PlanningI
3POST /refresh-tokenIn case we need to update the token. As JWT token ideally contains a certain expiry time. So if the user is active then instead of getting him to log out, this API can generate a new token from the existing token.
PlanningI

Customer

Sr No.API EndpointDescriptionTasks/PRsStatusPhase
Customer Profile
1POST /customersTo register the customer.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
2GET /customers/{customerPartyId}To get the customer's personal information, addresses, emails, phones, etc.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
3PUT /customers/{customerPartyId}To update the customer's personal information.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
4POST /customers/reset-passwordTo get the reset password link on the registered email.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
5POST /customers/{customerPartyId}/change-passwordTo change the password.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
6GET /customers/{customerPartyId}/shipping-addressesTo get the customer's shipping addresseshttps://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
7POST /customers/{customerPartyId}/shipping-addressesTo create the shipping address.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
8PUT /customers/{customerPartyId}/shipping-addresses/{contactMechId}To update the shipping address.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
9DELETE /customers/{customerPartyId}/shipping-addresses/{contactMechId}To delete/expire the shipping address.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
10POST /customers/{customerPartyId}/payment-methodsTo save a payment method e.g. credit card, gift card, eft accounthttps://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
11GET /customers/{customerPartyId}/payment-methodsTo get the user's payment methods eg. saved credit cards, gift cards, eft accountshttps://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
12PUT /customers/{customerPartyId}/payment-methods/{paymentMethodId}To update the payment method detail.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
13DELETE /customers/{customerPartyId}/payment-methods/{paymentMethodId}To remove a saved credit card, gift card, eft account.https://github.com/apache/ofbiz-plugins/pull/45In Code ReviewI
14GET /customers/{customerPartyId}/order-historyTo fetch all the orders of a customer.
In ProgressI

Catalog

Sr No.API EndpointDescriptionTasksStatusPhase
Catalog
1GET /categoriesTo get the category hierarchy.
PlanningI
2GET /categories/{categoryId}This will fetch all the products of a category.
PlanningI
3GET /productsThis API will have support for the search string and other additional filters. This API will also bring the products of a selected category if provided.
PlanningI
4GET /products/{productId}To get the product detail.
PlanningI
5POST /products/{productId}/reviewsTo add a review of a product.
PlanningI
6GET /offersTo list the special offers.
PlanningI

Wishlist

Sr No.API EndpointDescriptionTasksStatusPhase
Shopping List
1PUT /wishlistTo add a product to the wishlist.
PlanningI
2DELETE /wishlist/{productId}To remove a product from the wishlist.
PlanningI
3GET /wishlistTo get the wishlist.
PlanningI

Shopping Cart & Checkout

Note: The below API endpoints are written considering the Object-Oriented implementation of Shopping Cart. We need to identify the best way to store the shopping cart object as the user session won't be in the picture here. One way to introduce a new table to keep the cart object with a unique cart ID. For better performance cache can also be used efficiently. The cart object should have the last updated timestamp so that a clear policy to remove the abandoned cart can be imposed.


Sr No.API EndpointDescriptionTasksStatusPhase
1POST /cartsTo create a cart.
PlanningI
2PUT /carts/{cartReference}To update the cart.
PlanningI
3GET /carts/{cartReference}To get the complete cart.
PlanningI
4POST /carts/{cartReference}/deleteTo remove items from the cart.
PlanningI
5POST /carts/{cartReference}/promotionsTo apply the promo code on the cart.
PlanningI
6DELETE /carts/{cartReference}/promotionsTo remove an applied promotion.
PlanningI
7POST /carts/{cartReference}/shipping-informationTo add shipping information
PlanningI
8POST /carts/{cartReference}/shipping-methodsTo add shipping methods.
PlanningI
9GET /carts/{cartReference}/payment-methodsTo get the available payment methods
PlanningI
10GET carts/{cartReference}/totalsTo get the cart total.
PlanningI
  • No labels