Skip to main content

Documentation 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.

These endpoints cover reading and mutating existing supplier records. A supplier in API-HUB is a database row — not code — that configures how the adapter framework connects to a wholesale vendor. All CRUD operations are immediate; deletes cascade to the entire catalog for that supplier.
No authentication is currently required on supplier endpoints during development. In production, restrict access to vg_admin sessions via your reverse proxy or middleware.

List all suppliers

Returns all suppliers ordered by created_at descending. Each item includes a product_count computed by a live aggregate query.
curl https://your-hub.example.com/api/suppliers
Response — 200 OK — array of SupplierRead
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "SanMar",
    "slug": "sanmar",
    "protocol": "promostandards",
    "promostandards_code": "SANMAR",
    "base_url": null,
    "adapter_class": "SanMarAdapter",
    "auth_config": {
      "id": "your-sanmar-id",
      "password": "***"
    },
    "field_mappings": null,
    "is_active": true,
    "created_at": "2026-04-14T18:00:00Z",
    "product_count": 12041
  }
]
id
string (UUID)
required
Supplier’s unique identifier.
name
string
required
Human-readable supplier name shown in the UI.
slug
string
required
URL-safe identifier. Unique. Used as an alternative lookup key instead of UUID.
protocol
string
required
Transport protocol. One of: soap, rest, hmac, ops_graphql, promostandards.
promostandards_code
string | null
Company code from the PromoStandards directory. Required for PromoStandards suppliers.
base_url
string | null
Override base URL. Used for REST/HMAC suppliers that do not use the PS directory endpoint.
adapter_class
string | null
Python class name registered in the adapter registry. Must be set before triggering an import.
auth_config
object
Credential map stored encrypted at rest (Fernet AES-128). The exact keys depend on the adapter. Returned as-is (decrypted) to vg_admin callers.
field_mappings
object | null
Custom field remapping rules saved by the mappings editor.
is_active
boolean
Whether the supplier is enabled for sync operations.
created_at
string (ISO 8601)
UTC timestamp when the supplier was created.
product_count
integer
Current count of products stored in the catalog for this supplier.

Get a single supplier

Fetch one supplier by UUID or slug. Both forms resolve to the same record.
curl https://your-hub.example.com/api/suppliers/3fa85f64-5717-4562-b3fc-2c963f66afa6
Path parameter
supplier_id_or_slug
string
required
UUID or slug of the supplier.
Response — 200 OK — single SupplierRead object (same shape as the list response). Error responses
StatusDetail
404 Not Found"Supplier not found"

Get PS Directory endpoints

Returns the cached PromoStandards Directory endpoints for a supplier. The cache is stored in the endpoint_cache JSONB column on the supplier row and is refreshed by the sync process.
curl https://your-hub.example.com/api/suppliers/sanmar/endpoints
Path parameter
supplier_id_or_slug
string
required
UUID or slug of the supplier. Only meaningful for PromoStandards suppliers.
Response — 200 OK Returns the raw PS Directory endpoint cache object. Shape varies by supplier but typically contains service URLs keyed by PS service type (e.g., ProductData, PPC, Inventory).
{
  "ProductData": "https://ws.sanmar.com/promostandards/ProductDataServiceBinding?wsdl",
  "PPC": "https://ws.sanmar.com/promostandards/PricingAndConfigurationServiceBinding?wsdl"
}

Update supplier fields

Patch one or more fields on an existing supplier. Only the patchable field set is accepted; unknown keys are silently ignored.
curl -X PATCH https://your-hub.example.com/api/suppliers/sanmar \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": false,
    "adapter_class": "SanMarAdapter"
  }'
supplier_id_or_slug
string
required
UUID or slug of the supplier to update.
Patchable fields
name
string
Human-readable name.
protocol
string
One of: soap, rest, hmac, ops_graphql, promostandards.
promostandards_code
string
PS directory company code.
base_url
string
Override base URL for REST/HMAC suppliers.
adapter_class
string
Python adapter class name. One of: PromoStandardsAdapter, SanMarAdapter, FourOverAdapter, OPSAdapter, SSAdapter, AlphabroderAdapter.
auth_config
object
Full replacement of the encrypted credentials object.
field_mappings
object
Full replacement of the field mapping rules.
is_active
boolean
Enable or disable the supplier for sync.
protocol_config
object
Protocol-specific configuration stored as JSONB. Shape is adapter-defined.
Response — 200 OK — updated SupplierRead object.

Delete a supplier

Permanently deletes a supplier and cascades deletion to all associated products, product variants, product images, categories, and sync jobs. This operation is irreversible.
Deleting a supplier removes every product and sync job associated with it. There is no soft-delete or recycle bin. Confirm with the user before calling this endpoint from a UI.
curl -X DELETE https://your-hub.example.com/api/suppliers/sanmar
supplier_id_or_slug
string
required
UUID or slug of the supplier to delete.
Response — 200 OK
{ "deleted": true }

Save field mappings

Replace the supplier’s field_mappings with a new object. The body is a free-form JSON object; the schema is adapter-defined.
curl -X PUT https://your-hub.example.com/api/suppliers/sanmar/mappings \
  -H "Content-Type: application/json" \
  -d '{
    "product_name": "ProductName",
    "brand": "BrandName",
    "sku": "ProductNumber"
  }'
supplier_id_or_slug
string
required
UUID or slug of the supplier.
(any key)
any
Field mapping pairs. The entire body replaces the existing field_mappings value.
Response — 200 OK
{
  "saved": true,
  "supplier_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "mappings": {
    "product_name": "ProductName",
    "brand": "BrandName",
    "sku": "ProductNumber"
  }
}

Build docs developers (and LLMs) love