Can't set recurring invoice to not be emailed

Hi
I’m trying to script setting up recurring invoices. I would like the invoices created not to be sent out by email, but they always seem to be created configured to be emailed. I’ve tried setting Scheduling→RecurringInvoiceData→SendByEmail to false and to 0 (both result in the invoice being set up to be sent by email), and to null (results in a error from the API). What do I need to do to ensure the invoice isn’t sent by email?

Example that doesn’t uncheck the send by email check box

{"payload":{"Header":{"MessageType":"Request","SubmissionNumber":"a5e0d481337d385d3e1f65db4508","Authentication":{"AccNumber":"lalala","ApplicationID":"lalalalala","MD5Value":"lalalalala"}},"Body":{"InvoiceData":{"InvoiceType":"RECURRING","ClientID":7921435,"Currency":"GBP","TermDays":21,"Language":"en","InvoiceLines":{"ItemLines":{"ItemLine":{"ItemID":0,"ItemName":"Membership 1 month","ItemDescription":"Standard branch membership fees, 1 Month ||MONTHSTART+1M|| to ||MONTHEND+1M||","ItemNominalCode":4001,"UnitCost":11,"Qty":1}}},"Scheduling":{"RecurringInvoiceData":{"Interval":"1MONTH","Frequency":12,"StartDate":"2024-03-10","GoCardlessAutoBill":true,"GoCardlessRequestAfter":0,"SendByEmail":false,"SendByPost":false,"ActivateOnCreation":false}}}}}}

My guess would be to try using "false" (as a string) instead of false (as a native boolean) - my understanding is that the JSON version of the QuickFile API is essentially a translation layer on top of the XML version, where the JSON is mapped to equivalent XML and handed to the XML parser. Using a string "false" should convert reliably to <SendByEmail>false</SendByEmail> by the time it reaches the XML parser.

Or just use the XML API directly yourself.

Just tried with ‘false’ as a string. No luck.

Which doesn’t surprise me, because false as a native boolean works fine for ActivateOnCreation. Mind you, that does default to false.

Hello @tipichris

We managed to replicate this on a test account.

I have logged this with the development team to investigate.

Hi @QFSteve
Thanks for checking it out. Does that mean it’s a bug, and nothing I can do my end to get it right? If so, any timescale for resolution? I need to set up about 60 ‘silent’ recurring invoices in the next week, and I’d rather not have to go into each manually to uncheck the ‘Send by email’ box :slight_smile: