Beta
Not authenticated — log in first
VendorProducts

Create Product

Create Product — vendor REST API endpoint.

POST/vendor/productsVendor bearer token required

Create Product

Create a new product in your vendor catalog.

What this means in plain English

Creates a product with at least name and SKU (min 3 characters for name). Requires OWNER, ADMIN, or EDITOR role. Variants and inventory can be included; upload images separately via multipart endpoints.

When to use this

  • Adding new SKUs to your catalog via API integration.

Request body

NameTypeRequiredDescription
namestringYesProduct name (3–255 characters).
skustringYesUnique SKU within your vendor.
slugstringNoURL slug. Omit to derive from name (lowercase, hyphenated); numeric suffix added if taken.
shortDescriptionstringNoShort product description.
descriptionstringNoFull product description.
brandstringNoBrand name (max 255 characters).
countryOfOriginstringNoCountry of origin (max 255 characters).
manufacturerstringNoManufacturer name (max 255 characters).
leadTimeintegerNoLead time in days (min 0). When omitted, inherits your vendor profile leadTime (default 4).
unspcstringNoUNSPSC code — 8 or 10 digits.
commodityCodestringNoCommodity / HS-style code (max 28 characters).
eccnstringNoExport Control Classification Number (max 255 characters).
freeShippingbooleanNoFree shipping flag.
abilityOnebooleanNoAbilityOne flag.
madeInUsabooleanNoMade in USA flag.
greenProductbooleanNoGreen product flag.
keyFeaturesstring[]NoKey features (max 6 items, 255 characters each).
accountCodestringNoAccount code (max 255 characters).
programCodestringNoDepartment Code (max 255 characters).
resourceCodestringNoResource code (max 255 characters).
categoryIdsstring[] (UUID)NoCategory UUIDs to assign. Use [List Categories](/docs/v1/vendor/categories/list) to look up valid UUIDs.
collectionIdsstring[] (UUID)NoCollection UUIDs to assign.
tagIdsstring[] (UUID)NoTag UUIDs to assign.
facetValueIdsstring[] (UUID)NoFacet value UUIDs to assign.
variants[].skustringYesVariant SKU (unique per product).
variants[].namestringYesVariant name.
variants[].vendorPricenumberYesVendor/cost price. The customer-facing retail price is computed from this and never set directly.
variants[].listPricenumberNoList price (MSRP). Shown as a strikethrough compare-at price when higher than the retail price; never charged at checkout.
variants[].idstring (UUID)NoExisting variant ID — for updates only, not create.
variants[].upcstringNoUPC (max 255 characters).
variants[].unitOfMeasurestringNoUnit of measure (max 50 characters).
variants[].partNumberstringNoManufacturer part number (max 255 characters).
variants[].weightnumberNoWeight (min 0).
variants[].initialInventoryintegerNoInitial stock on create (min 0).
variants[].attributesobjectNoArbitrary key/value variant attributes.
variants[].isActivebooleanNoActive flag. Defaults to true when omitted.
documents[].titlestringYesDocument title (max 255 characters).
documents[].typestringYesDocument type (max 50 characters).
documents[].urlstringNoExternal document URL.
documents[].base64DocumentstringNoBase64-encoded document data.
documents[].sortOrderintegerNoSort order (min 0).

Request example

curl -X POST 'https://api.next.gcommerce.glass/api/v1/vendor/products' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Widget Pro",
  "sku": "WIDGET-001",
  "variants": [
    {
      "sku": "WIDGET-001",
      "name": "Default",
      "vendorPrice": 19.99
    }
  ],
  "documents": [
    {
      "title": "Spec sheet",
      "type": "spec"
    }
  ]
}'

Response examples

