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.

Example: Overriding CSA Orderform Terms

curl -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_name": "RECIPIENT_ORG",
        "message": "This is the agreement we spoke about.",
        "test_agreement": false,
        "csa_order_form_attributes": {
            "include_fees": true,
            "fee_amount": 500,
            "fee_period": "month",
            "include_fees_other": true,
            "include_fees_other_val": "Other fees may apply"
        }
    }
}' 'https://api.commonpaper.com/v1/agreements'

This would override any template values for other fees.

To override fees on the fees table, one can instead pass custom values into the fee_attributes keys

        "csa_order_form_attributes": {
        "fees_attributes": [
            {
                "description": "Flat fee",
                "fee_type": "flat",
                "cost": 50
            }
          ]
        }

Fee types

  • cost
  • discount
  • flat
  • included
  • metered
  • one_time
  • text

Agreement Specific Keys

  • csa_attributes
  • csa_order_form_attributes
  • dpa_attributes
  • design_partner_attributes
  • psa_attributes
  • psa_statement_of_work_attributes
  • partnership_attributes
  • partnership_business_terms_attributes
  • baa_attributes
  • loi_attributes

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

To retrieve fields specific to an agreement type you can:

  • 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