{"openapi":"3.1.0","info":{"title":"Ovelo API","version":"1.0.0","summary":"Export your own Ovelo data as CSV.","description":"The public API of Ovelo (truemargin.money). Every request runs as the signed-in seller, and returns only that seller's data. Sign in at https://www.truemargin.money/login; the session cookie authenticates the request. There are no API keys.","contact":{"email":"support@truemargin.money"}},"servers":[{"url":"https://www.truemargin.money"}],"security":[{"sessionCookie":[]}],"paths":{"/api/export/{table}":{"get":{"operationId":"exportTable","summary":"Download one of your data tables as CSV","parameters":[{"name":"table","in":"path","required":true,"description":"skus: products with current margins. cost-history: every cost version. snapshots: daily margins. alerts: margin alerts with their causes.","schema":{"type":"string","enum":["skus","cost-history","snapshots","alerts"]}},{"name":"sku","in":"query","required":false,"description":"A product id. Limits cost-history and snapshots to that product.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The table as a CSV file, one header row then one row per record.","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Not signed in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown table.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The export could not be built.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"sb-<project-ref>-auth-token","description":"The session cookie set when you sign in at /login. Its name starts with sb- and ends with -auth-token."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","hint","docs"],"properties":{"code":{"type":"string","examples":["not_found","unauthorized"]},"message":{"type":"string"},"hint":{"type":"string"},"docs":{"type":"string","format":"uri"}}}}}}}}