Suppliers in API-HUB are database records, not code. Adding a new wholesale source means inserting a row in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/VisualGraphxLLC/API-HUB/llms.txt
Use this file to discover all available pages before exploring further.
suppliers table with the right protocol and adapter class — no deployment required. The adapter registry resolves that class name at runtime and hands the import orchestrator a live adapter instance ready to discover and hydrate products.
What a supplier is
Each supplier record describes a single wholesale data source. It holds the credentials needed to authenticate, the protocol used to communicate, and the adapter class that knows how to speak that protocol. The platform currently supports two protocols:promostandards— SOAP-based communication via zeep + lxml. Used by the 994+ suppliers in the PromoStandards directory, including SanMar.rest_hmac— REST API with HMAC-SHA256 request signing. Used by 4Over and similar print suppliers.
auth_config column is stored as EncryptedJSON — AES-128 via Fernet — so credentials never appear in plaintext in the database. The protocol_config column (plain JSONB) holds non-sensitive settings like explicit product ID lists or service version overrides.
Supplier fields
| Field | Type | Purpose |
|---|---|---|
name | string | Human-readable display name |
slug | string | URL-safe unique identifier |
protocol | string | promostandards or rest_hmac |
promostandards_code | string | PS directory code (PS suppliers only) |
base_url | string | Root API URL (REST suppliers) |
adapter_class | string | Registry key — e.g. SanMarAdapter |
auth_config | EncryptedJSON | Credentials: id/password or api_key/private_key |
protocol_config | JSONB | Non-sensitive protocol settings |
endpoint_cache | JSONB | Cached WSDL URLs from PS directory |
field_mappings | JSONB | Custom field overrides for this supplier |
is_active | boolean | Controls whether sync jobs run |
last_full_sync | timestamp | Set after a completed full import |
last_delta_sync | timestamp | Set after a completed delta import |
has_decoration_overlay | boolean | Signals OPS to render decoration areas |
push_name_prefix | string | Optional prefix prepended to product names in OPS |
Built-in adapters
PromoStandardsAdapter
Generic SOAP adapter for any supplier in the PromoStandards directory. Calls
getProductSellable, getProduct, getConfigurationAndPricing, and getMediaContent via zeep. Set protocol: promostandards and adapter_class: PromoStandardsAdapter.SanMarAdapter
Subclass of
PromoStandardsAdapter with hardcoded WSDL fallbacks for SanMar’s four PS services (Product v2.0.0, Media v1.1.0, Pricing v1.0.0, Inventory v2.0.0). Also supports SanMar’s non-standard category extension WSDL. Set adapter_class: SanMarAdapter.FourOverAdapter
REST adapter for 4Over’s HMAC-SHA256-signed API. Discovers print products via
GET /products, fetches option groups per product. Set protocol: rest_hmac and adapter_class: FourOverAdapter. Auth config keys: api_key and private_key.OPSAdapter
Reads products inbound from an OnPrintShop storefront via GraphQL. Normalizes to
product_type: print. Used when OPS itself is a data source rather than a push target. Set adapter_class: OPSAdapter.How the adapter registry works
Every adapter module callsregister_adapter(name, cls) at import time. main.py imports each module on startup, which populates the ADAPTERS dict before any route is served.
get_adapter(supplier, db). The registry looks up supplier.adapter_class in ADAPTERS, instantiates the class with the supplier record and a database session, and returns a live adapter. Two things can go wrong:
AdapterNotConfiguredError—adapter_classisNULL. Set it viaPATCH /api/suppliers/{id}or the admin UI before triggering an import.AdapterNotRegisteredError—adapter_classhas a value that no module registered. This usually means a typo or a module that was not imported on startup.
Supplier lifecycle
Setting
is_active: false suspends all scheduled sync jobs for the supplier without deleting any catalog data. You can reactivate the supplier at any time by patching is_active back to true.Supplier endpoints reference
| Method | Path | Description |
|---|---|---|
GET | /api/suppliers | List all suppliers with product counts |
POST | /api/suppliers | Create or reactivate a supplier |
GET | /api/suppliers/{id_or_slug} | Get a single supplier by UUID or slug |
PATCH | /api/suppliers/{id_or_slug} | Update patchable fields |
DELETE | /api/suppliers/{id_or_slug} | Delete supplier and all catalog data |
POST | /api/suppliers/test | Test connection before saving |
GET | /api/suppliers/{id}/endpoints | Fetch cached PS endpoint WSDLs |
PUT | /api/suppliers/{id}/mappings | Save field mapping overrides |
POST | /api/suppliers/{id}/import | Trigger a manual import job |
GET | /api/suppliers/{id}/sync-jobs | List import history for a supplier |