Contracts

POST /contracts/bulk-edit

Request

  • Base URL
    https://api.kolek.com.br (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

contract_uuidsstring[] required

Array of contract UUIDs to edit

receivable_scope'open_to_be_due' | 'all_open' | 'specific_month' required

Scope for applying changes to receivables: open_to_be_due (open and not yet due), all_open (all open including overdue), specific_month (specific month)

specific_monthstring

Specific month to apply changes (YYYY-MM format). Required when receivable_scope is SPECIFIC_MONTH.

first_bill_datestring

First bill date (contract start date) in ISO format

issue_daynumber

Day of the month for issue date (1-31)

billing_daynumber

Day of the month for billing/due date (1-31)

total_bill_cyclesnumber nullable

Total number of bill cycles (contract duration). Use null for indeterminate/unlimited cycles.

discountnumber

Discount value (percentage or absolute based on discount_code)

discount_codenumber

Discount type: 0 = percentage, 1 = absolute value

late_feenumber

Late fee value (percentage or absolute based on late_fee_code)

late_fee_codenumber

Late fee type: 0 = percentage, 1 = absolute value

interestnumber

Interest value (percentage per month or absolute per day based on interest_code)

interest_codenumber

Interest type: 0 = percentage per month, 1 = absolute value per day

replace_line_itemsboolean

If true, replaces all line items. If false, appends to existing.

regenerate_bankslipsboolean

If true, cancels existing bankslips and regenerates them with updated values

edited_bystring required

User ID who is making the edit

Example request

{
  "contract_uuids": [
    "uuid-1",
    "uuid-2"
  ],
  "receivable_scope": "open_to_be_due",
  "specific_month": "2025-01",
  "first_bill_date": "2025-01-01",
  "issue_day": 5,
  "billing_day": 10,
  "total_bill_cycles": 12,
  "discount": 10,
  "late_fee": 2,
  "interest": 1
}

Response

Successfully edited multiple contracts and their receivables in bulk.

statusboolean required

Overall status of the bulk operation

messagestring required

Summary message

bulk_operation_idstring required

Unique identifier for this bulk operation

total_contractsnumber required

Total number of contracts processed

successful_contractsnumber required

Number of contracts successfully updated

failed_contractsnumber required

Number of contracts that failed to update

Changes

No recorded changes to this operation across all 1 revision of this API.