---
displayed_sidebar: homepage
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# StorePostCartReq

The details of the cart to be created.

## Properties

<ParameterTypes parameters={[
  {
    "name": "context",
    "type": "`object`",
    "description": "An object to provide context to the Cart. The `context` field is automatically populated with `ip` and `user\\_agent`",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "country_code",
    "type": "`string`",
    "description": "The two character ISO country code to create the Cart in. Setting this parameter will set the country code of the shipping address.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "items",
    "type": "[Item](medusa.Item.mdx)[]",
    "description": "An array of product variants to generate line items from.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "quantity",
        "type": "`number`",
        "description": "The quantity to add into the cart.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "variant_id",
        "type": "`string`",
        "description": "The ID of the Product Variant.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "region_id",
    "type": "`string`",
    "description": "The ID of the Region to create the Cart in. Setting the cart's region can affect the pricing of the items in the cart as well as the used currency. If this parameter is not provided, the first region in the store is used by default.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "sales_channel_id",
    "type": "`string`",
    "description": "The ID of the Sales channel to create the Cart in. The cart's sales channel affects which products can be added to the cart. If a product does not exist in the cart's sales channel, it cannot be added to the cart. If you add a publishable API key in the header of this request and specify a sales channel ID, the specified sales channel must be within the scope of the publishable API key's resources. If you add a publishable API key in the header of this request, you don't specify a sales channel ID, and the publishable API key is associated with one sales channel, that sales channel will be attached to the cart. If no sales channel is passed and no publishable API key header is passed or the publishable API key isn't associated with any sales channel, the cart will not be associated with any sales channel.",
    "optional": true,
    "defaultValue": "",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/development/entities/repositories#retrieving-a-list-of-records"/>
