VUZDevelopers

Convert document to another type

POST
/documents/{id}/convert

Convert an accounting document to another type according to Israeli accounting rules.

Valid Conversions:

  • Quote → Deal Bill, Invoice, Tax Invoice, Tax Invoice+Receipt, Receipt (Osek Patur only)
  • Deal Bill → Invoice, Tax Invoice, Tax Invoice+Receipt, Receipt (Osek Patur only)
  • Invoice → Receipt, Credit Note, Tax Invoice+Receipt (if fully paid)
  • Tax Invoice → Receipt, Credit Note, Tax Invoice+Receipt (if fully paid)
  • Tax Invoice+Receipt → Credit Note
  • Receipt → ❌ No conversions allowed
  • Credit Note → ❌ No conversions allowed

Business Rules:

  • Source document must be ISSUED status
  • Tax Invoice+Receipt requires full payment
  • Receipt conversion only allowed for Osek Patur businesses
  • Deal Bill automatically sets VAT mode to NONE
  • Parent/child document linking is automatically created

Examples:

  1. Convert Quote to Invoice:
{  "targetType": "invoice",  "notes": "Converted after client approval"}
  1. Convert Invoice to Tax Invoice+Receipt (with payment):
{  "targetType": "tax_invoice_receipt",  "payment": {    "amount": 1170.00,    "paymentMethod": "credit_card",    "paymentDate": "2025-01-15",    "reference": "TXN-12345"  }}
X-Api-Key<token>

Business API key, e.g. vuz_ab12cdef... Created via Settings → Integrations → API Keys. Unlike partner keys, a public API key's STRING does not encode its environment — isolation instead comes from a completely separate sandbox database: a key minted on the Sandbox server (above) only ever reads/writes sandbox data and can never see or affect production, regardless of what the key looks like.

In: header

Path Parameters

id*string

Document ID to convert

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/documents/660e8400-e29b-41d4-a716-446655440000/convert" \  -H "Content-Type: application/json" \  -d '{    "targetType": "tax_invoice"  }'
{  "document": {},  "parent": {    "id": "660e8400-e29b-41d4-a716-446655440000",    "type": "quote",    "number": "QT-2025-001",    "total": 1170  },  "linked": [    {      "id": "660e8400-e29b-41d4-a716-446655440001",      "type": "invoice",      "number": "INV-2025-001",      "total": 1170,      "date": "2025-01-15",      "status": "issued"    }  ]}