Business Loyalty Plans Model

Action

Method

Resource

Description

Get all

GET

/loyalty_plans/loyalty_plan_id/businesses

Get all business loyalty plans.

Get

GET

/loyalty_plans/loyalty_plan_id/businesses/business_id

Get business loyalty plans by id.

Update

POST

/loyalty_plans/loyalty_plan_id/businesses/business_id

Update business loyalty plans.
Only admins

Create

POST

/loyalty_plans/loyalty_plan_id/businesses

Create business loyalty plans.

Delete

DELETE

/loyalty_plans/loyalty_plan_id/businesses/business_id

Delete business loyalty plans by id.

The loyalty plan model is composed of the following attributes:

Attribute

Type

Required

Description

whereable

id

Integer

No

Identifier of the Business loyalty plans

business_id

Integer

Yes

Identifier of the business

loyalty_plan_id

Integer

Yes

Identifier of the loyalty plan

redeems

Boolean

Yes

Allow redeems

accumulates

Bolean

Yes

Allow accumulates

redemption_rate

Float

No

Redemption rate of the loyalty plan

accumulation_rate

Float

No

Accumulation rate of the loyalty plan

maximum_redemption_type

Integer

No

Maximum redemption type of the loyalty plan:
1, 2

maximum_redemption_rate

Float

No

Maximum redemption rate of the loyalty plan

maximum_accumulation

Float

No

Maximum accumulation of the loyalty plan

expire_after_minutes

Integer

No

Expire after minutes of the loyalty plan

created_at

Timestamp

No

Date when the business loyalty plan was created

updated_at

Timestamp

No

Date when the business loyalty plan was updated