question

pearl.gmbh avatar image
0 Likes"
pearl.gmbh asked ·

Which format are the reports in getReport call response?

Hello all, we fight through the different parts of the Sell Marketing API and while we could now successfully create a campaign and activate offers we still have trouble to monitor our stuff. We can create report requests without problems. The get_ReportTasks gives us back all pending or successfull reports and the getReport call will give us a response with state 200 OK containing an application/octet blob in body with showing a filename as tsv.gz giving us the hint that the report must be a gzipped tsv file in the blob. Whenever we stream the blob to the disk, we get no usable data. Has anyone an idea what encoding/format has the binary part of the response in the getReport call, so we get a tsv.gz out of it? (We tried all kinds of encoding and little and big endian, but the data still says no gzip in here) I thought utf8 should be the default encoding, but sure we seem to miss a point here. Any hint is welcome. Best regards, M.W.
sell marketing api
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
pearl.gmbh avatar image
0 Likes"
pearl.gmbh answered ·
Hi folks, sorry, I found the answer now... when reading the docs again I see the hint that the getReport call will not give back a body in response... the response is the binary stream. So all I had to do is to stream the response body in raw into the file named after the name in header. Before my request routine tried to handle the answer as string which only lead to garbled data. Now I got a gzipp'd report being a proper tsv after unzipping. I hope this may help anyone with similar effects. Best regards, M.W.
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.