Errors when fetching CSV from Loket table PayrollRunBalanceSheetByPayrollRunIdAsCsv

I’m trying to fetch a CSV from the Loket table PayrollRunBalanceSheetByPayrollRunIdAsCsv, see below stored procedure code.

I get an error:

No supported MIME-type produced ‘text/csv’ on table ‘LoketNlRest.PayrollRunDownloads.PayrollRunBalanceSheetByPayrollRunIdAsCsv’.

Do you know any solutions to this error?

  l_output varchar2;
  cloud_http.set_response_header_value(‘Content-Disposition’, ‘attachment; filename=“open-verkoopfacturen.csv”’);
  select * 
  into   l_output
  from   LoketNlRest.PayrollRunDownloads.PayrollRunBalanceSheetByPayrollRunIdAsCsv('XXX')

@gls This is still an issue. And quite urgent, do you have any input for us on this?

This is a rather new table which has not yet been covered. It will be covered in a future release.

A request has been filed with Loket helpdesk on #213421 to have more scopes granted to the Invantive application registrations.

1 Like

For the time being, use of NativeScalarRequests may prove helpful. Samples are:

The API has been granted access and tested, but it seems part of the metadata is missing. A number of tickets have been created with Loket.

It is a good moment to ask what the business need is to download the data as CSV and in using another API or format.

Can you provide some background?

Business need : There are no reliable tables within Invantive to get to the right level of detail and reliability to make the bookings in our ERP. We’ve checked all tables and the one with debit/credit (JournalRunResults > JournalRunResultsByJournalRunId) doesn’t have the right level of detail (PayrollComponent_key and PayrollComponent_Description are empty). Other tables with PayrollRun data haven’t got the right level of reliability to be sure which ledger to take and whether it’s debit or credit.

Een bericht is gesplitst naar een nieuw topic: Retrieve SEPA files Loket

Thanks for the background.

The CSV currently can not be generated without using NativeScalarRequests.

The specific Loket API is essentially a wrapper around another specification. This specification is forwarded to the Loket server using the X-ReportInput header.

Calculating and setting the specification is currently not available with Invantive’s Loket driver. There are currently no plans to support it as part of the standard support. Through consulting support it could be implemented on a fee basis outside of standard support.

An alternative would be that Loket provides a meaningful default implementation. For that, Loket suggests to register it as an idea on the ideas section of Loket support portal (#213465). The same holds for automated documentation and API-generation (#213461).

After consultation with your national team we have reached out to a specialized Invantive partner and Loket. I hope they can be of assistance.