Get pricing for a subscription
curl --request POST \
  --url https://api.salesbricks.com/api/v2/subscriptions/estimate \
  --header 'Content-Type: application/json' \
  --header 'X-SALESBRICKS-KEY: <api-key>' \
  --data '{
  "starts_at": "2023-12-25",
  "contract_length": 2,
  "billing_frequency": "MONTHLY",
  "plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "bricks": [
    {
      "brick_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 123,
      "discount": {
        "rate": "<string>",
        "renews": true
      }
    }
  ],
  "currency": "USD",
  "discount_coupons": [
    "<string>"
  ]
}'
{
  "error": {
    "code": "ERR_BAD_REQUEST",
    "message": "Bad request — the input payload is malformed, missing required fields, or contains invalid data."
  }
}

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Body

Estimate input serializer

Response

200
application/json

Subscription estimate serializer from OrderPricing