-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Expand file tree
/
Copy pathStoreCreateCart.yaml
More file actions
52 lines (50 loc) · 1.68 KB
/
Copy pathStoreCreateCart.yaml
File metadata and controls
52 lines (50 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
type: object
description: The details of the cart to be created.
x-schemaName: StoreCreateCart
properties:
region_id:
type: string
title: region_id
description: >-
The ID of the cart's region. This affects the prices and currency of the
cart.
shipping_address:
$ref: ./StoreCartAddress.yaml
billing_address:
$ref: ./StoreCartAddress.yaml
email:
type: string
title: email
description: The email of the cart's customer.
format: email
currency_code:
type: string
title: currency_code
description: >-
The cart's currency code. If not provided, the region's currency is used.
This affects prices in the cart, as well.
example: usd
items:
type: array
description: The cart's items.
items:
$ref: ./StoreCartLineItem.yaml
sales_channel_id:
type: string
title: sales_channel_id
description: >
The ID of the sales channel that cart is created in. If not provided, the
store's default sales channel is associated with the cart instead.
A product's availability in a sales channel only filters the products you
retrieve. Medusa doesn't reject a variant added to the cart when its
product isn't available in the cart's sales channel. Refer to the guide in
the external documentation to learn how to enforce that validation.
externalDocs:
url: >-
https://docs.medusajs.com/resources/commerce-modules/cart/sales-channel-availability
metadata:
type: object
description: The cart's metadata, can hold custom key-value pairs.
externalDocs:
url: https://docs.medusajs.com/api/store#manage-metadata
description: Learn how to manage metadata