# Daten aus der Tabelle cart über store-api abfragen

**URL:** <https://forum.shopware.com/t/daten-aus-der-tabelle-cart-ueber-store-api-abfragen/93831>\
**Category:** Programmierung\
**Created:** [6. April 2022 um 05:47 UTC](https://forum.shopware.com/t/daten-aus-der-tabelle-cart-ueber-store-api-abfragen/93831 "2022-04-06T05:47:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hornauer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/hornauer/32/16697_2.png) [@hornauer](https://forum.shopware.com/u/hornauer)\
**Post date:** [6. April 2022 um 05:47 UTC](https://forum.shopware.com/t/daten-aus-der-tabelle-cart-ueber-store-api-abfragen/93831/1 "2022-04-06T05:47:33Z")

</div>

Hallo,

ich versuche gerade über die store-api die Daten aus der Tabelle cart auszulesen.  
Leider funktioniert es bei mir nicht.

```auto
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "http://dockware.app.dev/store-api/checkout/cart",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Content-Type: application/json",
    "sw-access-key: *****"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

```

Das Ergebnis meines curl-aufrufes liefert leider ein JSON ohne die Daten in der Tabelle.

```auto
{
    "name": "sales-channel",
    "token": "nLsvsOjSR074kXjAARKQV7ZPHovkWk29",
    "price": {
        "netPrice": 0,
        "totalPrice": 0,
        "calculatedTaxes": [],
        "taxRules": [],
        "positionPrice": 0,
        "taxStatus": "gross",
        "rawTotal": 0,
        "apiAlias": "cart_price"
    },
    "lineItems": [],
    "errors": [],
    "deliveries": [],
    "transactions": [
        {
            "amount": {
                "unitPrice": 0,
                "quantity": 1,
                "totalPrice": 0,
                "calculatedTaxes": [],
                "taxRules": [],
                "referencePrice": null,
                "listPrice": null,
                "apiAlias": "calculated_price"
            },
            "paymentMethodId": "291b189e6aad413caa242420a3e07027",
            "apiAlias": "cart_transaction"
        }
    ],
    "modified": false,
    "customerComment": null,
    "affiliateCode": null,
    "campaignCode": null,
    "extensions": {
        "cart-promotions": {
            "addedCodes": [],
            "blockedPromotionIds": [],
            "apiAlias": "shopware_core_checkout_promotion_cart_extension_cart_extension"
        }
    },
    "apiAlias": "cart"
}

```

Ist es möglich, die Daten über die store-api zu bekommen oder gibt es eine andere Methode?  
Ich versuche das ganze in meiner lokalen Docker Installation.  
Die API-Abfrage läuft über meinen lokalen App Server.

Vielen Dank für Ihre Hilfe

schöne Grüße  
Ben

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [6. April 2022 um 17:42 UTC](https://forum.shopware.com/t/daten-aus-der-tabelle-cart-ueber-store-api-abfragen/93831/2 "2022-04-06T17:42:06Z")

</div>

Ohne mir die API jetzt angesehen zu haben… checkout/cart trägt ja ein Entity ab und nicht eine konkrete Tabelle.

Deine Anfrage sieht aber ziemlich „nackt“ aus. Wo ist denn das Payload?
