Schedule a report
create_scheduled_reportSets up a report to be emailed to a contact regularly, or once. The report comes from list_scheduled_report_types, the recipient and anyone copied from list_contacts (each needs an email address). Confirm the report, recipient and timing with the person before setting it up: it emails someone outside taxapp. Only an owner of the organisation can see and set up scheduled reports. Only for an organisation where this connection may add and change records (list_organisations says which). The answer is the saved schedule with the date it first goes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A name for the schedule, such as "Monthly statement to Jo". | |
| enabled | No | false to save it switched off. | |
| frequency | Yes | How often it goes: Daily, Weekly (give day_of_week), Monthly or Quarterly (give day_of_month), or OneOff (give one_off_date, period_start and period_end). | |
| send_time | No | The New Zealand time of day it goes, 24-hour HH:mm. 07:00 when left out. | |
| period_end | No | OneOff only: the last New Zealand date the report covers, yyyy-MM-dd. | |
| report_key | Yes | The report's key, from list_scheduled_report_types. | |
| tenancy_id | No | For a report about a tenancy: its id, from list_properties. | |
| day_of_week | No | Weekly only: the day it goes. | |
| property_id | No | For a report about a property: its id, from list_properties. The only property when left out. | |
| day_of_month | No | Monthly and quarterly only: the day of the month it goes, 1 to 28. | |
| one_off_date | No | OneOff only: the New Zealand date it goes, yyyy-MM-dd. | |
| period_start | No | OneOff only: the first New Zealand date the report covers, yyyy-MM-dd. | |
| cc_contact_ids | No | Contacts copied on every email, from list_contacts; each needs an email address. | |
| organisation_id | No | The id of the organisation to use, from list_organisations. Leave it out when the connection covers only one organisation; it is required when it covers more than one. | |
| recipient_contact_id | Yes | The contact it is emailed to, from list_contacts. | |
| contractor_contact_id | No | For a report about a contractor: their contact id, from list_contacts. The only contractor when left out. |