Update a Vendor

Updating Vendor Information

PUT /api/vendors/{company_id}/

To update an existing vendor, send a PUT request to the endpoint with the company ID in the URL.

Request Example

PUT /api/vendors/2/

Include the vendor details in the HTTP request body according to the specified Content-Type. None of the fields are required.

Request Parameters

Parameter Type Required Description
company string No Company name
email string No Contact email address
shippings object No Shipping methods available to this vendor
commission string No Commission amount
commission_type string No Commission type ("A" for absolute value, "P" for percentage)

Example JSON Payload

{
  "company": "Example",
  "email": "test@example.com",
  "shippings": {
    "1": "1"
  },
  "commission": "0",
  "commission_type": "A"
}

This request makes the following changes to the vendor:

  • Changes the company name to "Example"
  • Updates the email address to "test@example.com"
  • Enables only the shipping method with ID 1 for this vendor
  • Sets the commission to 0 (no commission)
  • Sets the commission type to "A" (absolute value)

Response

{
  "store_id": "2"
}

Response Status Codes

Status Code Description
200 OK Vendor was updated successfully
400 Bad Request Invalid request parameters
404 Not Found Vendor with the specified ID does not exist