Contracts API Reference

Access and track agreements, terms, pricing, and signature status for contracts inside your Hermon workspace.

Date & Timezone Handling: All timestamps in responses are UTC, formatted as ISO 8601 (2026-01-15T10:30:00.000Z). Date-range filters accept either date-only YYYY-MM-DD (which expands to UTC day boundaries) or full ISO 8601 timestamps.
Amounts: All monetary values are in major currency units (e.g. 2997.00 for $2,997). The currency field is returned as an ISO 4217 code (e.g. USD, EUR).

List Contracts

Retrieve a paginated list of contracts. Results can be filtered by status, lead, and assigned setter, triager, or closer.

GET/api/external/contracts

Query Parameters

ParameterTypeRequiredDescription
pageintegerOptionalPage number for pagination. Default: 1
limitintegerOptionalNumber of items per page. Default: 10, Max: 100
statusstringOptionalFilter by contract status. See Contract Status Values.
lead_idstring (UUID)OptionalUUID of the lead to filter contracts by.
setterstringOptionalEmail address of the setter to filter by.
triagerstringOptionalEmail address of the triager to filter by.
closerstringOptionalEmail address of the closer to filter by.
created_fromstringOptionalLower bound for created_at. Accepts YYYY-MM-DD or ISO 8601.
created_tostringOptionalUpper bound for created_at. Accepts YYYY-MM-DD or ISO 8601.
updated_fromstringOptionalLower bound for updated_at.
updated_tostringOptionalUpper bound for updated_at.

Code Examples

curl -X GET "https://api.hermon.io/api/external/contracts?page=1&limit=10&status=VOIDED&setter=sales-setter@mailinator.com&closer=hermon@mailinator.com&triager=triager@mailinator.com&lead_id=e799c30f-9da7-4fd7-9552-83b96a9bfac2" \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_live_your_key_here"

Response Example

json
{
  "success": true,
  "message": "Contracts fetched successfully",
  "data": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "lead": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@example.com"
      },
      "program": {
        "name": "12-Week Coaching Program"
      },
      "total_amount": 2997.0,
      "collected_amount": 997.0,
      "to_be_collected": 2000.0,
      "next_due_date": "2026-04-15T00:00:00.000Z",
      "closer": {
        "first_name": "Jane",
        "last_name": "Smith",
        "profile_image_url": "https://img.clerk.com/eyJ0eXBlIjoicHJveHkiLCJzcmMiOiJodHRwczovL2ltYWdlcy5jbGVyay5kZXYvb2F1dGhfZ29vZ2xlL2ltZ18zOWJ3NkxJaTFFSTdlM3Z4RHFhTFViUTZVeFMifQ",
        "id": "user_456def",
        "role": "org:admin"
      },
      "setter": null,
      "triager": null,
      "currency": "USD",
      "contract_status": "SIGNED",
      "contract_type": "PP",
      "subscription_status": null,
      "signed_at": "2026-02-10T14:30:00.000Z",
      "created_at": "2026-02-08T10:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "totalPages": 1,
    "hasNext": false,
    "hasPrev": false
  }
}

Get Contract Details

Fetch detailed information for a single contract by its unique UUID.
Note that the response shape varies slightly depending on the contract type (One-Time vs. Subscription vs. Commission).

GET/api/external/contracts/:id

Path Parameters

:idRequired. The unique contract UUID.

Contract Object Fields

