{ "parameters": [ ], "response_fields": [ ], "requests": [ { "request_headers": { "Content-Type": "application/x-www-form-urlencoded", "Authorization": "Token token=\"cccAEFkTgYannTnyyrkvtRMj\"" }, "request_query_parameters": { }, "response_headers": { "X-Frame-Options": "SAMEORIGIN", "X-XSS-Protection": "1; mode=block", "X-Content-Type-Options": "nosniff", "X-Download-Options": "noopen", "X-Permitted-Cross-Domain-Policies": "none", "Referrer-Policy": "strict-origin-when-cross-origin", "Content-Type": "application/json; charset=utf-8", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "*", "Access-Control-Allow-Methods": "GET, POST, PATCH, PUT, DELETE, OPTIONS", "X-Requested-With": "", "Vary": "X-Requested-With, X-Workarea-Segments", "Last-Modified": "Wed, 27 Nov 2019 00:52:53 GMT", "Cache-Control": "no-cache, no-store, must-revalidate", "X-Request-Id": "887623ae-7764-4b51-9d16-c56f65fae43d", "X-Runtime": "0.010316", "X-Workarea-Segments": "", "Expires": "0", "Content-Length": "544" }, "request_method": "POST", "request_path": "/api/storefront/carts", "request_body": null, "request_content_type": "application/x-www-form-urlencoded", "response_status": 200, "response_status_text": "OK", "response_body": "{\n \"id\": \"3D7FFAB1AB\",\n \"url\": \"http://www.example.com/api/storefront/orders/3D7FFAB1AB\",\n \"user_id\": \"5dddc8e41241596aa5204d0d\",\n \"email\": null,\n \"placed_at\": null,\n \"canceled_at\": null,\n \"promo_codes\": [\n\n ],\n \"requires_shipping\": false,\n \"items\": [\n\n ],\n \"pricing\": {\n \"price_adjustments\": [\n\n ],\n \"shipping_total\": {\n \"cents\": 0.0,\n \"currency_iso\": \"USD\"\n },\n \"tax_total\": {\n \"cents\": 0.0,\n \"currency_iso\": \"USD\"\n },\n \"subtotal_price\": {\n \"cents\": 0.0,\n \"currency_iso\": \"USD\"\n },\n \"total_price\": {\n \"cents\": 0.0,\n \"currency_iso\": \"USD\"\n },\n \"paid_amount\": {\n \"cents\": 0.0,\n \"currency_iso\": \"USD\"\n }\n },\n \"shipping_service\": null,\n \"tenders\": [\n\n ]\n}", "response_content_type": "application/json", "curl": "curl \"https://www.example.com/api/storefront/carts\" -d '' -X POST \\\n\t-H \"Content-Type: application/x-www-form-urlencoded\" \\\n\t-H \"Authorization: Token token=\\\"cccAEFkTgYannTnyyrkvtRMj\\\"\"" } ], "resource": "Cart", "description": "Creating a new cart for a user", "route": "/api/storefront/carts", "explanation": "
Here's how to create a cart for a user. This endpoint allows the
\npossibility of multiple carts for a user.