Skip to main content
POST
/
quotes
Create quote
curl --request POST \
  --url https://api.zenskar.com/quotes \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "currency": "<string>",
  "line_items": [
    {
      "line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "is_deleted": false,
      "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "pricing_data": {
        "pricing_data": {
          "unit_amount": 123,
          "dimensions": [
            {
              "name": "<string>",
              "column_name": "<string>"
            }
          ],
          "prices": [
            1
          ],
          "display_alias": [
            "<string>"
          ],
          "pricing_type": "<string>",
          "currency": "<string>",
          "label": "<string>",
          "unit": "<string>",
          "pricing_period": {
            "cadence": "<string>"
          }
        },
        "name": "<string>",
        "description": "<string>",
        "quantity": {
          "type": "metered",
          "label": "<string>",
          "quantity": 123,
          "unit": "<string>",
          "aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "quantity_entries": [
            {
              "value": 123,
              "effective_from": "2023-12-25",
              "created_at": "2023-11-07T05:31:56Z",
              "description": "<string>"
            }
          ],
          "trigger_event": "invoice_approval",
          "expires_at": "end_of_product_billing_period",
          "expiry_period": "<string>",
          "grant_frequency_same_as_product": true,
          "grant_frequency": "<string>",
          "feature_option_value": "<string>",
          "numeric_value": 123,
          "allow_mid_cycle_cancellation": false,
          "constraints": {
            "min": 1,
            "max": 1
          }
        },
        "grants": [
          {
            "unit_amount": 123,
            "entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "type": "Feature",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "label": "<string>",
            "trigger_event": "invoice_approval",
            "expires_at": "end_of_product_billing_period",
            "expiry_period": "<string>",
            "grant_frequency_same_as_product": true,
            "grant_period": "<string>",
            "unit": "<string>",
            "period": {
              "cadence": "<string>"
            },
            "start_date": "2023-11-07T05:31:56Z",
            "feature_option_value": "<string>",
            "numeric_value": 123
          }
        ],
        "consumptions": [
          {
            "entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "type": "Feature",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "label": "<string>",
            "unit": "<string>",
            "show_additional_info": false,
            "trigger_event": "invoice_approval"
          }
        ],
        "link_id": "<string>",
        "free_units": [
          {
            "unit_amount": 123,
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "label": "<string>",
            "unit": "<string>",
            "period": {
              "cadence": "<string>"
            }
          }
        ],
        "discounts": [
          {
            "type": "fixed",
            "unit_amount": 123,
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "pricing_period": {
              "cadence": "<string>"
            },
            "label": "<string>"
          }
        ],
        "commitments": [
          {
            "type": "minimum_spend",
            "unit_amount": 123,
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "currency": "<string>",
            "label": "<string>",
            "period": {
              "cadence": "<string>"
            },
            "charge_full_amount": false,
            "skip_zero_amount": false
          }
        ],
        "taxes": [
          {
            "type": "manual",
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "label": "<string>",
            "code": "<string>",
            "unit_amount": 123
          }
        ],
        "payment_terms": [
          {
            "payment_term_type": "on_approval",
            "due_days": 123,
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "label": "<string>",
            "payment_term_mode": "relative",
            "last_day_of_month": false
          }
        ],
        "service_fees": [
          {
            "type": "fixed",
            "unit_amount": 1,
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "identifier": "<string>",
            "priority": 123,
            "pricing_period": {
              "cadence": "<string>"
            },
            "label": "<string>"
          }
        ],
        "execution_logic": {
          "additional_steps": [
            {
              "node_type": "<string>",
              "inputs": {},
              "step_name": "<string>",
              "id": "<string>"
            }
          ]
        },
        "is_recurring": true,
        "billing_period": {
          "offset": "prepaid",
          "cadence": "<string>"
        },
        "add_to_catalog": true,
        "usage_report_configs": [
          {
            "aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "config": {},
            "is_default": false,
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        ],
        "overage_pricing": {
          "pricing_data": {
            "unit_amount": 123,
            "dimensions": [
              {
                "name": "<string>",
                "column_name": "<string>"
              }
            ],
            "prices": [
              1
            ],
            "display_alias": [
              "<string>"
            ],
            "pricing_type": "<string>",
            "currency": "<string>",
            "label": "<string>",
            "unit": "<string>",
            "pricing_period": {
              "cadence": "<string>"
            }
          },
          "name": "<string>",
          "description": "<string>",
          "quantity": {
            "type": "metered",
            "label": "<string>",
            "quantity": 123,
            "unit": "<string>",
            "aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "quantity_entries": [
              {
                "value": 123,
                "effective_from": "2023-12-25",
                "created_at": "2023-11-07T05:31:56Z",
                "description": "<string>"
              }
            ],
            "trigger_event": "invoice_approval",
            "expires_at": "end_of_product_billing_period",
            "expiry_period": "<string>",
            "grant_frequency_same_as_product": true,
            "grant_frequency": "<string>",
            "feature_option_value": "<string>",
            "numeric_value": 123,
            "allow_mid_cycle_cancellation": false,
            "constraints": {
              "min": 1,
              "max": 1
            }
          },
          "grants": [
            {
              "unit_amount": 123,
              "entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "type": "Feature",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "label": "<string>",
              "trigger_event": "invoice_approval",
              "expires_at": "end_of_product_billing_period",
              "expiry_period": "<string>",
              "grant_frequency_same_as_product": true,
              "grant_period": "<string>",
              "unit": "<string>",
              "period": {
                "cadence": "<string>"
              },
              "start_date": "2023-11-07T05:31:56Z",
              "feature_option_value": "<string>",
              "numeric_value": 123
            }
          ],
          "consumptions": [
            {
              "entitlement_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "type": "Feature",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "label": "<string>",
              "unit": "<string>",
              "show_additional_info": false,
              "trigger_event": "invoice_approval"
            }
          ],
          "link_id": "<string>",
          "free_units": [
            {
              "unit_amount": 123,
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "label": "<string>",
              "unit": "<string>",
              "period": {
                "cadence": "<string>"
              }
            }
          ],
          "discounts": [
            {
              "type": "fixed",
              "unit_amount": 123,
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "pricing_period": {
                "cadence": "<string>"
              },
              "label": "<string>"
            }
          ],
          "commitments": [
            {
              "type": "minimum_spend",
              "unit_amount": 123,
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "currency": "<string>",
              "label": "<string>",
              "period": {
                "cadence": "<string>"
              },
              "charge_full_amount": false,
              "skip_zero_amount": false
            }
          ],
          "taxes": [
            {
              "type": "manual",
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "label": "<string>",
              "code": "<string>",
              "unit_amount": 123
            }
          ],
          "payment_terms": [
            {
              "payment_term_type": "on_approval",
              "due_days": 123,
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "label": "<string>",
              "payment_term_mode": "relative",
              "last_day_of_month": false
            }
          ],
          "service_fees": [
            {
              "type": "fixed",
              "unit_amount": 1,
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "identifier": "<string>",
              "priority": 123,
              "pricing_period": {
                "cadence": "<string>"
              },
              "label": "<string>"
            }
          ],
          "execution_logic": {
            "additional_steps": [
              {
                "node_type": "<string>",
                "inputs": {},
                "step_name": "<string>",
                "id": "<string>"
              }
            ]
          },
          "is_recurring": true,
          "billing_period": {
            "offset": "prepaid",
            "cadence": "<string>"
          },
          "add_to_catalog": true,
          "usage_report_configs": [
            {
              "aggregate_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "config": {},
              "is_default": false,
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            }
          ],
          "products": [
            {
              "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "product_pricing_data": "<unknown>"
            }
          ]
        },
        "products": [
          {
            "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "product_pricing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "product_pricing_data": "<unknown>"
          }
        ]
      },
      "description": "<string>",
      "start_date": "2023-12-25",
      "end_date": "2023-12-25",
      "anchor_date": "2023-11-07T05:31:56Z",
      "quantity": [
        {
          "value": 123,
          "effective_from": "2023-12-25",
          "created_at": "2023-11-07T05:31:56Z",
          "description": "<string>"
        }
      ],
      "discounts": [
        {
          "type": "fixed",
          "unit_amount": 123,
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "identifier": "<string>",
          "priority": 123,
          "pricing_period": {
            "cadence": "<string>"
          },
          "label": "<string>"
        }
      ],
      "taxes": [
        {
          "type": "manual",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "identifier": "<string>",
          "priority": 123,
          "label": "<string>",
          "code": "<string>",
          "unit_amount": 123
        }
      ],
      "custom_data": {}
    }
  ],
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "business_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quote_mode": "approval-based",
  "description": "<string>",
  "quote_type": "new_business",
  "valid_from": "2023-12-25",
  "valid_until": "2023-12-25",
  "validity_config": {},
  "start_date": "2023-12-25",
  "end_date": "2023-12-25",
  "anchor_date": "2023-11-07T05:31:56Z",
  "provisioning_mode": "immediate",
  "contract_payment_config": {
    "auto_charge": true,
    "payment_terms": "IMMEDIATE"
  },
  "payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "custom_data": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quote_number": "<string>",
  "quote_mode": "approval-based",
  "organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "business_entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "current_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "current_version": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version_number": 123,
    "name": "<string>",
    "currency": "<string>",
    "status": "draft",
    "quote_type": "new_business",
    "valid_from": "2023-12-25",
    "start_date": "2023-12-25",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "valid_until": "2023-12-25",
    "validity_config": {},
    "end_date": "2023-12-25",
    "estimate": {},
    "provisioning_config": {},
    "contract_payment_config": {},
    "payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "discounts": [
      {}
    ],
    "taxes": [
      {}
    ],
    "line_items": [],
    "version_metadata": {},
    "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "custom_data": {},
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

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

