DEVELOPER API ยท v1

Mushak BD REST API

Generate NBR-compliant Mushak-6.3 VAT challans, extract data from invoice images using AI, list your documents, and verify QR tokens โ€” all from your own apps and backend systems.

Getting started

  1. Sign in to your Mushak BD account.
  2. Go to API Keys and click Generate key.
  3. Copy the key (shown once). Use it as a Bearer token in the Authorization header.

Base URL & auth

Base URL: https://mushak.globyn.com/api/public/v1

Header:
  Authorization: Bearer mbk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  Content-Type: application/json

Every request that creates or reads your data counts against your monthly credits (same as the web app).

Endpoints

POST/api/public/v1/documents

Create a Mushak-6.3 challan from JSON.

curl -X POST https://mushak.globyn.com/api/public/v1/documents \
  -H "Authorization: Bearer mbk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_no": "INV-1042",
    "invoice_date": "2026-05-19",
    "buyer_name": "Acme Ltd",
    "buyer_bin": "001234567-0202",
    "buyer_address": "Dhaka",
    "items": [
      {"description": "Web hosting (1 year)", "quantity": 1, "unit_price": 12000, "vat_rate": 15}
    ]
  }'

Response 201

{
  "id": "uuid",
  "serial": "MUSHAK-6.3/2026/000042",
  "qr_token": "abc123...",
  "verify_url": "https://mushak.globyn.com/verify/abc123...",
  "created_at": "2026-05-19T10:00:00Z"
}

Optional: brand_id (defaults to your default brand).

POST/api/public/v1/extract

Upload an invoice image URL โ€” AI extracts Mushak-6.3 fields.

curl -X POST https://mushak.globyn.com/api/public/v1/extract \
  -H "Authorization: Bearer mbk_..." \
  -H "Content-Type: application/json" \
  -d '{"image_url": "https://example.com/invoice.jpg"}'

Response 200

{
  "extracted": {
    "invoice_no": "INV-1042",
    "invoice_date": "2026-05-19",
    "buyer_name": "Acme Ltd",
    "buyer_bin": "001234567-0202",
    "items": [...]
  }
}

Pipe the result into POST /documents to create the challan.

GET/api/public/v1/documents

List your documents (newest first). Query: ?limit=50 (max 200).

curl https://mushak.globyn.com/api/public/v1/documents?limit=20 \
  -H "Authorization: Bearer mbk_..."
GET/api/public/v1/documents/{id}

Fetch a single document by id.

curl https://mushak.globyn.com/api/public/v1/documents/UUID \
  -H "Authorization: Bearer mbk_..."
GET/api/public/v1/verify/{token}

Public verification of a QR token. No auth required.

curl https://mushak.globyn.com/api/public/v1/verify/QR_TOKEN

Errors

CodeMeaning
400Validation failed (see details)
401Missing or invalid API key
404Not found / not owned by you
429Out of credits
5xxServer / AI gateway error

Support

Need help integrating? WhatsApp Mushak BD support or email support@globyn.com.