Create Contract
Create a new contract.
Evergreen vs standard:
- Standard contract: set is_evergreen=false and provide a fixed contract_end_date.
- Evergreen contract: set is_evergreen=true and leave contract_end_date as null. The system manages a rolling effective_end_date, exposes working_end_date for downstream usage, and returns evergreen_locked_date for immutable historical boundary rules.
Additional evergreen constraints:
- is_evergreen and auto_renew cannot both be true.
- billing_frequency is required for evergreen behavior.
- default_payment_term is not implemented yet for standard contracts. It can currently be set only for Evergreen contracts and is applied to their automatically generated invoices. Other contract invoice flows retain their existing payment-term selection behavior; support may be extended to additional contract types in the future.
- When default_payment_term is omitted or null, automatically generated Evergreen invoices retain the existing Net 30 fallback.
- skip_evergreen_invoice_generation is creation-time only and cannot be changed on existing contracts.
- skip_evergreen_invoice_generation=true skips only Campfire’s auto-generated evergreen invoices. Revenue transactions still generate.
Authorizations
Token-based authentication with required prefix "Token"
Body
Fixed end date for standard contracts. Leave null for evergreen contracts (is_evergreen=true).
Set true for evergreen contracts (no fixed end date). Evergreen contracts cannot also be auto-renew. Auto-renew is a legacy method to extend contracts.
When true, generated invoices are automatically sent on their invoice date.
For Evergreen contracts only. Set at contract creation; existing contracts cannot change this setting. False means current behavior. True skips only Campfire's auto-generated evergreen invoices; revenue transactions still generate; existing invoices are not cleaned up.
Evergreen contracts only. When true, evergreen-generated invoices inherit stripe_connection and use_stripe_auto_bill from the contract customer.
monthly- Monthlyquarterly- Quarterlybiannual- Bi Annualyannual- Annualone_time- One Timecustom- Custom
monthly, quarterly, biannual, annual, one_time, custom 250250250-1000000000000000000 < x < 1000000000000000000-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000500500ACTIVE- ActivePENDING- PendingCOMPLETED- CompletedDELETED- Deleted
ACTIVE, PENDING, COMPLETED, DELETED SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
SALESFORCE, HUBSPOT, STRIPE, MANUAL -2147483648 <= x <= 2147483647Controls evergreen subscription date boundaries. CONTRACT_PERIOD preserves contract billing-period alignment; EXACT_DATE uses the subscriptions' exact service dates.
CONTRACT_PERIOD- Contract billing periodEXACT_DATE- Exact service dates
CONTRACT_PERIOD, EXACT_DATE -9223372036854776000 <= x <= 9223372036854776000-9223372036854776000 <= x <= 9223372036854776000Minimum monthly commitment amount (allowance threshold)
-1000000000000000000 < x < 1000000000000000000Minimum monthly commitment quantity (allowance threshold in units)
-1000000000000000000 < x < 1000000000000000000120Contract-level default payment term for generated invoices. Currently applied only to automatically generated Evergreen invoices; other contract invoice flows retain their existing payment-term selection behavior. Support may be extended to additional contract types in the future.
Response
-10000000000000 < x < 10000000000000-10000000000000 < x < 10000000000000-10000000000000 < x < 10000000000000Rolling horizon end date for active evergreen contracts. It will be auto-generated by Campfire backend. Null for standard contracts.
Canonical end date used by the system. Equals contract_end_date for standard or terminated contracts, and effective_end_date for active evergreen contracts.
Inclusive lock date for evergreen contracts based on paid invoices and close books date. Dates on or before this value are immutable. Null for non-evergreen contracts, or when no financial locking events exist.
Fixed end date for standard contracts. Leave null for evergreen contracts (is_evergreen=true).
Set true for evergreen contracts (no fixed end date). Evergreen contracts cannot also be auto-renew. Auto-renew is a legacy method to extend contracts.
When true, generated invoices are automatically sent on their invoice date.
For Evergreen contracts only. Set at contract creation; existing contracts cannot change this setting. False means current behavior. True skips only Campfire's auto-generated evergreen invoices; revenue transactions still generate; existing invoices are not cleaned up.
Evergreen contracts only. When true, evergreen-generated invoices inherit stripe_connection and use_stripe_auto_bill from the contract customer.
monthly- Monthlyquarterly- Quarterlybiannual- Bi Annualyannual- Annualone_time- One Timecustom- Custom
monthly, quarterly, biannual, annual, one_time, custom 250250250-1000000000000000000 < x < 1000000000000000000-100000000000000 < x < 100000000000000-100000000000000 < x < 100000000000000500500ACTIVE- ActivePENDING- PendingCOMPLETED- CompletedDELETED- Deleted
ACTIVE, PENDING, COMPLETED, DELETED SALESFORCE- SalesforceHUBSPOT- HubspotSTRIPE- StripeMANUAL- Manual
SALESFORCE, HUBSPOT, STRIPE, MANUAL -2147483648 <= x <= 2147483647Controls evergreen subscription date boundaries. CONTRACT_PERIOD preserves contract billing-period alignment; EXACT_DATE uses the subscriptions' exact service dates.
CONTRACT_PERIOD- Contract billing periodEXACT_DATE- Exact service dates
CONTRACT_PERIOD, EXACT_DATE -9223372036854776000 <= x <= 9223372036854776000-9223372036854776000 <= x <= 9223372036854776000Minimum monthly commitment amount (allowance threshold)
-1000000000000000000 < x < 1000000000000000000Minimum monthly commitment quantity (allowance threshold in units)
-1000000000000000000 < x < 1000000000000000000120Contract-level default payment term for generated invoices. Currently applied only to automatically generated Evergreen invoices; other contract invoice flows retain their existing payment-term selection behavior. Support may be extended to additional contract types in the future.