Query Parameters

auto_approve
boolean
default:false

Body

application/json

Request schema for creating a new quote

Creates a quote with initial version (v1) in DRAFT status. The quote_mode determines the workflow:

  • approval-based: Full approval workflow
  • self-serve: Simplified direct acceptance workflow
name
string
required

Quote name/title

Required string length: 1 - 255
currency
string
required

Currency code (ISO 4217, e.g., USD, EUR)

Required string length: 3
line_items
CreateQuoteLineItemRequest · object[]
required

Quote line items (at least one required)

Minimum array length: 1
customer_id
string<uuid> | null

Customer this quote is for. Required for new quotes, optional for amendments (inherits from existing contract).

business_entity_id
string<uuid> | null

Business entity for this quote (inherits from customer if not provided)

contract_id
string<uuid> | null

Existing contract ID for amendments (required when quote_type is AMENDMENT)

quote_mode
enum<string>

Quote workflow mode: approval-based or self-serve (defaults to self-serve)

Available options:
approval-based,
self-serve
description
string | null

Detailed description of the quote

quote_type
enum<string>

Type of quote: new_business, renewal, amendment, upsell, downsell

Available options:
new_business,
amendment
valid_from
string<date> | null

When quote becomes valid (defaults to current date)

valid_until
string<date> | null

