SmakeSmake API Docs
EndpointsPrices

Preview Price

POST
/prices

Calculates a price preview for one or more variants and quantities without creating an order, returning the price of each customization on the variant.

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" \  -H "X-Api-Version: 2022-02-01" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "variant": {          "id": 123        },        "quantity": 2      }    ]  }'
{  "items": [    {      "variant": {        "id": 1      },      "quantity": 2,      "prices": [        {          "model_id": 1,          "model_type": "variant",          "single_unit_cost_price": 8.4,          "single_unit_price": 9.99,          "cost_price": 16.8,          "price": 19.98,          "pricing": {            "id": 1,            "name": "Default"          }        }      ]    }  ]}