Skip to content

Vendor Product Update

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

Vendor Product Update

Update a vendor-specific offer for a product in a multi-vendor marketplace: price, stock, availability, discount period and other vendor-level data.

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

Endpoint

PUT /shops/{shop_id}/products/{product_id}/vendors/{vendor_product_id}

SDK URL builder: window.API.PUT_EDIT_PRODUCT_VENDOR(...). Get vendor_product_id from Vendor Products List.

Permissions

This endpoint can only be used by the marketplace owner: the token needs the backoffice:product:write scope and access to the shop's Marketplace permission region. Vendors themselves cannot use this API to update their offers; they use their vendor panel (Vendor SDK).

Request body parameters

Name Type Required Description
raw_price number No Base price before commission and pricing logic.
price number No Final price (auto-calculated if pricing_id is provided).
pricing_id integer No Optional pricing plan ID to auto-calculate the price.
quantity integer No Available inventory for this vendor offer.
enable boolean No Whether this offer is active.
currency string No ISO currency code (for example USD).
commission number No Custom commission percentage.
discount number No Discount percentage.
dis_start date No Discount start date (YYYY-MM-DD).
dis_end date No Discount end date (YYYY-MM-DD).
variant_id integer No Product variant ID (only allowed if it is not already set).
lead integer No Lead time in days (use -1 if unknown).

Notes

  • variant_id can only be set while it is null. Once set, it cannot be changed.

  • If pricing_id is provided, the final price is calculated automatically, rounded according to the selected currency's rules:

    price = raw_price × (1 + commission%)
    

Example request

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

{
  "raw_price": 9.0,
  "pricing_id": 2,
  "quantity": 50,
  "enable": true,
  "currency": "USD",
  "commission": 10,
  "discount": 5,
  "dis_start": "2025-05-15",
  "dis_end": "2025-06-01",
  "lead": 2
}

Example response

{
  "success": true,
  "vendor_product": {
    "id": 789,
    "product_id": 456,
    "vendor_id": 10,
    "raw_price": 9.0,
    "price": 9.9,
    "currency": "USD",
    "quantity": 50,
    "enable": true,
    "discount": 5,
    "dis_start": "2025-05-15",
    "dis_end": "2025-06-01",
    "lead": 2,
    ...
  }
}

Possible errors

Error message Reason
You can not change this as the vendor! Only shop owners can update vendor offers.
Vendor product not found! The vendor_product_id is invalid.
You can not change variant_id... Attempted to change variant_id after it was already set.
This variant is already assigned... The vendor already offers this variant.
Pricing plan not found! Invalid pricing_id.

Related endpoints

Clone this wiki locally