FieldTypeDescription
idstring (UUID)Unique identifier for the contract.
leadobjectLead linked to this contract (id, first_name, last_name, email). See Contract Lead Object.
programobjectProgram metadata (name, price, type, etc.). See Contract Program Object.
total_amountnumberTotal contract value in major currency units. For subscriptions this is the per-cycle amount [List API Only].
collected_amountnumberAmount collected to date.
to_be_collectednumber | nullRemaining balance. null for subscriptions, commissions, or when fully collected [List API Only].
next_due_datestring (ISO 8601) | nullNext payment due date. null when no future payments exist [List API Only].
closerobject | nullCloser who sold the contract (first_name, last_name, profile_image_url, id, role). See User Details Object.
setterobject | nullSetter who generated the lead (first_name, last_name, profile_image_url, id, role). See User Details Object.
triagerobject | nullTriager assigned to the contract (first_name, last_name, profile_image_url, id, role). See User Details Object.
currencystringISO 4217 currency code (e.g. USD, EUR).
contract_statusstring (enum)Current status (DRAFT, SENT, VIEWED, WITHDRAWN, SIGNED, VOIDED) [List API Only].
contract_typestring (enum)Payment structure (PIF, PP, SUBSCRIPTION, COMMISSION) [List API Only].
subscription_statusstring (enum) | nullSubscription billing status (PENDING, ACTIVE, PAUSED, PAST_DUE, etc.) [List API Only].
signed_atstring (ISO 8601) | nullUTC timestamp when signed. null if not yet signed.
created_with_templatebooleanWhether the contract was created from a template [Details API Only].
first_sourceobject | nullLead's first attribution source [Details API Only].
last_sourceobject | nullLead's last attribution source [Details API Only].
statusstring (enum)Contract status [Details API Only].
voided_atstring (ISO 8601) | nullWhen voided [Details API Only].
voided_reasonstring | nullReason for voiding [Details API Only].
voided_by_detailsobject | nullUser details of who voided the contract [Details API Only].
typestring (enum)Contract type [Details API Only].
payment_mandateobject | nullMandate status/provider (null if no mandate) [Details API Only].
custom_fieldsarrayCustom field values.
sign_page_urlstring | nullURL to the e-signature page [Details API Only].
esign_preview_pdf_urlstring | nullURL to the contract PDF preview [Details API Only].
engagementobject | nullLinked delivery engagement. See Engagement Object [Details API Only].
total_valuenumber | nullTotal contract value in major currency units [Details API Only - One-Time/Commission].
remaining_amountnumber | nullAmount not yet allocated to payments [Details API Only - One-Time/Commission].
amount_per_cyclenumber | nullPer-cycle billing amount [Details API Only - Subscription].
subscriptionobject | nullFull subscription details. See Subscription Object [Details API Only - Subscription].
setup_feeobject | nullSetup fee block if applicable (null if none). See Setup Fee Object [Details API Only - Subscription].
commission_ratenumber | nullCommission percentage (0–100) [Details API Only - Commission].
billing_periodstring | nullBilling interval [Details API Only - Commission].
paymentsarrayCycle payment history or ordered array of instalments [Details API Only].
created_atstring (ISO 8601)UTC timestamp when created.
updated_atstring (ISO 8601)UTC timestamp when last updated [Details API Only].

Code Examples

curl -X GET "https://api.hermon.io/api/external/contracts/d5e0fb5d-5b14-45cf-81d8-2a0eb7a49224" \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_live_your_key_here"

Response Example (One-Time Contract)

json
{
  "success": true,
  "message": "Contract fetched successfully",
  "data": {
    "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
    "created_with_template": true,
    "currency": "USD",
    "lead": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "phone_country": "US",
      "phone_e164": "+14155551234",
      "sales_status": {
        "id": "status_xyz789",
        "name": "Closed Won",
        "text_color": "#14532D",
        "bg_color": "#DCFCE7"
      }
    },
    "first_source": { "id": "src_abc", "name": "Facebook Ad" },
    "last_source": { "id": "src_def", "name": "Referral" },
    "status": "SIGNED",
    "signed_at": "2026-02-10T14:30:00.000Z",
    "voided_at": null,
    "voided_reason": null,
    "voided_by_details": null,
    "type": "PP",
    "closer": {
      "first_name": "Jane",
      "last_name": "Smith",
      "profile_image_url": null,
      "id": "user_456def",
      "role": "org:admin"
    },
    "setter": null,
    "triager": null,
    "program": {
      "id": "prog_abc123",
      "name": "12-Week Coaching Program",
      "notes": null,
      "template_name": "Standard Contract",
      "price": 2997.0,
      "type": "ONE_TIME",
      "co_signer": null
    },
    "payment_mandate": null,
    "custom_fields": [],
    "sign_page_url": "https://sign.hermon.io/c/abc123",
    "esign_preview_pdf_url": "https://sign.hermon.io/preview/abc123.pdf",
    "engagement": {
      "id": "eng_xyz789",
      "name": "John Doe — 12-Week Coaching",
      "status": {
        "id": "engstatus_001",
        "name": "Active",
        "text_color": "#14532D",
        "bg_color": "#DCFCE7"
      }
    },
    "created_at": "2026-02-08T10:00:00.000Z",
    "updated_at": "2026-02-10T14:30:00.000Z",
    "total_value": 2997.0,
    "collected_amount": 997.0,
    "remaining_amount": 2000.0,
    "payments": [
      {
        "id": "pay_001",
        "type": "DEPOSIT",
        "amount": 997.0,
        "date": "2026-02-10T00:00:00.000Z",
        "status": "PAID",
        "payment_provider": "STRIPE",
        "is_mandate_payment": false,
        "active_payment_link": null
      },
      {
        "id": "pay_002",
        "type": "INSTALMENT",
        "amount": 2000.0,
        "date": "2026-04-15T00:00:00.000Z",
        "status": "PENDING",
        "payment_provider": "STRIPE",
        "is_mandate_payment": true,
        "active_payment_link": {
          "id": "link_abc",
          "url": "https://pay.stripe.com/xyz"
        }
      }
    ]
  }
}

