A contract line is a single priced item on a contract. It carries the rate rules and the services they apply to. This API defines lines, configures how they bill, and edits them one at a time or in bulk.
Three fields are required: contract_line_name, billing_frequency, and contract_line_type. The type drives everything else: Fixed bills a flat amount per period, Hourly bills logged time at hourly_rate (with minimum_billable_time, round_up_to_nearest, and overtime fields), and Usage bills metered consumption.
curl https://algapsa.com/api/v1/contract-lines \
-H "X-API-Key: $ALGA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contract_line_name": "Tier 2 remote support",
"contract_line_type": "Hourly",
"billing_frequency": "monthly",
"hourly_rate": 14500,
"minimum_billable_time": 15,
"round_up_to_nearest": 15
}'A line bills against the services on it. List them with GET /contract-lines/{id}/services, add one with POST /contract-lines/{id}/services, and adjust the per-service rate through PUT /contract-lines/{id}/services/{serviceId}. Fixed lines also carry their own settings at GET and PUT /contract-lines/{id}/fixed-config. Toggle a line on or off with PUT /contract-lines/{id}/activation and clone an existing one with POST /contract-lines/{id}/copy.
When you are rolling out a rate change, the /contract-lines/bulk routes create, update, and delete many lines in one call, and /contract-lines/bulk/add-services attaches a service across them. For reporting, read GET /contract-lines/{id}/usage-metrics and /analytics.
Every endpoint links through to its full parameters, request and response schemas, and code samples.
GET/api/v1/contract-linesAlgaPSAList contract linesPOST/api/v1/contract-linesAlgaPSACreate contract lineGET/api/v1/contract-lines/{id}AlgaPSAGet contract linePUT/api/v1/contract-lines/{id}AlgaPSAUpdate contract lineDELETE/api/v1/contract-lines/{id}AlgaPSADelete contract linePUT/api/v1/contract-lines/{id}/activationAlgaPSASet contract line activationGET/api/v1/contract-lines/{id}/analyticsAlgaPSAGet contract line analyticsPOST/api/v1/contract-lines/{id}/copyAlgaPSACopy contract lineGET/api/v1/contract-lines/{id}/fixed-configAlgaPSAGet fixed contract line configPUT/api/v1/contract-lines/{id}/fixed-configAlgaPSAUpsert fixed contract line configGET/api/v1/contract-lines/{id}/servicesAlgaPSAList contract line servicesPOST/api/v1/contract-lines/{id}/servicesAlgaPSAAdd service to contract lineGET/api/v1/contract-lines/{id}/services/{serviceId}AlgaPSAGet contract line service detailsPUT/api/v1/contract-lines/{id}/services/{serviceId}AlgaPSAUpdate contract line serviceDELETE/api/v1/contract-lines/{id}/services/{serviceId}AlgaPSARemove service from contract lineGET/api/v1/contract-lines/{id}/usage-metricsAlgaPSAGet contract line usage metricsPOST/api/v1/contract-lines/bulkAlgaPSABulk create contract linesPUT/api/v1/contract-lines/bulkAlgaPSABulk update contract linesDELETE/api/v1/contract-lines/bulkAlgaPSABulk delete contract linesPOST/api/v1/contract-lines/bulk/add-servicesAlgaPSABulk add services to contract linePOST/api/v1/contract-lines/bulk/createAlgaPSABulk create contract lines (explicit route)DELETE/api/v1/contract-lines/bulk/deleteAlgaPSABulk delete contract lines (explicit route)DELETE/api/v1/contract-lines/bulk/remove-servicesAlgaPSABulk remove services from contract linePUT/api/v1/contract-lines/bulk/updateAlgaPSABulk update contract lines (explicit route)