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

Commit f286f43

Browse files
authored
Merge pull request #3334 from magento/kh_graphql-create-cart
add quote endpoint topic
2 parents 4677618 + f4df797 commit f286f43

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

_data/toc/graphql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ pages:
6767
- label: Customer endpoint
6868
url: /graphql/reference/customer.html
6969

70+
- label: Quote endpoint
71+
url: /graphql/reference/quote.html
72+
7073
- label: storeConfig endpoint
7174
url: /graphql/reference/store-config.html
7275

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
group: graphql
3+
title: quote endpoint
4+
---
5+
6+
A quote represents the contents of a customer's shopping cart. It is responsible for performing tasks such as:
7+
8+
* Tracking each item in the cart, including the quantity and base cost
9+
* Determining estimated shipping costs
10+
* Calculating subtotals, computing additional costs, applying coupons, and determining the payment method
11+
12+
## Mutations
13+
14+
Magento 2.3.0 supports the `createEmptyCart` mutation only.
15+
16+
### Create an empty cart
17+
18+
The `createEmptyCart` mutation creates an empty shopping cart for a guest or logged in customer. If you are creating a cart for a logged in customer, you must include the customer's authorization token in the header of the request.
19+
20+
**Request**
21+
22+
``` json
23+
mutation {
24+
createEmptyCart
25+
}
26+
```
27+
28+
**Response**
29+
30+
The response is the quote ID, which is sometimes called the cart ID.
31+
32+
```json
33+
{
34+
"data": {
35+
"createEmptyCart": "6XZA7q1ooLEI0jLz8DfFrfruEqgxGzlt"
36+
}
37+
}
38+
```

0 commit comments

Comments
 (0)