> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ordergroove.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ordergroove.com/_mcp/server.

# Retrieve

GET https://om.ordergroove.com/carts/{session_id}/

Returns all items in a user's cart, based on the user's session ID.

Reference: https://docs.ordergroove.com/reference/cart-management-api/carts/cart-retrieve

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: ordergroove-cart-management-api
  version: 1.0.0
paths:
  /carts/{session_id}/:
    get:
      operationId: cart-retrieve
      summary: Retrieve
      description: Returns all items in a user's cart, based on the user's session ID.
      tags:
        - carts
      parameters:
        - name: session_id
          in: path
          description: Unique Session ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Carts_cart-retrieve_Response_200'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart-retrieveRequestForbiddenError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart-retrieveRequestNotFoundError'
servers:
  - url: https://om.ordergroove.com
    description: https://om.ordergroove.com
components:
  schemas:
    CartsSessionIdGetResponsesContentApplicationJsonSchemaIncentives:
      type: object
      properties:
        initial:
          type: array
          items:
            type: string
        ongoing:
          type: array
          items:
            type: string
      title: CartsSessionIdGetResponsesContentApplicationJsonSchemaIncentives
    Carts_cart-retrieve_Response_200:
      type: object
      properties:
        id:
          type: string
        offer_id:
          type: string
        incentives:
          $ref: >-
            #/components/schemas/CartsSessionIdGetResponsesContentApplicationJsonSchemaIncentives
        attributes:
          description: Any type
        coupon_code:
          description: Any type
        quantity:
          type: integer
          default: 0
        every:
          type: integer
          default: 0
        every_period:
          type: integer
          default: 0
      title: Carts_cart-retrieve_Response_200
    Cart-retrieveRequestForbiddenError:
      type: object
      properties:
        detail:
          type: string
      title: Cart-retrieveRequestForbiddenError
    Cart-retrieveRequestNotFoundError:
      type: object
      properties:
        detail:
          type: string
      title: Cart-retrieveRequestNotFoundError

```

## Examples



**Response**

```json
{}
```

**SDK Code**

```python Result
import requests

url = "https://om.ordergroove.com/carts/session_id/"

response = requests.get(url)

print(response.json())
```

```javascript Result
const url = 'https://om.ordergroove.com/carts/session_id/';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Result
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://om.ordergroove.com/carts/session_id/"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Result
require 'uri'
require 'net/http'

url = URI("https://om.ordergroove.com/carts/session_id/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Result
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://om.ordergroove.com/carts/session_id/")
  .asString();
```

```php Result
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://om.ordergroove.com/carts/session_id/');

echo $response->getBody();
```

```csharp Result
using RestSharp;

var client = new RestClient("https://om.ordergroove.com/carts/session_id/");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Result
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://om.ordergroove.com/carts/session_id/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```