Currently I'm working on shopify app which allows DPOs to handle SAR requests right from shopify and one of the app's features is to send all customer's data (from shopify and also DPO is able to upload additional data). Is it possible to get all customer's data (like CSV files linked to email I received after requested customers data on customer's details page) via restfull \ graphql api? I found most of them but responses data is a bit different than in CSV files.
The API typically return data in a JSON-formatted response body. There isn't really a baked-in option of downloading a delimited text file. Depending on the development environment you plan to use for the app there are packages likely available that can transform a JSON response into CSV-type output. If you were to choose between the REST API and the GraphQL API for your project, I would recommend the GraphQL API. Since there are likely just a handful of specific customer fields you are looking for. Rather than pulling any/all fields and parsing through them with the REST API, you can specifically request just those fields you want with the GraphQL API.
Thanks for your reply.
Yes, I understand I need to convert json response to CSV by myself. The problem is API doesn't return some fields which CSV files contain. For example for payment methods it returns firstDigits and lastDigits but not cardholder name. So question is not about receiving CSV but how to get all the data we have in CSV files via API