VasBox API Documentation

Learn how to integrate VasBox into your application and start creating ZIMRA-compliant invoices and receipts.

VasBox provides a powerful REST API that enables you to create, manage, and submit fiscal documents to ZIMRA. Our API is designed to be intuitive, well-documented, and compliant with Zimbabwe's fiscal regulations.

API Version

This documentation covers VasBox API v1. All API endpoints are prefixed with /v1.

Looking for the User Guide?

If you're a business owner, manager, or cashier looking for help using VasBox, check out our User Guide for step-by-step instructions on invoicing, fiscal operations, and more.

Getting Started

To start using the VasBox API, you'll need to obtain API credentials and set up authentication. Follow the steps below to get your first integration running.

Installation

Install the VasBox SDK for your preferred programming language:

npm install @vasbox/sdk

Authentication

The VasBox API uses Bearer token authentication. Include your API key in the Authorization header of every request.

Bash
curl -H 'Authorization: Bearer YOUR_API_KEY' \
  https://api.vasbox.co.zw/v1/me

Keep your API key secure

Never expose your API key in client-side code or public repositories. Use environment variables to store sensitive credentials.

Making Your First Request

Here's an example of creating an invoice using the VasBox API. This demonstrates the basic structure of API requests.

curl -X POST https://api.vasbox.co.zw/v1/invoices \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cust_123",
    "items": [
      {
        "description": "Product A",
        "quantity": 2,
        "unit_price": 1500.00
      }
    ]
  }'

That's it!

Your invoice is now created and ready to be submitted to ZIMRA. The response will include a unique invoice ID and status.

Next Steps