Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit ec88d21

Browse files
Sairam9519keharper
authored andcommitted
Order creation API endpoints updated for guest users (#6086)
* Order creation API endpoints updated for guest users * Refactored docs Order creation API endpoints updated for guest users #6086 * Refactored order apis for guest-cart * Refactored order apis for guest-cart * Update order-add-items.md * Update order-create-order.md * Update order-create-order.md * Update order-create-quote.md * Update order-prepare-checkout.md * Update order-add-items.md
1 parent 5745a82 commit ec88d21

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

src/guides/v2.2/rest/tutorials/orders/order-add-items.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ functional_areas:
1414
- Catalog
1515
---
1616

17-
This article shows how to add a simple product, a downloadable product, and a [bundle product](https://glossary.magento.com/bundle-product) to the cart.
17+
This step shows how to add a simple product, a downloadable product, and a [bundle product](https://glossary.magento.com/bundle-product) to the cart.
1818

19-
All calls are performed on behalf of a customer, and the customer's token is specified in the [authorization](https://glossary.magento.com/authorization) header.
19+
These calls are performed on behalf of a customer, and the customer's token is specified in the [authorization](https://glossary.magento.com/authorization) header.
20+
21+
{:.bs-callout-info}
22+
Use the `V1/guest-carts/<cartId>/items` endpoint to add items to the cart on behalf of a guest. Do not include an authorization token. The payload and response is same as the logged-in customer for all product types, except for from quote ID in the payload.
2023

2124
### Add a simple product to a cart {#add-simple}
2225

src/guides/v2.2/rest/tutorials/orders/order-create-order.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ The [shopping cart](https://glossary.magento.com/shopping-cart) contains three i
2323

2424
When you submit payment information, Magento creates an order and sends an order confirmation to the customer. Since we are using an offline [payment method](https://glossary.magento.com/payment-method) in this tutorial, we do not need to provide detailed payment information. The endpoint used in this example requires only the payment method and billing address information.
2525

26+
{:.bs-callout-info}
27+
Use the `V1/guest-carts/<cartId>/payment-information` endpoint to set the payment information on behalf of a guest. Do not include an authorization token.
28+
2629
**Endpoint:**
2730

2831
`POST <host>/rest/<store_code>/V1/carts/mine/payment-information`

src/guides/v2.2/rest/tutorials/orders/order-create-quote.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ Magento identifies three types of users that can create a shopping cart:
3636

3737
### Create a cart for a logged-in customer {#create-cart}
3838

39-
This tutorial manages the cart of a logged-in customer. Unless otherwise noted, all calls must specify customer's token `q0u66k8h42yaevtchv09uyy3y9gaj2ap` in the header.
39+
All calls for a logged in customer must specify customer's token `q0u66k8h42yaevtchv09uyy3y9gaj2ap` in the header.
40+
41+
{:.bs-callout-info}
42+
Use the `V1/guest-carts` endpoint to create a cart on behalf of a guest. Do not include an authorization token. The `quoteId` for the guest customer quote will be masked.
4043

4144
**Endpoint:**
4245

src/guides/v2.2/rest/tutorials/orders/order-prepare-checkout.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Now that all the items have been added to the cart, we can prepare the order for
2525

2626
Magento calculates shipping costs for each shipping method that can be applied to the order. In this tutorial, the `flatrate` ($5 per item) and `tablerate` shipping methods are active.
2727

28+
{:.bs-callout-info}
29+
Use the `V1/guest-carts/<cartId>/estimate-shipping-methods` endpoint to estimate shipping costs on behalf of a guest. Do not include an authorization token.
30+
2831
**Endpoint:**
2932

3033
`POST <host>/rest/<store_code>/V1/carts/mine/estimate-shipping-methods`
@@ -104,6 +107,9 @@ In this call, you specify the shipping and billing addresses, as well as the sel
104107

105108
Magento returns a list of payment options and calculates the order totals.
106109

110+
{:.bs-callout-info}
111+
Use the `V1/guest-carts/<cartId>/shipping-information` endpoint to set the billing and shipping information on behalf of a guest. Do not include an authorization token.
112+
107113
**Endpoint:**
108114

109115
`POST <host>/rest/<store_code>/V1/carts/mine/shipping-information`

0 commit comments

Comments
 (0)