Updates a draft contract

Replaces the draft contract identified by draft_contract_id with the supplied payload. The body shape
matches POST /draft-contracts — items and external_references on the existing record are fully replaced.
Returns 404 if the id is not a draft contract in the organization.

Exceptions that keep stored data when the field is omitted:

  • shipping_customer_id, billing_address_id, shipping_address_id: omit them to keep the draft's current
    ship-to customer and addresses, or send null to clear them.
  • email_selection: omit it to keep the draft's current recipients.

This is for backward compatibility: integrations built before these fields existed won't clear them on every
update. Kept values that no longer fit are dropped: the billing address and email selection when customer_id
changes, a ship-to customer that was the previous billing customer, and any address or email its customer no
longer holds.

A draft waiting for approval as a new contract can't be changed: the request answers 409. Once the approval request
is rejected or cancelled, the draft can be changed and sent again.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

UUID of the draft contract to be used in this operation.

Body Params
external_references
array of objects, unique

Cross-system identifiers for this draft contract. Each reference's type slug must already exist in
the org's external reference types (configurable in Rillet Settings).

Required for deduplication. Re-posting with any matching (type, id) pair replaces the prior draft
record. Draft contracts created without external_references are not deduplicated.

external_references
uuid
required
uuid
required

Must reference a customer that already exists in Rillet. Use POST /customers first if needed.

string
required
amount
object
required
date
required
date
date
string
enum
required

The "FULL" scope includes revenue recognition and invoicing handled in Rillet. With the "REVENUE_RECOGNITION_ONLY" scope, invoicing is handled outside Rillet.

Allowed:
items
array of objects
required
length ≥ 1

Contract line items. At least one item is required.

items*
string
length ≤ 50

Optional purchase order number, carried onto the contract created from this draft and from there onto every invoice it generates.

uuid | null

The customer to ship to. Omit, send null, or send customer_id to ship to the billing customer. On update, omit to keep the current ship-to customer, or send null to remove it and its shipping address; null with a shipping_address_id ships to the billing customer.

uuid | null

ID of one of the billing customer's billing_addresses. If omitted, the first address in the customer's billing_addresses is used, or none when the customer has no billing address. Send null for no billing address. On update, omit to keep the current billing address, or send null to remove it. Rejected when the address does not belong to the billing customer or is not a billing address.

uuid | null

ID of one of the ship-to customer's shipping_addresses. If omitted, the first address in the ship-to customer's shipping_addresses is used, or none when it has no shipping address. Send null for no shipping address. On update, omit to keep the current shipping address, or send null to remove it; a new shipping_customer_id sent without this field takes that customer's first shipping address. Rejected when the address does not belong to the ship-to customer or is not a shipping address.

email_selection
object

Who receives the invoices of the contract created from this draft. If omitted, none is specified and the reviewer starts from all of the billing customer's emails. On update, omit to keep the current selection, or send ALL_CUSTOMER_EMAILS to follow the customer's emails. A draft keeps one entry per email, the first one sent. With SELECTED_EMAILS and no MAIN_SENDER recipient left, including an empty recipients list, no selection is stored, the same as the review page. A stored recipient that is not one of the billing customer's emails is rejected.

Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json