Skip to main content
POST
/
pricemodels
/
{pricemodelId}
/
preview
curl --request POST \
     --url https://api.tryaqueduct.com/v1/pricemodels/pricemodelId/preview \
     --header 'Accept: application/json' \
     --header 'Authorization: null' \
     --header 'Content-Type: application/json'
[
  {
    "description": "<string>",
    "currency": "USD",
    "isDiscount": true,
    "amount": 123,
    "namedPriceFunctionId": "<string>"
  }
]
curl --request POST \
     --url https://api.tryaqueduct.com/v1/pricemodels/pricemodelId/preview \
     --header 'Accept: application/json' \
     --header 'Authorization: null' \
     --header 'Content-Type: application/json'

Authorizations

Authorization
string
header
required

Path Parameters

pricemodelId
string
required

The id of the PriceModel to preview

Body

application/json
variables
object

An object containing the inputs the PriceModel expects.

billingPeriod
object

An object representing the billing period. This is required if the PriceModel includes a metered NamedPriceFunction.

accountOwnerId
string

The id of the accountOwner to use when retrieving meter data

Response

200 - application/json

Returns the generated line items

description
string

Description of what the one of line item is. This will be displayed to your customers in the invoice.

currency
string

Three-letter ISO currency code. Must be a supported currency.

Example:

"USD"

isDiscount
boolean

Whether this line item should be deducted from the total as a discount

amount
number

The amount to charge for this line item

namedPriceFunctionId
string

The id of the NamedPriceFunction that generated this line item