API storefront #
Mọi route /api/v1/storefront/* cho người mua (StorefrontClient). Chi tiết: storefront.openapi.json, storefront.ts.
auth #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
POST | /api/v1/storefront/auth/account/delete | Delete a customer account with the token from the email | storefrontDeleteAccount | |
POST | /api/v1/storefront/auth/account/delete-request | Email the signed-in customer a link to delete the account | storefrontRequestAccountDeletion | |
POST | /api/v1/storefront/auth/email/confirm | Confirm the customer's email with a verification token | storefrontConfirmEmail | |
POST | /api/v1/storefront/auth/email/verify | Send a verification link to the signed-in customer | storefrontRequestEmailVerification | |
POST | /api/v1/storefront/auth/login | Sign in a customer (storefront) | storefrontLogin | |
POST | /api/v1/storefront/auth/logout | Sign out a customer (revokes the refresh token family) | storefrontLogout | |
POST | /api/v1/storefront/auth/password | Change the signed-in customer's password | storefrontChangePassword | |
POST | /api/v1/storefront/auth/password/forgot | Request a password reset email (customer) | storefrontForgotPassword | |
POST | /api/v1/storefront/auth/password/reset | Set a new password with a reset token (customer) | storefrontResetPassword | |
POST | /api/v1/storefront/auth/phone/code | Text a sign-in code to a phone number (customer) | storefrontRequestPhoneCode | |
POST | /api/v1/storefront/auth/phone/confirm | Confirm the signed-in customer's phone number with the code | storefrontConfirmPhone | |
POST | /api/v1/storefront/auth/phone/login | Sign in or sign up with a phone number and the texted code | storefrontPhoneLogin | |
POST | /api/v1/storefront/auth/phone/verify | Text a code to verify a phone number of the signed-in customer | storefrontRequestPhoneVerification | |
POST | /api/v1/storefront/auth/refresh | Rotate a customer refresh token | storefrontRefresh | |
POST | /api/v1/storefront/auth/register | Create a customer account (storefront) | storefrontRegister | |
POST | /api/v1/storefront/auth/sessions/revoke-all | Sign the customer out everywhere | storefrontRevokeAllSessions | |
POST | /api/v1/storefront/auth/social/{provider}/exchange | Finish a social sign-in (web redirect flow) | storefrontSocialExchange | |
POST | /api/v1/storefront/auth/social/{provider}/link | Link a provider to the signed-in customer (native flow) | storefrontSocialLink | |
POST | /api/v1/storefront/auth/social/{provider}/link/exchange | Finish linking a provider (redirect flow) | storefrontSocialLinkExchange | |
POST | /api/v1/storefront/auth/social/{provider}/link/start | Start linking a provider to the signed-in customer (redirect flow) | storefrontSocialLinkStart | |
POST | /api/v1/storefront/auth/social/{provider}/nonce | Get a one-time nonce for a native id_token sign-in | storefrontSocialNonce | |
POST | /api/v1/storefront/auth/social/{provider}/start | Start a social sign-in (web redirect flow) | storefrontSocialStart | |
POST | /api/v1/storefront/auth/social/{provider}/token | Sign in with a provider credential from its SDK (native flow) | storefrontSocialSignIn | |
POST | /api/v1/storefront/auth/social/complete | Finish a social sign-up with an email address | storefrontSocialComplete | |
GET | /api/v1/storefront/auth/social/providers | Social sign-in providers available at this store | storefrontSocialProviders |
brands #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/brands | List active brands (storefront) | listPublicBrands | |
GET | /api/v1/storefront/brands/{slug} | Get an active brand by slug (storefront) | getPublicBrandBySlug |
cart #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/cart | Get my cart (storefront) | getMyCart | |
PUT | /api/v1/storefront/cart/codes | Set the codes of my cart (storefront) | setMyCartCodes | |
POST | /api/v1/storefront/cart/items | Add to my cart (storefront) | addMyCartItem | |
PATCH | /api/v1/storefront/cart/items/{itemId} | Change a line quantity (storefront) | setMyCartItemQty | |
DELETE | /api/v1/storefront/cart/items/{itemId} | Remove a line (storefront) | removeMyCartItem | |
POST | /api/v1/storefront/cart/merge | Move a guest cart into my cart (storefront) | mergeMyCart |
checkout #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
POST | /api/v1/storefront/checkout/confirm | Place the order from my cart (storefront) | confirmMyCheckout | |
POST | /api/v1/storefront/checkout/preview | Preview checkout (storefront) | previewMyCheckout |
configs #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/configs | Public settings | getStorefrontConfigs |
me #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/me | The signed-in customer | storefrontMe | |
GET | /api/v1/storefront/me/identities | Social sign-in methods linked to the signed-in customer | storefrontListIdentities | |
DELETE | /api/v1/storefront/me/identities/{id} | Remove a linked social sign-in method | storefrontUnlinkIdentity |
orders #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/orders | List my orders (storefront) | listMyOrders | |
GET | /api/v1/storefront/orders/{id} | Get one of my orders (storefront) | getMyOrder | |
POST | /api/v1/storefront/orders/{id}/cancel | Cancel one of my orders (storefront) | cancelMyOrder |
payments #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/payments/intents/{id} | Payment details of an intent | getStorefrontPaymentIntent | |
POST | /api/v1/storefront/payments/intents/{id}/momo | Pay an intent with MoMo | createStorefrontPaymentMomoCheckout |
product-categories #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/product-categories | List visible product categories (storefront) | listPublicProductCategories | |
GET | /api/v1/storefront/product-categories/{slug} | Get a visible product category by slug (storefront) | getPublicProductCategoryBySlug |
products #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/products | List products on sale (storefront) | listPublicProducts | |
GET | /api/v1/storefront/products/{slug} | Get a product on sale by slug (storefront) | getPublicProductBySlug | |
GET | /api/v1/storefront/products/images/{fileId} | Get a product image (storefront) | getPublicProductImage |
return-requests #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/return-requests | My return requests (storefront) | listMyReturnRequests | |
POST | /api/v1/storefront/return-requests | Ask to return items of my order (storefront) | createMyReturnRequest | |
GET | /api/v1/storefront/return-requests/{id} | One of my return requests (storefront) | getMyReturnRequest | |
POST | /api/v1/storefront/return-requests/{id}/cancel | Cancel my return request (storefront) | cancelMyReturnRequest |
shipments #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/shipments | Shipments of one of my orders (storefront) | listMyShipments |
store #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/store | The store of the request | getStorefrontStore |
wishlist #
| Method | Đường | Tóm tắt | Method SDK | Quyền |
|---|---|---|---|---|
GET | /api/v1/storefront/wishlist | My wishlist (storefront) | listMyWishlist | |
POST | /api/v1/storefront/wishlist | Save a variant to my wishlist (storefront) | addMyWishlistItem | |
DELETE | /api/v1/storefront/wishlist/{variantId} | Remove a variant from my wishlist (storefront) | removeMyWishlistItem | |
POST | /api/v1/storefront/wishlist/check | Which variants are in my wishlist (storefront) | checkMyWishlist |