Creating a supplier in API-HUB is a database operation — you configure a row with anDocumentation 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.
adapter_class, protocol, and encrypted credentials, and the adapter framework handles all communication with that vendor. No code changes are required to add a new supplier.
The create endpoint is idempotent on slug: if a supplier with the given slug already exists, it updates the existing record’s credentials and marks it is_active = true instead of returning an error. This supports the “re-activate” flow in the admin UI.
Create a supplier
Human-readable supplier name shown in the admin UI and sync job records.
URL-safe, lowercase, hyphen-separated identifier. Must be unique across all suppliers. Used as an alternative lookup key throughout the API (e.g.,
/api/suppliers/sanmar).Transport protocol. One of:
promostandards— SOAP via PromoStandards Directory endpoint resolutionsoap— Direct SOAP (non-PS-directory)rest— Plain RESThmac— REST with HMAC signing (e.g., 4Over)ops_graphql— OnPrintShop GraphQL inbound
PromoStandards directory company code. Required when
protocol is promostandards. Used to resolve WSDL endpoints from the PS Directory.Override base URL. Required for REST/HMAC suppliers that do not use the PS directory.
Python adapter class registered in the adapter registry. Must be set before triggering an import job. Valid values:
| Value | Supplier type |
|---|---|
PromoStandardsAdapter | Generic PromoStandards SOAP |
SanMarAdapter | SanMar (PromoStandards subclass with SanMar-specific SOAP quirks) |
FourOverAdapter | 4Over REST + HMAC |
OPSAdapter | OnPrintShop GraphQL inbound |
SSAdapter | S&S Activewear REST |
AlphabroderAdapter | Alphabroder PromoStandards |
Credential map. Encrypted at rest via Fernet (AES-128) before being written to the database. The exact keys depend on the adapter:
- PromoStandards/SanMar:
{ "id": "...", "password": "..." } - 4Over HMAC:
{ "api_key": "...", "api_secret": "..." } - REST:
{ "id": "...", "password": "..." }
Whether the supplier is enabled for sync operations.
Protocol-specific JSONB configuration. Shape is adapter-defined. Not required for most suppliers.
201 Created
Returns the full SupplierRead object with product_count: 0.
slug already exists, the endpoint updates all fields on the existing record (including credentials) and sets is_active = true. The response is 201 either way. No error is returned.
Error responses
| Status | Detail |
|---|---|
409 Conflict | Unique constraint race condition — slug already exists despite the idempotent check |
422 Unprocessable Entity | Missing required fields or invalid protocol value |
Test a connection
Validate supplier credentials before saving them. For PromoStandards suppliers, this checks the PS Directory for the given company code. For REST suppliers, it validates thatauth_config contains the expected credential keys.
Protocol type. Determines which validation path to run.
Required when
protocol is promostandards. Checked against the live PS Directory.Required when
protocol is rest or hmac. Must contain non-empty id and password keys.200 OK
true if the connection test passed.Success message. Present when
ok is true.Error description. Present when
ok is false.- Success
- Failure
- Directory unreachable
The test endpoint returns
200 OK even when the test fails — check the ok field in the body rather than the HTTP status code.