If you use Mintsoft, Peoplevox, Linnworks or Synergy, you can use our integration with Voila to send a request to the Swap Shipping API and receive the correct item value, duty/tax, and B2B2C fields (if applicable).
This guide explains how 3PLs, WMSs, or brands can generate FedEx shipping labels and commercial invoices via Swap's invoices endpoint. This is a Swap-owned endpoint that proxies via the Voila API.
⚠️ Important
Before you can call the API, you may need to add Swap as a carrier in your Warehouse Management System (WMS).
Follow the setup guide for your WMS:
More WMS setup guides will be published shortly
Request access to the Swap x Voila API
To authenticate with Swap (proxying to Voila), you’ll need API credentials. To receive these, please email: [email protected], including:
Your company name
Brand(s) you support
Technical contact for testing
Once approved, you’ll receive the following credentials:
api-user: your-username
api-token: your-api-token
courier-key: courier-key
Test your credentials
Create a test label via Voila
Once you have your credentials, use the following generic endpoint to create a label via Voila, substituting {{courier-key}} with the value provided in your API credential set.
POST <https://app.heyvoila.io/api/couriers/v1/{{courier-key}>}/create-label>
Send a sample request
Next, send a sample request to Swap via Voila.
This is what a sample request looks like:
JSON
{
"testing": false,
"auth_company": "Demo Partner",
"request_id": "REQ12345678",
"format_address_default": false,
"shipment": {
"label_size": "6x4",
"label_format": "pdf",
"dc_service_id": "FEDEX-IP-DDP",
"collection_date": "2025-06-08T15:00:00.000Z",
"reference": "REQ12345678",
"generate_commercial_invoice": true,
"parcel_count": "1",
"parcels": [
{
"dim_width": 40,
"dim_height": 30,
"dim_length": 10,
"dim_unit": "CM",
"packaging_weight": 0.3,
"weight_unit": "KG",
"items": [
{
"description": "Mesh Back Performance Tee",
"origin_country": "CN",
"quantity": 1,
"value": 59.99,
"value_currency": "GBP",
"weight": 0.5,
"weight_unit": "KG",
"sku": "TEE-MESH-001",
"hs_code": "6109902000"
}
]
}
],
"ship_from": {
"name": "Demo Fulfillment Center",
"phone": "0123456789",
"email": "[email protected]",
"company_name": "Demo WMS Ltd",
"address_1": "Warehouse A",
"address_2": "Dock 4",
"city": "Manchester",
"postcode": "M1 2AB",
"country_iso": "GB",
"tax_id": "GB123456789",
"eori_id": "GB987654321000",
"ioss_number": "IM1234567890"
},
"ship_to": {
"name": "Jane Doe",
"phone": "+49123456789",
"email": "[email protected]",
"address_1": "Sample Street 5",
"city": "Berlin",
"postcode": "10115",
"country_iso": "DE"
}
},
"source_request_id": 123456789,
"api-user": "Swap Courier Account",
"courier": "FedexV2",
"access_token": "<REDACTED>"
}
This is what the expected response should look like:
JSON
{
"type": "PDF",
"request_id": "REQ12345678",
"tracking_codes": ["881831960420"],
"tracking_urls": [
"<https://www.fedex.com/apps/fedextrack/index.html?tracknumbers=881831960420>"
],
"courier_specifics": {
"form_ids": ["0430"],
"tracking_id_types": ["FEDEX"]
},
"commercial_invoice": {
"url": "<https://s3.bucket>.../CommercialInvoice.pdf",
"key": "CommercialInvoice.pdf"
},
"uri": "<https://s3.bucket>.../FedExLabel.pdf",
"key": "FedExLabel.pdf",
"reference": "REQ12345678",
"label_size": "6x4",
"courier": "FedexV2",
"dc_service_id": "FEDEX-IP-DDP"
}
Best Practices
Include order_id, order_name, and store_id inside the shipment payload. Even though Voila doesn't document them, they're parsed and used by Swap for order lookup, reconciliation, and debugging.
{
"order_id": "12345678910",
"order_name": "US123456",
"store_id": "abcde12345fgh67890"
}
Voila will still process the request if these fields are omitted, but for better tracking, linking, and error resolution, it's best to pass them in.
More information
Voila documentation (for payload schema understanding):
https://api.heyvoila.io/#84ae327e-1681-43eb-b65f-f7d7d23260c8
Support
If anything breaks or you’re unsure about how to format a payload, just email [email protected] or reach out to your Swap technical contact.