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 /getGuestTokenPOST /guest-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-hintTo get the password hint. | 3 | POST /customers/reset-password | To get the reset password link on the registered email. |
45 | GET /customers/{customerPartyId} | To get the full data of the customer profile. | 6 | PUT /customers/{customerPartyId}/shipping-addresses | To |
update personal information. postal 8 | PUT /customers/{customerPartyId}/addresses/{contactMechId} | To update the postal address and to mark the default address. | 9 | DELETE /customers/{customerPartyId}/shipping-addresses/{contactMechId} | To |
delete/expire postal POST 10 | customers/{customerPartyId}/phonesTo create a telecom number. | 11 | PUT /customers/{customerPartyId}/phones/{contactMechId} | To update a telecom number. | 12 | DELETE /customers/{customerPartyId}/ |
phonesshipping-addresses/{contactMechId} | To delete |
a telecom number13 | POST /customers/{customerPartyId}/emails | To create an email PUT /expire the shipping address. |
14 | customers/{customerPartyId}/emails/{contactMechId}To update an email address. | 15 | DELETE /customers/{customerPartyId}/emails/{contactMechId} | To remove an email address. | 16contactinformationTo 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}/ |
contact-information/{contactMechId} 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}/ |
creditcardsmethods/{paymentMethodId} | To update the |
credit card detail and to mark it as default.22creditcardsmethods/{paymentMethodId} | To remove a saved credit card, gift card, eft account. |
23 | POST /customers/{customerPartyId}/gift-cards | To create a gift card. | 24 | PUT /customers/{customerPartyId}/ |
gift-cards/{paymentMethodId}order-history | To fetch all the orders of a customer. |
| In Progress | I |
Catalog
Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|
1 | GET /categories | To get the 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. |
| 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 |
---|
1 | POST | update the gift card detail and to mark it as default.25 | DELETE /customers/{customerPartyId}/gift-cards/{paymentMethodId} | To remove the gift card. | 26 | POST /customers/{customerPartyId}/eft-accounts | To create an EFT account. | 27 | PUT /customers/{customerPartyId}/eft-accounts/{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}/shipment-methods/{shipmentMethodId} | To 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. | 32 | GET /customers/{customerPartyId}/orderswishlist | To fetch all the orders of a customerCreate a wishlist. |
| Planning |
|
133GET | PUT /customers/{customerPartyId}/ | orderswishlist/{ | orderIdwishlistId} | To | fetch the order detail.add a product to the wishlist. |
| Planning | I |
2 | DELETE | 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. | wishlist/{wishlistId}/{productId} | To remove a product from the wishlist. |
| Planning | I |
3 | 35 | GET /customers/{customerPartyId}/orders/{orderId}/order-pdf | To get the order pdf. | 36 | GET /customers/{customerPartyId}/orderswishlist/{orderIdwishlistId}/invoice-pdf | To get the invoice pdfwishlist. | 37 | POST /customers/{customerPartyId}/returns | To create a return. |
Catalog
Checkout
Sr No. | API Endpoint | Description | Tasks | Status | Phase |
---|
1 | 2 | 3 |
Shopping List and Quotes
...
Shopping Cart & Checkout
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 |
---|
1 | 2 | 3 |