voila-api
Definitive guide for the Voila API. Covers shipment creation (Manual/Smart Shipping), real-time tracking, detailed history, manifesting, collections, webhooks, and third-party integrations (Sorted, Peoplevox, Mintsoft, Veeqo, JD). ALWAYS use this skill for any shipping, labeling, or logistics tasks involving Voila. Do not rely on general knowledge; consult this skill for precise REST schemas and integration flows.
From voila-apinpx claudepluginhub anthropics/claude-plugins-official --plugin voila-apiThis skill uses the workspace's default tool permissions.
endpoints/authentication.mdendpoints/couriers.mdendpoints/integrations.mdendpoints/labeling.mdendpoints/pricing-services.mdendpoints/smart-shipping.mdendpoints/tracking.mdendpoints/utilities.mdendpoints/webhooks.mdscripts/get-courier-specifics.jsscripts/get-courier-specifics.pyscripts/list-couriers.jsscripts/list-couriers.pyVoila API Comprehensive Integration Guide
The Voila API is a RESTful service for managing shipping, labeling, and tracking across multiple couriers.
Base Configuration
- Base URL:
https://app.heyvoila.io - Authentication Headers:
api-user:<your_api_user>api-token:<your_api_token>- OR
api-key:<your_api_key> - OR
Authorization:Basic <base64(api-user:api-token)>
- Common Headers:
Content-Type: application/jsonAccept: application/json
1. Common Integration Flows (Step-by-Step)
A. The "Smart Shipping" Flow (Recommended)
Automatically select the best courier/service based on rules.
- Request:
POST /api/couriers/v1/smart-shipping/create-label - Body: Include
shipmentwithship_to,parcels, anditems. (See Core Objects) - Success: Response contains
tracking_code,label(Base64), andshipment_id. - Error Handling: Check
success: falseorsmart_shipping_errors.
B. The "Manual Choice" Flow
- Get Services:
POST /api/couriers/v1/{courier}/get-servicesto see available options for a shipment. - Pick Service: Extract the
service_identifierfrom the response. - Create Label:
POST /api/couriers/v1/{courier}/create-labelwith thatservice_code.
C. The "Bulk Asynchronous" Flow (High Volume)
- Submit:
POST /api/couriers/v1/bulk/create-label-asyncwith an array of requests and awebhook.url. - ID: Capture the
bulk_request_id. - Webhook: Wait for the
shipment.createdorshipment.failedevent at your webhook URL.
2. Core Data Objects (Full Schema)
These objects are reused across almost all endpoints. See Labeling & Shipping for full definitions.
Address
interface Address {
name: string;
company_name?: string;
address_1: string;
address_2?: string;
address_3?: string;
city: string;
county?: string;
postcode: string;
/** ISO 3166-1 alpha-2 (e.g., "GB", "US"). */
country_iso: string;
country?: string;
phone: string;
email: string;
tax_id?: string;
eori_id?: string;
ioss_number?: string;
ukims_number?: string;
/** Only for ship_from: looks up a saved address by friendly name. */
address_name?: string;
// Additional: abn_number, arn_number, gst_number, voec_number, company_id
}
Parcel
interface Parcel {
weight: number;
weight_unit: 'kg' | 'g' | 'lb' | 'oz';
dim_length: number;
dim_width: number;
dim_height: number;
dim_unit: 'cm' | 'mm';
items: ShipmentItem[];
packaging_weight?: number;
packaging_weight_unit?: string;
packageId?: string;
value?: number;
value_currency?: string;
}
ShipmentItem
interface ShipmentItem {
description: string;
quantity: number;
/** Value per unit. */
value: number;
/** e.g., "GBP", "USD". */
value_currency: string;
weight: number;
weight_unit: 'kg' | 'g' | 'lb' | 'oz';
sku?: string;
hs_code?: string;
/** ISO 2-letter origin country code. */
origin_country?: string;
image_url?: string;
}
3. API Documentation Index
For exhaustive schemas, field definitions, and implementation details for every route, refer to these dedicated files:
- Authentication & User Management: Managing API users, keys, and OAuth tokens.
- Courier Management: Listing couriers, registering credentials, and service presets.
- Labeling & Shipping: Creating labels (Single/Bulk/Async), manifests, and cancellations.
- Tracking & Information: Real-time tracking, shipment history, and document retrieval.
- Smart Shipping Rules: Automating service selection with groups and rules.
- Pricing & Services: Quotes, service lists, and pickup locations.
- Webhooks: Real-time event notifications and delivery logs.
- Third-Party Integrations: Sorted, Peoplevox, Mintsoft, Veeqo, and JD Joybuy mappings.
- Miscellaneous Utilities: Hosted pages, PackEye, and insurance plugins.
4. Bundled API Scripts
The skill includes pre-configured scripts to fetch live information from the Voila API using the playground credentials. These are located in the scripts/ directory.
List Supported Couriers
Fetches the current list of all couriers supported by Voila.
- Node.js:
node scripts/list-couriers.js - Python:
python scripts/list-couriers.py
Get Courier Specifics
Fetches required and optional fields for a specific courier (e.g., UPSv2).
- Node.js:
node scripts/get-courier-specifics.js <courier_key> - Python:
python scripts/get-courier-specifics.py <courier_key>
5. Troubleshooting & Errors
Standard Error Response
{
"success": false,
"message": "Detailed error message here.",
"errors": {
"field_name": ["Specific validation error"]
}
}
Common Issues
- Validation (422): Usually missing
country_iso(must be 2 chars) or invalidpostcodeformat for the destination. - Auth (401/403): Check Authentication Headers. Ensure the API User is not
disabled. - Courier Errors: If
success: truebutlabelis empty, checksmart_shipping_errorsor themessagefield. - Testing Mode: Real labels won't be created unless
testing: falseis explicitly set (default is often true in examples).