API REFERENCE

Contract Line Templates API

A template is a saved blueprint for a contract line. Define the billing type, frequency, and default services once, then create lines from it instead of filling the same fields in for every client. Two endpoints: make a template, and stamp a line from one.

Save a blueprint

Creating a template needs template_name, contract_line_type (Fixed, Hourly, or Usage), and billing_frequency. Bundle a default_services array so generated lines arrive pre-populated, and set is_public to share it across your team.

curl
curl https://algapsa.com/api/v1/contract-line-templates \
  -H "X-API-Key: $ALGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_name": "Standard managed workstation",
    "contract_line_type": "Fixed",
    "billing_frequency": "monthly",
    "is_public": true
  }'

Stamp out a line

Call POST /contract-line-templates/{id}/create-contract-line to materialize a real contract line from the template. From there it is an ordinary line: edit services, rates, and activation through the Contract Lines API, then attach it to a contract.

Endpoints

Every endpoint links through to its full parameters, request and response schemas, and code samples.

POST/api/v1/contract-line-templatesAlgaPSACreate contract line templatePOST/api/v1/contract-line-templates/{id}/create-contract-lineAlgaPSACreate contract line from template