Build with RUC on Rails

APIs designed for developers. Add RUC purchasing and vehicle intelligence to your platform with a few lines of code.

Authentication

All API requests require authentication via the X-API-Key header.

Sandbox keys

Prefixed with ruc_test_. Test with simulated data.

Production keys

Prefixed with ruc_live_. Real NZTA transactions.

API keys are shown once when generated. Store them securely.

# Include your API key in the header
curl https://api.ruconrails.co.nz/v1/quotes \
-H "X-API-Key: ruc_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"vehicle_plate":"ABC123","distance_km":1000}'
# Response
{
"quote_id": "quote_abc123xyz",
"amount_nzd": 76.00,
"valid_until": "2025-12-02T12:00:00Z"
}

Endpoints

Quotes

POST/v1/quotesGenerate a price quote for RUC purchase
GET/v1/quotes/:idRetrieve a specific quote
GET/v1/quotesList all quotes for your account

Transactions

POST/v1/transactionsCreate a RUC purchase transaction
GET/v1/transactions/:idRetrieve transaction details
GET/v1/transactionsList all transactions

Vehicles

GET/v1/vehicles/:plateGet full vehicle details by plate
GET/v1/vehicles/:plate/stolenCheck if vehicle is reported stolen
GET/v1/vehicles/:plate/financeCheck for finance owing or encumbrances
GET/v1/vehicles/:plate/rucGet current RUC status and balance
GET/v1/vehicles/:plate/ownerGet registered person details
GET/v1/vehicles/:plate/wofGet WOF/COF status and history

Built for developers

RESTful design

Standard HTTP methods with JSON request and response bodies

API key authentication

Secure header-based auth with X-API-Key

Sandbox environment

Test with simulated data before going live

Rate limiting

Per-minute, daily, monthly, and yearly limits

Idempotent requests

Safe to retry without duplicate transactions

Request logging

Full audit trail available in Partner Portal

Error handling

The API uses standard HTTP status codes. Errors include a message explaining what went wrong.

200OKRequest successful
201CreatedResource created
400Bad RequestInvalid parameters
401UnauthorizedInvalid or missing API key
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
# Error response format
{
"error": "Bad Request",
"message": "vehicle_plate is required"
}

Ready to integrate?

Get sandbox API keys and start building. Our team is available to support your integration.