Team Paul Posted February 20 Share Posted February 20 Hello Team, I am using 'https://api.accounting.sage.com/v3.1/sales_invoices' this endpoint to get all sales invoices list, But API is not getting all details. It is only returning collection in this format {"id": "XXXXXXXX", displayed_as": "SI-",$path": "/sales_invoices/586117de375711e8b45c025132dab352"}. We need the same response as given in below URL: https://developer.sage.com/accounting/reference/invoicing-sales/#tag/Sales-Invoices/operation/getSalesInvoices How can we get full data as suggested in the API guideline? Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 20 Share Posted February 20 https://api.accounting.sage.com/v3.1/sales_invoices is the index request which tells you the number of records available and provides you with the id's of the sales_invoices should you require the detail of the transaction. The path that is returned by the index https://api.accounting.sage.com/v3.1/sales_invoices/586117de375711e8b45c025132dab352 will return the sales invoice details for the requested id. What data do you require from the sales_invoice. If you can provide us with the scope of the integration and the requirements we will be able to suggest the most efficient ways of obtaining the data. Thanks Mark Link to comment Share on other sites More sharing options...
Team Paul Posted February 24 Author Share Posted February 24 (edited) Hello Mark, Thanks for your reply. I have to integrate sage accounting into my application with the below features: 1. Get a List of all sales invoices like the Sage portal. 2. We can create a new sales invoice and send it to a customer using the sage API. 3. We can see details of each invoice Currently, I am using sage accounting endpoints. but as we see there is some limitation. Is there any asp.net SDK for this? As we are using. Net core 3.1 for the backend. Also is there a way to send invoices to the customer while creating new sales invoices using the post method of https://api.accounting.sage.com/v3.1/sales_invoices endpoint? We set Sent=true, it is only updating this status but not sending any emails to customers. Edited February 24 by Team Paul More Details Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 24 Share Posted February 24 Thanks for clarifying, The list of Invoices is obtained using the sales_invoices API which will return the id, displayed_as(invoice_number) and path. Is there any other detail that you require to show in addition to the invoice_number in your sales_invoice list? For example you may wish to show the invoice_date and or the contact which can be requested by passing in the attributes parameter - sales_invoices?attributes=contact,date. The full details of the invoice are then obtained by passing the id to the sales_invoices API. I would recommend doing this as and when they require the details of the individual invoice rather than trying to sync all of their data. There's no public method available that would allow you to send an invoice to the customer. You would need to create the invoice and then use a GET request with the header parameter for accept set to application/pdf. This would provide you with a PDF which could then be sent to the customer using an email service of your choosing. Setting the sent attribute to true would only show the invoice as being sent in the UI. It would not invoke a method to send it to the contact. We don't have an SDK specific to asp.net, there is a .net core example in the sample code https://developer.sage.com/accounting/guides/getting-started/sample_apps/. If you're looking for guidance, I find the code examples offered in POSTMAN to provide great value and direction for specific coding languages. Thanks Mark Link to comment Share on other sites More sharing options...
Team Paul Posted February 24 Author Share Posted February 24 Hi Mark, Thanks for your support Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now