Hi, is it possibile, with REST API (<https://syste...
# general
a
Hi, is it possibile, with REST API (https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2023.1/index.html#/definitions/invoice) to get the invoices (using GET /invoices) by customer id? If yes, is there a way to download the pdf of a specific invoice or to get the link of it?
b
your first question is an application of Record Filtering and Query on the entity field
for the second, rest web services offer no way to print records
a
is there any other way to get invoice pdf, via web?
b
typically you want to use the email functionality built into netsuite to email the transactions
if you really want the invoice pdf, then you need to use SuiteScript and the N/render to generate the pdf
at which point you can save it in the file cabinet to retrieve later, or you could write it to the response of a suitelet or restlet
you can download the file using the get operation from the soap web services
suitelets suffer from being public urls that arent authenticated
restlets suffer the same problem as soap web services, you will be forced to write base 64 contents
a
I dont understand. So, can't i save it in a cabinet and retrieve via rest api?
b
rest api has no support for files
a
thank you all