201Created
{
  "id": "550e8400-e29b-41d4-a716-446655440020",
  "name": "Widget Pro",
  "slug": "widget-pro",
  "sku": "WIDGET-001",
  "shortDescription": "Premium widget",
  "warranty": "1 year limited",
  "description": "High-quality widget for industrial use.",
  "pageTitle": "Widget Pro | Jane's Store",
  "pageDescription": "Shop the Widget Pro — durable, lightweight, made in USA.",
  "brand": "Acme",
  "countryOfOrigin": "US",
  "manufacturer": "Acme Corp",
  "leadTime": 3,
  "unspc": "53120000",
  "commodityCode": "12345678",
  "eccn": "EAR99",
  "freeShipping": false,
  "abilityOne": false,
  "madeInUsa": true,
  "greenProduct": false,
  "keyFeatures": ["Durable", "Lightweight"],
  "videos": null,
  "accountCode": "ACC-001",
  "programCode": "PROG-001",
  "resourceCode": "RES-001",
  "status": "PENDING_APPROVAL",
  "pendingRevision": null,
  "pendingRevisionSubmittedAt": null,
  "bulkImportJobId": null,
  "createdAt": "2026-01-15T12:00:00.000Z",
  "updatedAt": "2026-03-01T08:30:00.000Z",
  "variants": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440021",
      "productId": "550e8400-e29b-41d4-a716-446655440020",
      "sku": "WIDGET-001",
      "upc": "012345678905",
      "unitOfMeasure": "EA",
      "partNumber": "MPN-001",
      "name": "Default",
      "price": "29.99",
      "listPrice": "39.99",
      "vendorPrice": "19.99",
      "weight": "1.50",
      "initialInventory": 100,
      "attributes": { "color": "red" },
      "isActive": true,
      "createdAt": "2026-01-15T12:00:00.000Z",
      "updatedAt": "2026-03-01T08:30:00.000Z"
    }
  ],
  "images": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440022",
      "productId": "550e8400-e29b-41d4-a716-446655440020",
      "variantId": null,
      "url": "https://api.next.gcommerce.glass/assets/products/images/550e8400-e29b-41d4-a716-446655440022",
      "alt": "Widget Pro front view",
      "sortOrder": 0,
      "isPrimary": true
    }
  ],
  "documents": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440023",
      "productId": "550e8400-e29b-41d4-a716-446655440020",
      "title": "Spec sheet",
      "type": "spec",
      "url": "https://example.com/spec.pdf",
      "document": "https://api.next.gcommerce.glass/assets/products/widget-pro/docs/spec.pdf",
      "size": "245.50",
      "sortOrder": 0,
      "createdAt": "2026-01-15T12:00:00.000Z",
      "updatedAt": "2026-01-15T12:00:00.000Z"
    }
  ],
  "categories": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440070",
      "name": "Industrial Supplies",
      "slug": "industrial-supplies"
    }
  ],
  "collections": [],
  "tags": [],
  "facetValues": [],
  "reviews": [],
  "averageRating": 4.5,
  "totalReviews": 12
}

Status codes

200

OK

Request succeeded.

401

Unauthorized

Missing or invalid bearer token.

403

Forbidden

Insufficient permissions for this action.

400

Bad Request

Validation failed or invalid parameters.

404

Not Found

Resource not found.

429

Too Many Requests

Global rate limit exceeded (10,000 requests per 10 minutes per IP).

500

Internal Server Error

Unexpected server error.

403

Forbidden

No vendor membership, or insufficient vendor role (requires OWNER, ADMIN, or EDITOR for write operations).

**Admin approval:** New products are created as `PENDING_APPROVAL` and are not visible on storefronts until a platform admin approves them.
**Live product edits:** On `PUBLISHED` or `HIDDEN` products, changes to `name`, `shortDescription`, `description`, or `images` are staged in `pendingRevision` — the product stays `PUBLISHED` and the storefront keeps showing the current live data until an admin approves.
**Immediate updates:** Vendor price (cost) and MSRP, stock, slug, categories, variants, SEO fields, bulk-update fields, and other non-moderated fields apply immediately on live products without re-approval. The customer retail price (derived from vendor price × commission) also updates immediately.
Do not send a `status` field — it is rejected on vendor REST create/update and managed by the platform.
Poll `GET /vendor/products/:id` and inspect `pendingRevision` (non-null with staged fields). List filters: `?status=PENDING_APPROVAL` (never published), `?hasPendingRevision=true` (live products with staged edits), or `?needsModeration=true` (either case).
Set `variants[].vendorPrice` (cost) and, optionally, `variants[].listPrice` (MSRP). The customer-facing retail price is computed server-side as `vendorPrice × (1 + your commission %)`; any `price` you send is ignored, and each variant must include a `vendorPrice`.
Do not send `status` — it is server-managed. New products are always created as `PENDING_APPROVAL`.
When `leadTime` is omitted, the product inherits your vendor profile `leadTime` (default 4 days).
Vendor context is taken from your token — do not send `vendorId` in the body.
Product responses do not include `vendorId` or nested `vendor` objects — use the login response for vendor details.
`keyFeatures` accepts at most 6 items.
Categories are read-only for vendors. Pass existing UUIDs in `categoryIds`; invalid or unknown IDs are rejected.
Do not send product images in this body. After create, upload via [Add Product Image](/docs/v1/vendor/products/add-image) or [Replace Product Images](/docs/v1/vendor/products/replace-images) (multipart).

Try it

Uses your saved session from login. Edit values and send a live request, or copy the cURL command.