# Make your first Storefront API request Read products and create a cart using the Storefront API. This quickstart assumes your project already has a store and a published, priced variant. If it does not, start with [Create and publish a product](/guides/catalog/create-product). ## Before you begin Use the project-specific Storefront endpoint from [Connect to a project](/getting-started/connect). Include the Storefront token if your project requires it. You need a store ID, an appropriate price channel, currency, and country. Do not use an Admin credential for these requests. ## 1. Read the catalog Storefront API ```graphql query BrowseProducts($storeId: ID!, $priceChannelId: ID!, $currency: String!, $country: String!) { products(first: 12, storeId: $storeId, priceChannelId: $priceChannelId, priceCurrency: $currency, priceCountry: $country) { nodes { id name slug heroVariant { id sku price { value { centAmount currencyCode fractionDigits } discountedPrice { value { centAmount currencyCode fractionDigits } } } availability { availableForPurchase } } } pageInfo { hasNextPage endCursor } } } ``` Variables ```json { "storeId": "", "priceChannelId": "", "currency": "EUR", "country": "DK" } ``` Use a returned variant with a usable price and `availableForPurchase: true`. Use `discountedPrice.value` when present, otherwise the original `value`, for the current catalog price. If the list is empty or a price is missing, follow [Catalog visibility](/concepts/catalog/publication). Do not fix an empty catalog by substituting an unrelated store or currency. ## 2. Create a cart Storefront API ```graphql mutation StartCart($input: CartCreateInput!) { cartCreate(input: $input) { cart { id checkoutUrl state lineItemsQuantity total { centAmount currencyCode fractionDigits } } errors { __typename ... on UserError { message } } } } ``` Variables ```json { "input": { "storeId": "", "priceChannelId": "", "currency": "EUR", "countryCode": "DK", "lineItems": [ { "variantId": "", "quantity": 1 } ] } } ``` Keep the returned cart ID in the shopper's session after checking the business errors. Use `cart.total` for the amount, not a calculation from the product card. Creating a cart does not place an order or reserve a guaranteed unit of stock. ## Verify and continue Confirm `lineItemsQuantity` is one and the currency matches the catalog request. Open `checkoutUrl` when using hosted checkout, or continue with [Build a cart and checkout](/guides/storefront/cart-and-checkout). For a complete reference application, follow [Build with the Next.js storefront](/guides/storefront/nextjs).