Metadata on Bills

V4 now supports custom metadata on bills for organizations with metadata enabled.
Define fields for bills in Rillet and use their metadata.* keys in API requests.

  • POST /bills and PUT /bills/{bill_id} accept a metadata map. Supplied keys are patched;
    omitted keys are preserved, and an omitted or empty map leaves existing metadata unchanged.
  • Bill create, retrieve, list, and update responses include metadata.
  • GET /bills/{bill_id}/metadata retrieves the bill's metadata values.
  • PUT /bills/{bill_id}/metadata replaces values, clearing omitted active keys.
  • PATCH /bills/{bill_id}/metadata changes only the supplied keys.
  • POST /bills/metadata/bulk patches up to 1,000 bills in one atomic request.

Send a key with a null, empty, or whitespace-only value to clear it. Unknown keys and keys not
assigned to bills are rejected. Existing values for archived definitions remain readable;
archived keys may be cleared but not changed. Invalid metadata rolls back the entire write.

Metadata supplied with a bill edit that requires approval is applied only after final approval.
Dedicated metadata writes return 400 while a bill has a pending approval request. For bulk
updates, a pending approval on any bill rejects the entire request without changing any values.
Reads and writes use the existing bill view/edit permissions and subsidiary access restrictions.

Applies to V4 only.