Convert csv to json

Hi guys
trying to build an app that can reconcile our ad spend on the appnexus platform with invoices we receive. Essentially, I need to pull Appnexus data for a given month, exchange rates for that period and then provide invoice amounts in order to reconcile everything. However, the Appnexus API only provides csv as return format (or xls), is there a way to convert that to json?
For reference:

1 Like

Hi Alexander,
Thanks! Just to make sure I understand the problem: You can GET the report data from the Appnexus Report Download Service as a .csv file. You are looking for a way to programmatically grab data from the .csv file and store it in dashdash cells, correct?

1 Like

Yes. For this particular API, I cannot receive the data in json format, so I need to retrieve the data in csv format and then (I assume) somehow convert to json in order to parse the data later.

@alexander.forstbach, hello.

I am not entirely familiar with AppNexus, please pardon any incorrect assumption:

  1. It seems like they have an API for a report but also API endpoints for the multiple services that retrieve all kinds of objects. Isn’t it possible to get the same data using any of the following endpoints? Or, in other words, exactly which AppNexus data you need?

  2. While we may well build a csv-to-json feature, this will raise a bunch of other questions: can you give me the GET() that returns the CSV?

Hi humberto
you are right, there are several endpoints that return various formats. For the app I am trying to build, I need to use the reporting service endpoint. The data I am interested in (which is budget numbers that have been processed on the platform through our account), I cant retrieve from other endpoints.
The actual request involves one POST and 2 GET steps as outlined here:
I have not written the request yet though (as I am acutally failing with the authentication POST request as well).

Thanks I will investigate this further and will keep you posted.