Cloud Intelligence™Cloud Intelligence™

Announcement

This page is also available in Deutsch, Español, Français, Italiano, 日本語, and Português.

New in Contract Templates: Apply a template to multiple customers via API

Create draft contracts for up to 100 customers in a single API call.

By Sam Clark

·

Shipped by

Pablo Roncero Fernández

In the Console, applying a contract template to your customers is one action: pick the template, pick the customers, get a draft contract for each. Over the API, it has been a loop. Read the template, copy its billing rules, price books and custom line items into a create-contract body, and repeat for every customer.

The Contract Templates API now does what the Console does. A single POST /billing/v1/contract-templates/{templateID}/contracts creates a draft contract for each customer in the batch. The template's billing rules, price books and custom line items are already in place.

  • Batch apply: Send up to 100 customers per request. Each customer gets its own result, so one ineligible customer doesn't block the rest.
  • Dry run: Add dryRun=true to validate the whole batch without creating anything. Use it first. Every real call creates new drafts, even for customers that already have one from the same template.
  • Single-customer create: Pass a templateId when creating a contract through the Contracts API to apply a template in one call. Template components are all-or-nothing, so a request that also carries its own billing rules, price books or custom line items is rejected.

Every contract is created as a draft. You review and activate them the same way you do today.

To get started, see the API reference for the endpoint and request examples, and the Contract templates guide for how templates work. Calling the API requires External API access and the Contract Templates Admin permission.

Available to distributors and resellers using PartnerOps Revenue Management.

PerfectScale™ for Kubernetes

Ready to optimize?

Get your free Kubernetes savings analysis