Logic Flow
The general flow for calculating individual YTD wages works like this:- Call the
/payment
endpoint and pass astart_date
of the first day of the year (January 01) and anend_date
of the current date. - Loop over the array of returned payment objects and collect all of the payment
id
s. - Call the
/pay-statement
endpoint and pass all of thepayment_id
s as a batched request. - Loop over the array of returned pay statements and aggregate each individual’s gross pay amounts.
Sequence Diagram
