Search
K
Product Inventory API

Retrieve a list of products

get
https://api.apiprimer.com/products

Response

200

Successful operation

get/products
 
200

Create a new product

post
https://api.apiprimer.com/products

Body

application/json
namestring

Name of the product

descriptionstring

Product description

pricenumber(float)

Price of the product

Response

201

Product created successfully

post/products

Body

{}
 
201

Retrieve a specific product by ID

get
https://api.apiprimer.com/products/{productId}

Path Parameters

productIdstringrequired

ID of the product to retrieve

Response

Successful operation

get/products/{productId}
 

Update an existing product

put
https://api.apiprimer.com/products/{productId}

Path Parameters

productIdstringrequired

ID of the product to update

Body

application/json
namestring

Name of the product

descriptionstring

Product description

pricenumber(float)

Price of the product

Response

Product updated successfully

put/products/{productId}

Body

{}
 

Delete a product

delete
https://api.apiprimer.com/products/{productId}

Path Parameters

productIdstringrequired

ID of the product to delete

Response

Product deleted successfully

delete/products/{productId}