API Documentation

Integrate powerful services into your applications with our well-documented APIs

Available Services

Click on a service to view detailed documentation

Detailed Documentation

Quick Start

Get started quickly with these code examples for the Barcode API:

Bash / cURL
curl -X POST "https://yourdomain.com/api/barcode/decode" \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@/path/to/license.jpg"
POST

License Barcode Decoder

Contact for pricing

Decode PDF417 barcodes from driver's licenses and ID cards. Extracts name, date of birth, address, license number, and other AAMVA-compliant data fields.

Endpoint

POST /api/barcode/decode

Authentication

API Key Include X-API-Key header with your API key

Authenticate using either an API key (X-API-Key header)

Rate Limit

100

Request Parameters

Parameters:
- image (file, required): Image file containing a PDF417 barcode
  Supported formats: JPEG, PNG, GIF, BMP, WebP
  Max size: 10MB

Content-Type: multipart/form-data

Response

Success Response:
{
  "success": true,
  "data": {
    "first_name": "JOHN",
    "last_name": "DOE",
    "middle_name": "MICHAEL",
    "date_of_birth": "1990-01-15",
    "address": "123 MAIN ST",
    "city": "AUSTIN",
    "state": "TX",
    "zip_code": "78701",
    "license_number": "12345678",
    "expiration_date": "2028-01-15",
    "issue_date": "2020-01-15",
    "gender": "M",
    "eye_color": "BRO",
    "height": "510"
  }
}

Error Responses:

401 Unauthorized - Missing or invalid API key:
{
  "success": false,
  "error": "Authentication required. Provide valid X-API-Key header or login."
}

400 Bad Request - No image provided:
{
  "success": false,
  "error": "No image file provided"
}

400 Bad Request - Invalid file format:
{
  "success": false,
  "error": "Invalid file type. Supported: JPEG, PNG, GIF, BMP, WebP"
}

400 Bad Request - File too large:
{
  "success": false,
  "error": "File size exceeds 10MB limit"
}

422 Unprocessable - No barcode found:
{
  "success": false,
  "error": "No PDF417 barcode detected in image"
}

422 Unprocessable - Parsing failed:
{
  "success": false,
  "error": "Unable to parse barcode data. Image may be blurry or damaged."
}

500 Internal Server Error:
{
  "success": false,
  "error": "An unexpected error occurred. Please try again."
}

Example Request

curl -X POST https://sunira.io/api/barcode/decode \
  -H "X-API-Key: your-api-key" \
  -F "image=@drivers_license.jpg"

Example Response

{
  "success": true,
  "data": {
    "first_name": "JOHN",
    "last_name": "DOE",
    "date_of_birth": "1990-01-15",
    "license_number": "12345678",
    "state": "TX"
  }
}

Need an API Key?

Contact us to get your API credentials and start integrating our services into your applications.

Request API Access