Sell a Product - Venddor API

← Back to API Documentation
POST {{baseUrl}}/Products

This endpoint allows a seller to list a product for sale that already exists in the Universal Bank. Unlike creating a product in the Universal Bank (which requires administrator credentials), this endpoint is used by individual sellers to offer their inventory of existing products.

Note: You must use the credentials of the seller who wants to list the product for sale.

Request Headers

Header Value Description
Authorization Basic Auth Base64 encoded username:password combination of the seller

Request Body Parameters

You can send up to 60 products per request.

Parameter Type Required Description
product* string Yes Product name
product_code* string Yes Barcode/SKU of the product to be sold (used as the primary key to identify the product)
category_ids* array Yes Array of category IDs the product belongs to
price* string Yes Unit price of the product
amount* string Yes Available stock quantity

Example Request

{
  "product": "Test Product Name",
  "product_code": "product_code",
  "category_ids": ["1447"],
  "price": "1000",
  "amount": "50"
}

Response

The endpoint returns the ID of the newly listed product(s).

Example Response

{
  "product_id": 973732,
  "product_ids": [
    973732
  ]
}
Tip: This endpoint allows sellers to create product listings based on products that already exist in the Universal Bank. If the product doesn't exist in the Universal Bank yet, an administrator needs to create it first using the Create Product in Universal Bank endpoint.
Important: Make sure the product code exactly matches the one in the Universal Bank. If it doesn't match any existing product, the request will fail.