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
Sr No. | API Endpoint | Description | Tasks/PRs | Status | Phase |
---|
1 | POST |
/createCustomer2 | POST /getPasswordHint | 3 | POST /resetPasswordchangePassword5 | GET /getCustomerProfile | 6 | POST /updatePersonalInformaion | 7 | POST /createPostalAddress | 8 | POST /updatePostalAddress | 9 | POST /removePostalAddress | 10 | POST /setDefaultAddress | 11 | POST /createTelecomNumber | 12 | POST /updateTelecomNumber | 13 | POST /removeTelecomNumber | 14 | POST /createEmailAddress | 15 | POST /updateEmailAddress | 16 | POST /removeEmailAddress | 17 | POST /createContactInformation | 18 | POST /updateContactInformation | 19 | POST /removeContactInformation | 20 | POST /sendEmail | 21 | POST /createCreditCard | 22 | POST /updateCreditCard | 23 | POST /removeCreditCard | 24 | POST /createGiftCard | 25 | POST /updateGiftCard | 26 | POST /removeGiftCard | 27 | POST /createEftAccount | 28 | POST /updateEftAccount | 29 | POST /removeEftAccount | 30 | POST /setDefaultPaymentMethod | 31 | POST /setDefaultShipmentMethod | 32 | POST /subscribeContactList | 33 | POST /unsubscribeContactList
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 /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 |