CommonPaper API Docs
Documentation

Overriding Template Defaults

To override template defaults when creating an agreement, custom values can be passed into the agreement body based on the type of agreement being sent out.

Passing test_agreement: true in the agreement body sets the test flag for that agreement. Test agreements do not count against your monthly limit.

Expiration

You can set when the agreement expires so the counterparty must sign by a deadline.

Expiration by number of days: set include_expiration_type: "days" and include_expiration_days to an integer (e.g. the number of days from when the agreement is sent).

Expiration by specific date: set include_expiration_type: "date" and include_expiration_date to a date string in YYYY-MM-DD format.

Example: Overriding CSA Orderform Terms

TerminalCode
curl -X POST "https://api.commonpaper.com/v1/agreements" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "template_id": "TEMPLATE_ID", "owner_email": "OWNER_EMAIL", "signer_email": "SIGNER_EMAIL", "agreement": { "recipient_name": "Recipient Name", "recipient_email": "RECIPIENT_EMAIL", "recipient_organization": "RECIPIENT_ORG", "message": "This is the agreement we spoke about.", "test_agreement": false, "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "Description of a flat fee", "type": "Fees::Flat", "cost": 10000 } } } } }'

This would add an extra fee on-top of any fees currently applied to the template.

JSONCode
{ "csa_order_form_attributes": { "fees_attributes": { "0": { "description": "Flat fee", "type": "Flat::Fee", "cost": 50 }, "1": { "description": "Fees discount", "type": "Fees::Discount", "cost": 100, "discount_type": "fixed_amount", "discount_duration_type": "forever" }, "2": { "description": "Fees attachment", "type": "Fees::Attachment", "attachment_id": "ID" } } } }

Fee types

  • Fees::Flat
  • Fees::Discount
  • Fees::Cost
  • Fees::Attachment
  • Fees::Graduated
  • Fees::Included
  • Fees::Metered
  • Fees::OneTime
  • Fees::Text

Agreement Specific Keys

Pass type-specific fields as nested objects under the corresponding key. Each key applies only to its matching agreement type.

Agreement typeKey(s)
CSAcsa_attributes, csa_order_form_attributes
DPAdpa_attributes
Design Partnerdesign_partner_attributes
PSApsa_attributes, psa_statement_of_work_attributes
Partnershippartnership_attributes, partnership_business_terms_attributes
BAAbaa_attributes
LOIloi_attributes
Pilotpilot_attributes
Software Licensesoftware_license_attributes, software_license_order_form_attributes

If the template type does not correspond to the overridden attribute type, the agreement creation will fail.

software_license_order_form_attributes supports the same fees_attributes structure as csa_order_form_attributes. See Overriding Fees Examples for fee type details.

To retrieve fields specific to an agreement type you can:

  • See Template Parameters for the full list of fields per agreement type
  • Export a CSV (requires paid plan)
  • Create an agreement and examine the response
  • Call the show endpoint of the API and look at agreement columns that exist on existing agreements
Last modified on