You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 57
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 Endpoint | Description | Tasks | Status | Phase |
---|
1 | POST /guest-token | This API will return a token for a guest account. |
| Planning | I |
2 | POST /customer-token | This API will return a token for the registered user. |
| Planning | I |
3 | POST /refresh-token | In 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. |
| Planning | I |
Customer
Sr No. | API Endpoint | Description | Tasks/PRs | Status | Phase |
---|
Customer Profile |
1 | POST /customers | To register the customer. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
2 | GET /customers/{customerPartyId} | To get the customer's personal information, addresses, emails, phones, etc. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
3 | PUT /customers/{customerPartyId} | To update the customer's personal information. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
4 | POST /customers/reset-password | To get the reset password link on the registered email. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
5 | POST /customers/{customerPartyId}/change-password | To change the password. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
6 | GET /customers/{customerPartyId}/shipping-addresses | To get the customer's shipping addresses | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
7 | POST /customers/{customerPartyId}/shipping-addresses | To create the shipping address. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
8 | PUT /customers/{customerPartyId}/shipping-addresses/{contactMechId} | To update the shipping address. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
9 | DELETE /customers/{customerPartyId}/shipping-addresses/{contactMechId} | To delete/expire the shipping address. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
10 | POST /customers/{customerPartyId}/payment-methods | To save a payment method e.g. credit card, gift card, eft account | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
11 | GET /customers/{customerPartyId}/payment-methods | To get the user's payment methods eg. saved credit cards, gift cards, eft accounts | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
12 | PUT /customers/{customerPartyId}/payment-methods/{paymentMethodId} | To update the payment method detail. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
13 | DELETE /customers/{customerPartyId}/payment-methods/{paymentMethodId} | To remove a saved credit card, gift card, eft account. | https://github.com/apache/ofbiz-plugins/pull/45 | In Code Review | I |
14 | GET /customers/{customerPartyId}/order-history | To fetch all the orders of a customer. |
| In Progress | I |
Catalog
Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|
Catalog |
1 | GET /categories | To get the category hierarchy. |
| Planning | I |
2 | GET /categories/{categoryId} | This will fetch all the products of a category. |
| Planning |
|
3 | GET /products | This 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. |
| Planning | I |
4 | GET /products/{productId} | To get the product detail. |
| Planning | I |
5 | POST /products/{productId}/reviews | To add a review of a product. |
| Planning | I |
6 | GET /offers | To list the special offers. |
| Planning | I |
Wishlist
Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|
Shopping List |
1 | PUT /wishlist | To add a product to the wishlist. |
| Planning | I |
2 | DELETE /wishlist/{productId} | To remove a product from the wishlist. |
| Planning | I |
3 | GET /wishlist | To get the wishlist. |
| Planning | I |
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 Endpoint | Description | Tasks | Status | Phase |
---|
Shopping Cart |
1 | POST /carts | To create a cart. |
| Planning | I |
2 | PUT /carts/{cartReference} | To update the cart. |
|
|
|
3 | GET /carts/{cartReference} | To get the complete cart. |
| Planning | I |
4 | POST /carts/{cartReference}/delete | To remove items from the cart. |
| Planning | I |
5 | POST /carts/{cartReference}/promotions | To apply the promo code on the cart. |
| Planning | I |
6 | DELETE /carts/{cartReference}/promotions | To remove an applied promotion. |
| Planning | I |
7 | POST /carts/{cartReference}/shipping-information |
|
| Planning | I |
8 | POST /carts/{cartReference}/shipping-methods |
|
| Planning | I |
9 | GET /carts/{cartReference}/payment-methods |
|
|
|
|
10 | GET carts/{cartReference}/totals |
|
|
|
|