Aventux
Docs

API Reference

Admin API Endpoints

All entities are automatically available via the Shopware Admin API:

Suppliers

GET    /api/avent-supplier                    # List suppliers
POST   /api/avent-supplier                    # Create supplier
GET    /api/avent-supplier/{id}               # Get supplier
PATCH  /api/avent-supplier/{id}               # Update supplier
DELETE /api/avent-supplier/{id}               # Delete supplier

Example: Create a supplier

POST /api/avent-supplier
{
    "name": "Test Supplier",
    "email": "info@supplier.com",
    "phone": "+49 123 456789",
    "website": "https://supplier.com",
    "active": true,
    "priority": 0
}

Supplier Products

GET    /api/avent-supplier-product            # List mappings
POST   /api/avent-supplier-product            # Create mapping
GET    /api/avent-supplier-product/{id}       # Get mapping
PATCH  /api/avent-supplier-product/{id}       # Update mapping
DELETE /api/avent-supplier-product/{id}       # Delete mapping

Example: Assign product to supplier

POST /api/avent-supplier-product
{
    "supplierId": "019d09cb942d784a92a0b2962ebf58e9",
    "productId": "abc123...",
    "supplierSku": "SUP-12345",
    "priority": 0,
    "purchasePrice": 12.50,
    "currencyId": "...",
    "active": true
}

Dropship Orders

GET    /api/avent-dropship-order              # List dropship orders
POST   /api/avent-dropship-order              # Create dropship order
GET    /api/avent-dropship-order/{id}         # Get dropship order
PATCH  /api/avent-dropship-order/{id}         # Update dropship order
DELETE /api/avent-dropship-order/{id}         # Delete dropship order

Example: Update status

PATCH /api/avent-dropship-order/{id}
{
    "status": "shipped",
    "externalReference": "TRACK-12345"
}

Mapping Profiles

GET    /api/avent-mapping-profile             # List profiles
POST   /api/avent-mapping-profile             # Create profile
GET    /api/avent-mapping-profile/{id}        # Get profile
PATCH  /api/avent-mapping-profile/{id}        # Update profile
DELETE /api/avent-mapping-profile/{id}        # Delete profile

Example: Create mapping profile

POST /api/avent-mapping-profile
{
    "supplierId": "019d09cb942d784a92a0b2962ebf58e9",
    "name": "Product Import - Supplier A",
    "type": "product_import",
    "fileFormat": "csv",
    "config": {
        "delimiter": ";",
        "encoding": "UTF-8",
        "headerLine": 0
    },
    "fieldMapping": [
        {"source": "ArtNr", "target": "supplier_sku"},
        {"source": "Bezeichnung", "target": "name"},
        {"source": "EK-Preis", "target": "purchase_price"},
        {"source": "Bestand", "target": "stock"}
    ],
    "validationRules": [
        {"field": "supplier_sku", "rule": "required"},
        {"field": "purchase_price", "rule": "numeric"}
    ],
    "scheduleConfig": {
        "active": false,
        "sourceType": "url",
        "sourcePath": "https://supplier.com/export.csv"
    }
}

Associations

All entities support Shopware's standard association loading:

GET /api/avent-supplier?associations[supplierProducts][]
GET /api/avent-supplier?associations[media][]
GET /api/avent-dropship-order?associations[supplier][]&associations[orderLineItem][]
GET /api/avent-supplier-product?associations[supplier][]&associations[product][]

Filtering & Sorting

Standard Shopware DAL filtering:

GET /api/avent-supplier?filter[0][type]=equals&filter[0][field]=active&filter[0][value]=true
GET /api/avent-dropship-order?filter[0][type]=equals&filter[0][field]=status&filter[0][value]=pending
GET /api/avent-supplier?sort=-priority&limit=10