Skip to content

Vendor Product Add

Mehrdad Pajuhaan edited this page Oct 23, 2026 · 4 revisions

Vendor Product Add

Create a new vendor-specific offering for a product in a multi-vendor marketplace. Each vendor can offer a product (or one of its variants) with its own price, quantity and lead time.

Base URL: https://api.selldone.com Auth header: Authorization: Bearer YOUR_ACCESS_TOKEN

Endpoint

POST /shops/{shop_id}/products/{product_id}/vendors

SDK URL builder: window.API.POST_ADD_PRODUCT_VENDOR(shop_id, product_id).

Permissions

This endpoint is restricted to marketplace owners: the token needs the backoffice:product:write scope and access to the shop's Marketplace permission region. Vendors cannot add product offers themselves through this API.

Request body parameters

Name Type Required Description
vendor_id integer Yes ID of the vendor to assign the product to.
variant_id integer Optional Required if the product has variants.
raw_price number Yes Base price before applying pricing rules.
price number Yes Final sell price (ignored if pricing_id is used).
pricing_id integer Optional ID of a pricing plan to auto-calculate the price.
quantity integer Yes Initial inventory quantity.
lead integer Yes Delivery lead time in days (-1 if unknown).
enable boolean Optional Default: true. Whether the offer is active.
currency string Optional Must match the product currency (for example USD).
commission number Optional Optional vendor commission override.
discount number Optional Optional discount percentage.
dis_start date Optional Discount start date.
dis_end date Optional Discount end date.

Important notes

  • If the product has multiple variants, you must set variant_id.
  • Duplicate entries (same vendor and variant) are not allowed.
  • If a pricing_id is provided, price is calculated automatically as raw_price × (1 + commission%), rounded according to the currency format.
  • The currency must match the product's currency.

Example request

POST https://api.selldone.com/shops/123/products/456/vendors
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

{
  "vendor_id": 10,
  "variant_id": 3,
  "raw_price": 12.0,
  "pricing_id": 2,
  "quantity": 20,
  "lead": 5,
  "enable": true,
  "currency": "USD"
}

Example response

{
  "success": true,
  "vendor": {
    "id": 10,
    "name": "FreshBazaar"
  },
  "vendor_product": {
    "id": 88,
    "product_id": 456,
    "vendor_id": 10,
    "variant_id": 3,
    "raw_price": 12.0,
    "price": 13.2,
    "quantity": 20,
    "enable": true,
    "currency": "USD",
    "lead": 5,
    ...
  }
}

Possible errors

Error Description
Vendor not found The provided vendor_id does not exist.
Variant required The product has variants, but none was selected.
Duplicate vendor-product The vendor is already assigned to this product or variant.
Currency mismatch The offer currency does not match the product currency.
Pricing plan not found pricing_id is invalid.

Best practices

  • Check whether the product has variants before submitting.
  • Use pricing plans (pricing_id) for consistent commission handling across vendors.
  • Call Vendor Products List first to check for existing assignments.

Related endpoints

Clone this wiki locally