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 | GET POST /getGuestTokenguest-token | This API will return a token for a guest account. |
| Planning | I |
2 | POST /getCustomerTokencustomer-token | This API will return a token for the registered user. |
| Planning | I |
3 | POST /refreshTokenrefresh-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
/password-hint password hint.3 | POST /customers/reset-password | To get the reset password link on the registered email. | 4 | POST /customers/{customerPartyId}/change-password | To change the password. | 5 | GET /customers/{customerPartyId} | To get the full data of the customer profile. | 6 | PUT /customers/{customerPartyId} | To update the customer's personal information. |
7 | POST /customers/{customerPartyId}/addresses | To create the postal address. | 8 | PUT /customers/{customerPartyId}/addresses/{contactMechId} | To update the postal address and to mark the default address. | 9 | DELETE /customers/{customerPartyId}/addresses/{contactMechId} | To delete/expire the postal address. | 10 | POST /customers/{customerPartyId}/ |
phones create a telecom numberPUT 11 | customers/{customerPartyId}/phones/{contactMechId}To update a telecom number. | 12 | DELETE /customers/{customerPartyId}/phones/{contactMechId} | To delete a telecom number | 13 | POST /customers/{customerPartyId}/ |
emailsTo create an email address. | 14 | PUT /customers/{customerPartyId}/emails/{contactMechId} | To update an email address. | 15 | DELETE /customers/{customerPartyId}/emails/{contactMechId} | To remove an email address. | 16contactinformation add the other contact information like electronic address, Internet IP address, Internet Domain Name, Web Url, LDAP address, File server, etc. 17 | PUT /customers/{customerPartyId}/contact-information/{contactMechId} | To update the other contact information like electronic address, Internet IP address, Internet Domain Name, Web Url, LDAP address, File server, etc. | 18 | DELETE /customers/{customerPartyId}/ |
contactinformationaddresses/{contactMechId} | To |
remove the other contact information like electronic address, Internet IP address, Internet Domain Name, Web Url, LDAP address, File server, etc.19 | POST /customers/{customerPartyId}/sendEmail | To send the mail from the profile page to the added email address. | 20 | POST /customers/{customerPartyId}/credit-cards | To create a credit card. | 21 | PUT /customers/{customerPartyId}/ |
creditcardspaymentMethodId update the credit card detail and to mark it as default.22 | DELETE /customers/{customerPartyId}/credit-cards/{paymentMethodId} | To remove a credit card. | 23giftcards create a gift card.24 | PUT /customers/{customerPartyId}/gift-cards/{paymentMethodId} | To update the gift card detail and to mark it as default. | 25 | DELETE /customers/{customerPartyId}/ |
gift-cards/{paymentMethodId} remove the gift card.26 | POST /customers/{customerPartyId}/eft-accounts | To create an EFT account. | 27eftaccountsmethods/{paymentMethodId} | To update the |
EFT account detail and to mark it as default.28 | DELETE /customers/{customerPartyId}/eft-accounts/{paymentMethodId} | To remove the EFT account. | 29 | POST /customers/{customerPartyId}/ |
shipmentshipmentMethodId mark the default shipping method if there is a default shipping address.30 | POST /customers/{customerPartyId}/contact-list/{contactListId}/subscription | To subscribe to the contact list. | 31 | PUT /customers/{customerPartyId}/contact-list/{contactListId/subscription | To unsubscribe the contact list. | 32ordersorder-history | To fetch all the orders of a customer. |
33 | GET /customers/{customerPartyId}/orders/{orderId} | To fetch the order detail. | 34 | PUT /customers/{customerPartyId}/orders/{orderId} | To update the order. Right now the support to cancel an item(partially or fully) is there. That should be handled in this API. | 35 | GET /customers/{customerPartyId}/orders/{orderId}/order-pdf | To get the order pdf. | 36 | GET /customers/{customerPartyId}/orders/{orderId}/invoice-pdf | To get the invoice pdf. | 37 | POST /customers/{customerPartyId}/returns | To create a return.
Catalog
Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|
1 | GET / |
catalogs3 | GET /catalogs/{catalogId}/feature-products | To get the feature products of a catalog. | 4 | GET /catalogs/{catalogId}/category-hierarchy | To get the category hierarchy of a catalog. | 5 | list of catalogs.2 | GET /catalogs/{catalogId}/feature-categories | To get the feature categories of a catalog. | category hierarchy. |
| Planning | I |
2 | GET /categories/{categoryId} | This will fetch all the products of a category. |
| Planning | I |
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. |
6 | GET /products/{productId} | To get the product detail. | 7 | POST /products/{productId}/reviews | To add a review of a product. | 8 |
| Planning | I |
4 | GET /products/{productId} |
/reviews reviews of a 9 | GET /products/{productId}/associated-products | To get the list of cross-sell/upsell products. | 10
| Planning | I |
5 | POST /products/{productId}/ |
product-tags tag for a product.11 | GET /products/{productId}/product-tags | To get all the tags 12 | GET /products/product-tags | All the product tags for the tag cloud. | 13
| Planning | I |
6 | GET /offers | To list the special |
offers14 | GET //{promotionId}To get the complete detail of a particular offer | 15 | POST /sendMail | For Tell a Friend functionality | 16 | POST /products/compare-list | To create a compare list and to add a product to it. | 17 | GET /products/compare-list | To get the list of added products with detail for the comparison view. | 18 | DELETE /products/compare-list/{productId} | To remove a product from the compare list. | Shopping List and Quotes
Wishlist
Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|
1 | POST / | shopping-listsTo create a new shopping list. | 2 | GET /shopping-lists | To get the list of shopping lists. | 3 | GET /shopping-lists/{shoppingListId} | To get the detail of a shopping list. This will also bring the list of available interval/frequency data for setting the recurrence detail using the update shopping list API. | 4 | PUT /shopping-lists/{shoppingListId} | To update the shopping list detail. Recurrence info can also be set from this API. | 5 | POST /shopping-lists/{shoppingListId}/items | Add an item to the shopping list. | 6 | GET /shopping-lists/{shoppingListId}/items | Get the list of items on a shopping list. | 7 | PUT /shopping-lists/{shoppingListId}/items/{itemId} | Update the particular item on the shopping list. | 8 | DELETE /shopping-lists/{shoppingListId}/items/{itemId} | Remove the particular item from the shopping list. | 9 | POST /quote-requests | Quotes Request can be created from the shopping list and from the cart. This API will create a quote request. | 10 | GET /quote-requests | To get the list of quote requests(request history). | 11 | GET /quote-requests/{requestId} | To get the detail of a quote request. | 12 | GET /quotes | To get the list of quotes. | 13 | GET /quotes/{quoteId} | To get the detail of a quote. | 14 | POST /quote-orders | To create an order from the quote. |
Shopping Cart & Checkout
customers/{customerPartyId}/wishlist | To Create a wishlist. |
| Planning |
|
1 | PUT /customers/{customerPartyId}/wishlist/{wishlistId} | To add a product to the wishlist. |
| Planning | I |
2 | DELETE /customers/{customerPartyId}/wishlist/{wishlistId}/{productId} | To remove a product from the wishlist. |
| Planning | I |
3 | GET /customers/{customerPartyId}/wishlist/{wishlistId} | To get the wishlist. |
| Planning | I |
Checkout
Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|
1 | POST /orders | To Create an order with all the necessary detail (items, shipping address, payment information, etc.) |
| Planning | I |
2 | PATCH /orders/{orderId}/statuses/CANCEL | To cancel an order. |
| Planning | I |
3 | PATCH /orders/{orderId}/items/statuses/CANCEL | To Cancel order items. |
| Planning | I | Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|