Skip to main content

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": {...}}'

Base URL

https://bo.magnifinance.com/api/v1.1

Authentication

Include these headers in every request:

HeaderDescription
emailYour API user email
tokenYour subscription token

Available Endpoints

EndpointMethodDescription
Create DocumentPOSTCreate invoices, receipts, credit/debit notes
Get DocumentGETRetrieve document details and PDF
Cancel DocumentPOSTCancel a closed document
Create WaybillPOSTCreate transport documents
Get Document PropertyGETGet specific document properties

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

CodeDescription
200Success
400Bad request - check your request body
401Unauthorized - check email and token headers
404Resource not found

See Error Codes for a complete list of error types.