Skip to main content
POST
Generate a contract

Overview

Generate a contract document for an order. Contracts are automatically populated with order details, customer information, and your tenant’s terms and branding.

Request Fields

Example Request

What Gets Generated

The contract includes:
  • Customer Information: Name, company, contact details
  • Order Details: Items, quantities, pricing
  • Billing Terms: Payment schedule, amounts
  • Contract Terms: Duration, conditions
  • Your Branding: Logo, company info from tenant settings

Response

Example: Generate and Attach to Order

Contract Templates

Contracts use templates configured in your tenant settings:
  • Default Template: Standard contract layout
  • Custom Templates: Industry or use-case specific formats
Configure templates in Dashboard → Settings → Contract Templates.

Common Use Cases

  • Order Confirmation: Generate contract when order is confirmed
  • Customer Portal: Let customers download their contracts
  • Compliance: Maintain signed contract records
  • Automation: Auto-generate contracts on order creation

Example: Auto-Generate on Order Confirm

Error Handling

Authorizations

Authorization
string
header
required

API key obtained from FlexPortal dashboard

Headers

Tenant-ID
string
required

Your tenant identifier

Body

application/json
orderId
string
required
Minimum string length: 1
contractType
string

Response

Contract generated

success
enum<boolean>
required
Available options:
true
message
string
required
fileId
string
required
orderId
string
required
tenantId
string
required