All examples use BASE_URL — set it to your deployment URL, e.g. https://winnieapi-v2.yourdomain.com
POST/api/convert/json-to-csv
Convert a JSON array to CSV format.
const res = await fetch(`${BASE_URL}/api/convert/json-to-csv`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ json: '[{"name":"Alice","age":30}]' })
});
// → { success: true, result: "name,age\nAlice,30" }
POST/api/convert/csv-to-json
Convert CSV text to a JSON array.
const res = await fetch(`${BASE_URL}/api/convert/csv-to-json`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ csv: "name,age\nAlice,30" })
});
// → { success: true, result: [{"name":"Alice","age":"30"}] }