Attaching a file to an Invoice via the API using C#
Hi,
I'm currently writing some code for a site that needs to integrate with Zoho. I've managed to write code that calls the API for creating an invoice, getting lists of products, customers etc and they all work fine.
I'm now writing a function to attach a file to an existing invoice and have found the following method:
Constructing the url is no problem and I have a byte[] with the contents of the file and I should be able to stream that into the request body (I'm using the .Net WebRequest object). My questions are:
- How would I set the filename for that so when the user receives the invoice the attached file is called what I want it to be called?
- Is there any C# sample code for doing this? Not just the file naming part but a sample that does it all: name the file, attach the file data and posting it.
TIA
PS I didn't want to choose Uncategorised for sub forum but there wasn't a Developer API sub forum listed like you've got under Zoho CRM. If there's a more suitable forum/sub forum please feel free to move this.
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.