Skip to Content
API ReferenceAPI Reference

API Reference

The Yona REST API is organized around standard HTTP methods and JSON request/response bodies.

Base URL

https://gateway.useyona.com

Authentication

All requests require an API key as a Bearer token:

Authorization: Bearer sk_test_your_key_here

Service prefixes

ServicePrefix
Invoice service/i/v1
Billing service/b/v1
Auth service/a/v1

Response envelope

Success

{ "meta": { "statusCode": 200, "success": true, "errors": [], "message": "Success", "timestamp": "2026-04-19T10:30:00.000Z" }, "data": { } }

Error

{ "meta": { "statusCode": 400, "success": false, "errors": [{ "VAL001": "Validation failed" }], "message": "Validation failed", "errorCode": "VAL001", "timestamp": "2026-04-19T10:30:00.000Z", "path": "/i/v1/invoices", "method": "POST" }, "data": null }

Paginated

{ "meta": { "statusCode": 200, "success": true, "errors": [], "message": "Success", "pagination": { "total": 150, "page": 1, "pageSize": 20, "totalPages": 8, "hasNext": true, "hasPrevious": false }, "timestamp": "2026-04-19T10:30:00.000Z" }, "data": [] }

Error codes

CodeMeaningHTTP Status
AUTH001Invalid credentials401
AUTH002Token expired401
AUTH004Unauthorized401
AUTH005Forbidden403
VAL001Validation failed400
VAL002Missing required field400
RES001Not found404
RES002Already exists409
BIZ001Insufficient balance400
BIZ004Invalid state400
INV001Invalid invoice format400
INV002Already submitted400
INV003Cannot modify400
SYS001Internal error500
TAX001Tax authority connection error502
Last updated on