To update an existing vendor, send a PUT request to the endpoint with the company ID in the URL.
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.
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) |
{ "company": "Example", "email": "test@example.com", "shippings": { "1": "1" }, "commission": "0", "commission_type": "A" }
This request makes the following changes to the vendor:
{ "store_id": "2" }
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 |