v1

latestOpenAPI 3.1.02026-07-24111224223.3 KB
Draft Contracts

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.

put/draft-contracts/{draft_contract_id}

Request body

subsidiary_idstring uuid required
customer_idstring uuid required

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

namestring required
close_datestring date required
start_datestring date
end_datestring date
scope'FULL' | 'REVENUE_RECOGNITION_ONLY' required

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

Example request

{
  "external_references": [
    {
      "type": "xyzSystemId",
      "id": "234",
      "url": "https://xyzsystempage.com/ids/234"
    }
  ],
  "name": "Acme Corp - Annual subscription",
  "amount": {
    "amount": "1.01",
    "currency": "USD"
  },
  "items": [
    {
      "price": {
        "amount": {
          "amount": "1.01",
          "currency": "USD"
        },
        "interval_months": 1
      },
      "quantity": 1,
      "discount": {
        "amount_off": {
          "amount": "1.01",
          "currency": "USD"
        }
      }
    }
  ]
}

Response

OK

idstring uuid required
subsidiary_idstring uuid required
customer_idstring uuid required
namestring required
close_datestring date required
start_datestring date
end_datestring date
scope'FULL' | 'REVENUE_RECOGNITION_ONLY'

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

Example response

{
  "external_references": [
    {
      "type": "xyzSystemId",
      "id": "234",
      "url": "https://xyzsystempage.com/ids/234"
    }
  ],
  "amount": {
    "amount": "1.01",
    "currency": "USD"
  },
  "items": [
    {
      "price": {
        "amount": {
          "amount": "1.01",
          "currency": "USD"
        },
        "interval_months": 1
      },
      "discount": {
        "amount_off": {
          "amount": "1.01",
          "currency": "USD"
        }
      }
    }
  ]
}