Products

Product management operations

Get all products

get
/products

Retrieves a list of all products.

Authorizations
accessTokenstringRequired
Query parameters
limitintegerOptional

The number of products to return.

Default: 10
offsetintegerOptional

The number of products to skip.

Default: 0
Responses
200

A list of products.

application/json
get
/products

Create a new product

post
/products

Creates a new product (retailer only).

Authorizations
accessTokenstringRequired
Body
namestringOptional
descriptionstringOptional
pricenumberOptional
discountedPricenumberOptional
stockintegerOptional
categoryIdstringOptional
brandstringOptional
isFeaturedbooleanOptional
product_imagesstring · binary[]Optional
Responses
post
/products

Get product by slug

get
/products/{slug}

Retrieves a product by its slug.

Authorizations
accessTokenstringRequired
Path parameters
slugstringRequired

The slug of the product to retrieve.

Responses
200

The product's information.

application/json
get
/products/{slug}

Update a product

put
/products/{productId}

Updates a product by its ID (retailer only).

Authorizations
accessTokenstringRequired
Path parameters
productIdstringRequired

The ID of the product to update.

Body
namestringOptional
descriptionstringOptional
pricenumberOptional
discountedPricenumberOptional
stockintegerOptional
categoryIdstringOptional
brandstringOptional
isFeaturedbooleanOptional
product_imagesstring · binary[]Optional
Responses
200

Product updated successfully.

application/json
put
/products/{productId}

Delete a product

delete
/products/{productId}

Deletes a product by its ID (retailer or admin only).

Authorizations
accessTokenstringRequired
Path parameters
productIdstringRequired

The ID of the product to delete.

Responses
delete
/products/{productId}

No content

Get products by retailer

get
/products/retailer/{retailerId}

Retrieves a list of products for a specific retailer.

Authorizations
accessTokenstringRequired
Path parameters
retailerIdstringRequired

The ID of the retailer.

Query parameters
limitintegerOptional

The number of products to return.

Default: 10
offsetintegerOptional

The number of products to skip.

Default: 0
Responses
200

A list of products.

application/json
get
/products/retailer/{retailerId}