Skip to main content
POST
/
templates
/
plan
/
{plan_id}
/
preview
Preview plan estimate
curl --request POST \
  --url https://api.zenskar.com/templates/plan/{plan_id}/preview \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "start_date": "2023-12-25",
  "end_date": "2023-12-25",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
default:<your-api-key>
required
organisation
string
header
default:<your-organisation-id>
required

Path Parameters

plan_id
string<uuid>
required

Body

application/json

Request schema for previewing a plan estimate

Generates a financial estimate for a plan configuration by:

  1. Converting the plan to a contract structure
  2. Calling billables service to calculate costs

Attributes: start_date: Contract start date (required) end_date: Contract end date (optional - calculated from plan duration if not provided) customer_id: Customer UUID (optional - random if not provided) name: Contract name (optional - defaults to plan name) description: Contract description (optional)

start_date
string<date>
required

Contract start date

end_date
string<date> | null

Contract end date (optional - calculated from plan duration if not provided)

customer_id
string<uuid> | null

Customer UUID (optional - random if not provided)

name
string | null

Contract name (optional - defaults to plan name)

description
string | null

Contract description

Response

Estimate generated successfully