Skip to main content

Process Amortization Schedule Due Periods

POST 

/api/amortization-schedules/:amortizationSchedule/process

Process every due period on an amortization schedule. A period is due when it is unprocessed and its end date is on or before as_of_date (defaults to today). Processing each period creates the cost allocations defined by the schedule's stored allocation configuration and updates the parent cost entry's allocation status.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

This endpoint runs synchronously - allocations are created before the response returns, and processed_count reports how many periods were processed (0 when nothing is due). A daily background task also processes due periods automatically for schedules that have a stored allocation configuration, so this endpoint is mainly for processing ahead of that run or applying a one-off target override.

Request fields (all optional):

  • as_of_date - Process periods due as of this date instead of today (date, e.g. 2026-07-07).
  • allocatable_type + allocatable_id - Override the stored allocation target for this run only. allocatable_type is one of product, brand, supplier, sales_channel; allocatable_id is required whenever allocatable_type is sent. When omitted, the schedule's stored configuration is used (used_stored_config: true in the response).
  • proration_strategy - Only used with an override target; one of revenue_based, cost_based, weight_based, volume_based, quantity_based, specific_line, manual (defaults to specific_line).

Returns 422 when an override target does not exist, or when no override is sent and the schedule has no stored allocation configuration.

Authentication: Requires Bearer token. Scope: purchase-orders (read/write).

Request

Responses

OK

Response Headers
    Content-Type