# Incentive Engine V3 APIs

Annex Cloud’s Incentive Engine helps to create rewards that can be used as marketing incentives by businesses either with loyalty programs or without loyalty programs. The benefits of these types of incentives could include a certain percentage off on a purchase or a specific amount discount. This type of incentive engine is used to attract and retain customers.

Annex Cloud incentive engine offers two types of redemptions-
Full Redemption & Partial Redemption

Full Redemption- Full redemption yields the reward points on a comprehensive basis. The redeemed incentives can offer discounts as a percentage or in the form of a fixed rate coupon. The format of the rewards can be provided as coupon codes and voucher codes.

Partial Redemption- A partial redemption allows rewards to be redeemed in portions - leaving the rest available to be redeemed later. This includes a redemption of rewards in the form of gift cards and store cards.

Version: 3.0.1

## Servers

```
https://s42.socialannex.net/apiv1/
```

## Download OpenAPI description

[Incentive Engine V3 APIs](https://annexcloud.redocly.app/_bundle/iem/iem.yaml)

## Incentive Codes

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift and store cards are for partial redemption. This API enables the creation of both full and partial redemption incentive codes, using a POST request method that is POST - /incentive/codes

### This API facilitates the generation of both full and partial

 - [POST /incentive/codes](https://annexcloud.redocly.app/iem/iem/incentive-codes/incentivecodes.md)

## Code Assign

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift and store cards are for partial redemption.

This API is used to assign incentive codes to members. The API for Code Assign uses the POST request method to assign incentive codes. POST - /incentive/assigncodes

### This API facilitates the assignment and reassignment of codes, sourced from Fixed or Dynamic groups to members

 - [POST /incentive/assigncode](https://annexcloud.redocly.app/iem/iem/code-assign/assigncodes.md)

## Code Validity

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift and store cards are for partial redemption.

This API method is used to check the validity of the incentive code assigned to the member. GET - /incentive/validatecode/incentiveCode

### Validate incentive code

 - [GET /incentive/validatecode/{{incentiveCode}}](https://annexcloud.redocly.app/iem/iem/code-validity/getcodevaliditydetails.md): This API method is used to check the validity of the incentive code assigned to the member.

## Code Update

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift and store cards are for partial redemption.

These API methods utilize the PATCH request method to modify code redemption status, code configuration, and batch details for the site. PATCH - /incentive/updatecodedetails/userId, PATCH - /incentive/updatecodeconfig/userId & PATCH - /incentive/updatebatchcodedetails/siteId

### Update code details

 - [PATCH /incentive/updatecodedetails/{{memberId}}](https://annexcloud.redocly.app/iem/iem/code-update/updatecodedetails.md): This API method facilitates both redemption and undo-redemption operations for incentive codes.

### Update code configurations

 - [PATCH /incentive/updatecodeconfig/{memberId}}](https://annexcloud.redocly.app/iem/iem/code-update/updatecodeconfig.md): The API method is designed for updating incentive code details, including status and value. Note that the "value" parameter is relevant only for partial redemption types.

### Update batch code details

 - [PATCH /incentive/updatebatchcodedetails/{{siteId}}](https://annexcloud.redocly.app/iem/iem/code-update/updatebatchcode.md): This API method facilitates the deduction of an amount from multiple gift cards or store credits. (It is designed to handle multiple redemption and undo redemption operations.)

## User Code Details

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift cards and store cards are for partial redemption.

These API methods are used to get details of the codes assigned to a member. POST - /incentive/usercodedetails & GET - /incentive/usercodedetails/{{userId}}

### Fetch Details of Codes

 - [POST /incentive/usercodedetails](https://annexcloud.redocly.app/iem/iem/user-code-details/postusercodedetails.md): This API method is used to fetch the details for the incentive codes that have been assigned to a member by passing the member’s user ID.

### Fetch Details of Code

 - [GET /incentive/usercodedetails/{{memberId}}](https://annexcloud.redocly.app/iem/iem/user-code-details/usercodedetailsuserid.md): This API method retrieves the details for incentive codes, including the associated code groups for the incentive codes assigned to a member by passing their User ID.

## Bulk Assignment

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift and store cards are for partial redemption. POST:/incentive/bulkassignment

### Bulk assignment

 - [POST /incentive/bulkassignment](https://annexcloud.redocly.app/iem/iem/bulk-assignment/postbulkassignment.md): This API facilitates the assignment of generated codes to multiple members within the system. It streamlines the process of distributing codes, ensuring efficient allocation to the intended recipients.

## Redemption Log

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift cards and store cards are for partial redemption.

This API retrieves details of redemption and undo redemption actions, offering counts of successful redemption or undo redemption requests. The counts can be provided for all requests within a specified period, or specific to each customer ID or voucher (code) ID. POST - /incentive/getredemptionlog

### Get count of Redemptions API

 - [POST /incentive/getredemptionlog](https://annexcloud.redocly.app/iem/iem/redemption-log/postredemptionlog.md): This API retrieves details regarding redemptions and undo-redemptions carried out within the system.

## Get All Incentive Groups

The Annex Cloud Incentive Engine empowers businesses to create marketing rewards, whether or not they have loyalty programs. These rewards, which may offer discounts on purchases, are redeemable in full or partially. Coupon and voucher codes are used for full redemption, while gift cards and store cards are for partial redemption.

This API method retrieves the details of the incentive code group, utilizing the GET request method to fetch information pertaining to the group. GET - /incentive/getincentivegroup/groupId & GET - /incentive/getallincentivegroups/all

### Group Details

 - [GET /incentive/getincentivegroup/{{groupId}}](https://annexcloud.redocly.app/iem/iem/get-all-incentive-groups/getallincentivegroups.md): This API is used to get details for a specific incentive code group by passing the Group ID.

### All Group Details

 - [GET /incentive/getallincentivegroups/{{all}}](https://annexcloud.redocly.app/iem/iem/get-all-incentive-groups/getallincentivegroupdetails.md): This API method is used to get details for all the incentive code groups by passing “all” as the path parameter.

