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