REST API for Invoicing & Waybills
The REST API uses JSON for data exchange and standard HTTP methods. This is the recommended approach for new integrations.
TL;DR - Quick Start
curl -X POST https://bo.magnifinance.com/api/v1.1/document \
-H "email: your-api@email.com" \
-H "token: your-subscription-token" \
-H "Content-Type: application/json" \
-d '{"IsToClose": true, "Client": {...}, "Document": {...}}'
Try it in Postman
Every endpoint on this page is in the Invoicing & Waybills REST Postman collection, with sample bodies filled in. Import it, set email and token in its Variables tab and press Send. How to use it.
Or paste this URL in Postman's Import:
https://developer.magnifinance.com/finance/postman/invoicing-waybills-rest.json
Base URL
https://bo.magnifinance.com/api/v1.1
Authentication
Include these headers in every request:
| Header | Description |
|---|---|
email | Your API user email |
token | Your subscription token |
Available Endpoints
| Endpoint | Method | Description |
|---|---|---|
| Create Document | POST | Create invoices, receipts, credit/debit notes |
| Get Document | GET | Retrieve document details and PDF |
| Cancel Document | POST | Cancel a closed document |
| Create Waybill | POST | Create transport documents |
| Get Document Property | GET | Get specific document properties |
| Get a Client | GET | Get a company registered in your subscription by its tax id |
Response Format
All responses are JSON with this structure:
Success Response
{
"RequestId": "98c3bc62-911d-4f14-a5f4-d610c66e8b8b",
"Object": {
"DocumentId": 67195
},
"Type": 0,
"IsSuccess": true,
"IsError": false
}
Error Response
{
"RequestId": "211b32b1-701a-4944-9292-8f8034a3b3a7",
"Type": 1,
"ErrorValue": {
"Value": 14,
"Name": "SaveFailed"
},
"ErrorHumanReadable": "ValidationError",
"ValidationErrors": [
{
"Type": "DocumentIsADuplicate",
"Field": "DocumentDetailExternalId",
"Detail": "Duplicate Document"
}
],
"IsSuccess": false,
"IsError": true
}
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad request - check your request body |
| 401 | Unauthorized - check email and token headers |
| 404 | Resource not found |
See Error Codes for a complete list of error types.