Create a Vendor

Endpoint Overview

This endpoint allows you to create new vendors for your multi-vendor marketplace in Venddor. Vendors are third-party sellers who can list and sell products through your platform.

POST /api/vendors/

Creates a new vendor with the specified details.

Request Parameters

Pass the following parameters in the HTTP request body according to your specified Content-Type:

Basic Vendor Information

Parameter Type Required Description
company* string Yes The name of the vendor.
storefront* string Yes A unique identifier for the vendor's storefront. This field is required by REST API but doesn't serve any specific purpose.
company_description string No The description of the vendor. You can use HTML code here.
status string No The status of the vendor: N (new), A (active - default), P (pending), D (disabled).
lang_code string No A two-letter language code, for example, en.
Note: The storefront field must have a unique value for each vendor you create via REST API.

Contact Information

Parameter Type Required Description
email* string Yes Vendor's email address.
phone* string Yes Vendor's phone number.
url string No Vendor's website.
fax string No Vendor's fax number.

Address Information

Parameter Type Required Description
address* string Yes Vendor's address.
city* string Yes Vendor's city.
country* string Yes Vendor's country code (e.g., US).
state* string Yes Vendor's state code.
zipcode* string Yes Vendor's zip code.
Tip: You can find country and state codes in the Administration panel under Administration → Shipping & taxes → Countries and Administration → Shipping & taxes → States.

Moderation Settings

Parameter Type Required Description
pre_moderation string No If set to Y, any new products from the vendor will require approval by the store administrator.
pre_moderation_edit string No If set to Y, any updates of product information by the vendor will require approval by the store administrator.
pre_moderation_edit_vendors string No If set to Y, any updates of the vendor's profile will require prior approval by the store administrator.
Note: The pre_moderation fields will apply only if you configure the Vendor Data Premoderation add-on accordingly.

Additional Settings

Parameter Type Required Description
categories string No A comma-separated list of category IDs where the vendor is allowed to create products. If empty, the vendor can create products in any category.
shippings object No The shipping methods available to the vendor, as an object with shipping method IDs as values.
commission string No The size of the commission taken from vendor on every sale. Uses xx.xx format.
commission_type string No The type of commission: A (fixed amount) or P (percentage).
terms string No The text of vendor's terms and conditions. You can use HTML code here. (Added by the Vendor's Terms and Conditions add-on)

Example Request

{
  "company": "New Vendor",
  "company_description": "<p>This is the description of the new vendor.</p>",
  "storefront": "example.com",
  "status": "N",
  "lang_code": "en",
  "email": "test_vendor@example.com",
  "phone": "555555555",
  "url": "https://www.venddor.com.br",
  "fax": "+555555555",
  "address": "Boston street",
  "city": "Boston",
  "state": "MA",
  "country": "US",
  "zipcode": "02125",
  "pre_moderation": "Y",
  "pre_moderation_edit": "Y",
  "pre_moderation_edit_vendors": "N",
  "categories": "253,252",
  "shippings": {
    "1": "1",
    "2": "3"
  },
  "commission": "10.55",
  "commission_type": "A",
  "terms": "<p>These are the terms and conditions you must accept before you can buy products from New Vendor.</p>"
}

Response Format

Success Response (201 Created)

{
  "store_id": 2
}

Error Response (400 Bad Request)

Returned when the vendor couldn't be created due to invalid parameters or other issues.

Implementation Notes

When creating vendors, consider the following best practices:

Important: Some of the fields mentioned in this documentation might not be returned by GET requests, but they can still be used in POST or PUT requests.