Magento – Magento 2 REST API: Get list and details of all active coupons

coupon-codesmagento2rest api

Is there an API to get the list of all active coupon codes from magento 2?

/V1/coupons/search

this shows me all the coupons, but it doesn't give any information about if the coupon is active or it's description.

and

/V1/salesRules/search

This gives the details but not the coupon code.

Is there any way to get all details in a single api call?

Please help!

Thanks!

Best Answer

For your clarification, the coupon code in magento Don't have a separate "Active" Status and Description.

The Active Status and Description belongs to the SalesRules/CartPriceRule entity.

By Default there is no single api call which fetches all your details, but however you can implement a custom api for your needs.

Related Topic