SmakeSmake API Docs
EndpointsPrices

Preview Cart Prices

POST
/prices/cart

Calculates a price preview for a set of variants and quantities as if they were being ordered together, without creating an order. Quantities of matching customizations across items are combined so that quantity-based price scaling is applied the same way it would be at checkout.

AuthorizationBearer
AuthorizationBearer <token>

In: header

Header Parameters

X-Api-Version?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

Request example
curl -X POST "https://example.com/prices/cart" \  -H "X-Api-Version: 2022-02-01" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "variant": {          "id": 123        },        "quantity": 2      }    ]  }'
{  "items": [    {      "type": "variant",      "variant": {        "id": 1      },      "quantity": 2,      "prices": [        {          "model_id": 10,          "model_type": "view-customization",          "single_unit_price": 9.99,          "price": 9.99,          "pricing": {            "calculation_type": "square_centimeter",            "calculate_from": 13,            "scaled_prices": [              {                "from_a_number_of": 1,                "calculate_from": 13,                "price": 9.99              }            ]          }        }      ]    },    {      "type": "preparation",      "logo": {        "id": 7      },      "prices": [        {          "model_id": 7,          "model_type": "logo",          "single_unit_price": 9.5,          "price": 9.5,          "pricing": {            "calculation_type": "square_centimeter",            "calculate_from": 13,            "scaled_prices": [              {                "from_a_number_of": 1,                "calculate_from": 13,                "price": 9.5              }            ]          }        }      ]    }  ]}