When quote expires (null = no expiry)

validity_config
Validity Config · object

Rules for calculating validity dates

start_date
string<date> | null

Contract start date (when service begins). Required for new_business/renewal/upsell/downsell quotes. Optional for amendment quotes (inherits from existing contract if not provided).

end_date
string<date> | null

Contract end date (null = open-ended)

anchor_date
string<date-time> | null

Reference date for billing cycle calculations. Determines when bills are generated in the billing period (e.g., if anchor_date is 15th, monthly bills generate on the 15th). Defaults to start_date if not provided.

provisioning_mode
enum<string>

Provisioning mode determining when/how contract is created (immediate, payment_method_validation, charge_on_acceptance, charge_when_due)

Available options:
immediate,
payment_method_validation,
charge_on_acceptance,
charge_when_due
contract_payment_config
ContractPaymentConfig · object

Payment configuration for resulting contract

payment_method_id
string<uuid> | null

Payment method ID for provisioning (required for payment_method_validation and charge_on_acceptance modes)

custom_data
Custom Data · object

Custom data that apply to all versions

Response

Successful Response

Response schema for quote (with current version)

id
string<uuid>
required

Quote ID

quote_number
string
required

Human-readable quote number

quote_mode
enum<string>
required

Quote workflow mode

Available options:
approval-based,
self-serve
organisation_id
string<uuid>
required

Organisation ID

customer_id
string<uuid>
required

Customer ID

business_entity_id
string<uuid>
required

Business entity ID

created_at
string<date-time>
required

Created at

updated_at
string<date-time>
required

Updated at

current_version_id
string<uuid> | null

Current version ID

current_version
QuoteVersionResponse · object

Current/active version details

custom_data
Custom Data · object

Custom data

created_by
string<uuid> | null

Creator user ID