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
chevron-right
200

A list of products.

application/json
limitintegerOptional
offsetintegerOptional
totalintegerOptional
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
chevron-right
200

The product's information.

application/json
_idstring · objectidRead-onlyOptional

Unique identifier for the product.

namestringOptional

The name of the product.

descriptionstringOptional

A description of the product.

slugstringRead-onlyOptional

The slug for the product URL.

pricenumber · floatOptional

The price of the product.

discountedPricenumber · floatOptional

The discounted price of the product.

stockintegerOptional

The number of items in stock.

categorystring · objectidOptional

The ID of the category this product belongs to.

brandstringOptional

The brand of the product.

isFeaturedbooleanOptional

Whether the product is featured.

retailerstring · objectidOptional

The ID of the retailer who owns this product.

likesCountintegerOptional

The number of likes for the product.

commentsCountintegerOptional

The number of comments for the product.

createdAtstring · date-timeOptional

The date and time the product was created.

updatedAtstring · date-timeOptional

The date and time the product was last updated.

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
chevron-right
200

Product updated successfully.

application/json
_idstring · objectidRead-onlyOptional

Unique identifier for the product.

namestringOptional

The name of the product.

descriptionstringOptional

A description of the product.

slugstringRead-onlyOptional

The slug for the product URL.

pricenumber · floatOptional

The price of the product.

discountedPricenumber · floatOptional

The discounted price of the product.

stockintegerOptional

The number of items in stock.

categorystring · objectidOptional

The ID of the category this product belongs to.

brandstringOptional

The brand of the product.

isFeaturedbooleanOptional

Whether the product is featured.

retailerstring · objectidOptional

The ID of the retailer who owns this product.

likesCountintegerOptional

The number of likes for the product.

commentsCountintegerOptional

The number of comments for the product.

createdAtstring · date-timeOptional

The date and time the product was created.

updatedAtstring · date-timeOptional

The date and time the product was last updated.

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
chevron-right
200

A list of products.

application/json
limitintegerOptional
offsetintegerOptional
totalintegerOptional
get
/products/retailer/{retailerId}

Last updated