Values Reference

Contract Status Values

ValueDescription
DRAFTCreated but not yet sent to the client
SENTSent to the client for signing
VIEWEDClient has opened the contract
WITHDRAWNContract pulled back before signing
SIGNEDClient has signed
VOIDEDContract voided/cancelled

Contract Type Values

ValueDescription
PIFPay in full (single payment)
PPPayment plan (multiple instalments)
SUBSCRIPTIONRecurring subscription billing
COMMISSIONCommission-based

Subscription Status Values

ValueDescription
PENDINGSubscription not yet started
ACTIVEBilling active
PAUSEDBilling temporarily paused
PAST_DUEPayment overdue
CANCELLATION_SCHEDULEDCancellation pending at period end
CANCELLEDSubscription cancelled

Billing Interval Values

ValueDescription
WEEKLYEvery week
MONTHLYEvery month
QUARTERLYEvery three months
YEARLYEvery year

Payment Provider Values

ValueDescription
STRIPEStripe
WHOPWhop
MOLLIEMollie
MANUALManual / offline payment

Nested Objects Reference

Contract Lead Object (List API)

FieldTypeDescription
idstringLead ID
first_namestringFirst name
last_namestringLast name
emailstringEmail address

Contract Detail Lead Object

FieldTypeDescription
idstringLead ID
first_namestringFirst name
last_namestringLast name
emailstringEmail address
phone_countrystringISO country code
phone_e164stringPhone in E.164 format
sales_statusobjectCurrent lead status with id, name, text_color, bg_color

User Details Object

FieldTypeDescription
first_namestringFirst name
last_namestringLast name
profile_image_urlstringProfile image URL (null if none)
idstringClerk user ID
rolestringOrganization role

Contract Program Object

FieldTypeDescription
idstringProgram ID
namestringProgram name
notesstringProgram notes
template_namestringContract template name
pricenumberProgram price in major currency units
typestringPayment type enum
co_signerobjectCo-signer user details (null if none)

Engagement Object

FieldTypeDescription
idstringDelivery engagement ID
namestringEngagement name
statusobjectStatus with id, name, text_color, bg_color

Payment Instalment Object

FieldTypeDescription
idstringPayment ID
typestring (enum)Payment type (DEPOSIT, FIRST_PAYMENT, INSTALMENT)
amountnumberAmount in major currency units
datestring (ISO 8601)Due date
statusstring (enum)Payment status
payment_providerstring (enum)Payment provider
is_mandate_paymentbooleanWhether charged via mandate (automatic)
active_payment_linkobjectActive payment link (null if none)

Subscription Object

FieldTypeDescription
idstringSubscription ID
statusstring (enum)Billing status. See Subscription Status Values.
billing_intervalstring (enum)Billing frequency. See Billing Interval Values.
payment_providerstring (enum)Provider handling billing
external_subscription_idstringProvider's subscription ID
billing_cycles_paidintegerNumber of cycles successfully charged
current_period_startstring (ISO 8601)Start of current billing period
current_period_endstring (ISO 8601)End of current billing period
next_billing_datestring (ISO 8601)Next charge date
started_atstring (ISO 8601)When billing began
cancel_at_period_endbooleanWhether cancellation is scheduled at period end
cancelled_atstring (ISO 8601)When the subscription was cancelled
cancellation_reasonstringCancellation reason
checkout_linksarrayAvailable checkout links
pauseobjectActive pause details (null if not paused)

Setup Fee Object

FieldTypeDescription
totalnumberTotal setup fee amount
is_editablebooleanWhether any instalment can be edited
lock_reasonstringWhy editing is blocked ("PAID" or "CHARGE_IN_FLIGHT")
installmentsarrayIndividual setup fee instalments

Error Responses

401Missing or invalid API key
json
{
  "status": "error",
  "message": "Invalid or revoked API key"
}
404Resource not found
json
{
  "status": "error",
  "message": "Resource not found"
}
429Rate limit exceeded
json
{
  "status": "error",
  "message": "Too many requests"
}