Skip to main content

SWAP Courier-API (Voila) – Integration Guide for 3PLs & WMSs

G
Written by Guido Kaspers
Updated over 2 months ago

This guide outlines how third-party logistics providers (3PLs), warehouse management systems (WMSs), or brands can generate FedEx shipping labels and commercial invoices via the Swap Courier API. Swap owns this API endpoint and acts as a proxy to Voila, while providing a native Swap experience.


Overview

Endpoint

You’ll substitute {{courier-key}} with the one provided in your API credential set.

Purpose

To generate a FedEx shipping label and commercial invoice with a minimal payload. Swap handles data enrichment and formatting behind the scenes.


API Access

To obtain access credentials (x-api-key), you can:

  1. Reach out to your Swap contact

  2. (Coming Soon) Fill out the API Access Request form

  3. In your request, please include:

    • Your company name

    • Brand(s) you support

    • Contact details for technical support and testing

Once approved, you’ll receive:


api-user: your-username
api-token: your-api-token
courier-key: courier-key


Sample Request

json
CopyEdit
{
"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>"
}


Sample Response

json
CopyEdit
{
"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"
}


Important Integration Notes

Include additional metadata

Although not required by Voila, Swap recommends including the following fields in the shipment payload for improved traceability, reconciliation, and debugging:

json
CopyEdit
{
"order_id": "12345678910",
"order_name": "US123456",
"store_id": "abcde12345fgh67890"
}

Voila will still accept the request without these fields, but their inclusion significantly improves internal processing and error resolution.


Developer Reference

For a deeper understanding of the underlying schema used by Voila, refer to their API documentation:


Support

If you require assistance or encounter any issues, please get in touch with your Swap contact.

Did this answer your question?