PointReward

Menampilkan point reward

post
Body
user_idstringRequiredExample: +6285228990120
outlet_idstringRequiredExample: OTL-001
Responses
200

Data point reward berhasil ditampilkan

application/json
post
/pointreward/show
POST /api/pointreward/show HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Accept: */*
Content-Length: 50

{
  "user_id": "+6285228990120",
  "outlet_id": "OTL-001"
}
[
  {
    "point_reward_id": "text",
    "user_id": "text",
    "outlet_id": "text",
    "name": "text",
    "description": "text",
    "create_dtm": "2025-12-06T06:02:56.120Z",
    "points": 1,
    "is_active": "Yes"
  }
]

Menambahkan point reward

post
Body
user_idstringRequiredExample: +6285228990120
outlet_idstringRequiredExample: OTL-001
namestringRequiredExample: Loyalty Program 1
loyalty_typestringOptionalExample: spending
total_spendnumberOptionalExample: 50000
buy_productsstring[]OptionalExample: ["PRD-001","PRD-002"]
buy_categorystringOptionalExample: CAT-001
points_gainintegerOptionalExample: 10
new_member_pointsintegerOptionalExample: 5
reward_liststring[]OptionalExample: ["Voucher 10%","Produk Gratis"]
reward_categorystringOptionalExample: Voucher
start_dtmstring · date-timeOptionalExample: 2025-06-01T00:00:00Z
end_dtmstring · date-timeOptionalExample: 2025-12-31T23:59:59Z
is_activestringOptionalExample: Yes
send_validation_codestringOptionalExample: No
Responses
200

Berhasil menambahkan point reward

application/json
post
/pointreward/add
POST /api/pointreward/add HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Accept: */*
Content-Length: 412

{
  "user_id": "+6285228990120",
  "outlet_id": "OTL-001",
  "name": "Loyalty Program 1",
  "loyalty_type": "spending",
  "total_spend": 50000,
  "buy_products": [
    "PRD-001",
    "PRD-002"
  ],
  "buy_category": "CAT-001",
  "points_gain": 10,
  "new_member_points": 5,
  "reward_list": [
    "Voucher 10%",
    "Produk Gratis"
  ],
  "reward_category": "Voucher",
  "start_dtm": "2025-06-01T00:00:00Z",
  "end_dtm": "2025-12-31T23:59:59Z",
  "is_active": "Yes",
  "send_validation_code": "No"
}
{
  "user_id": "text",
  "message": "point reward created"
}

Set point reward

post
Body
user_idstringRequiredExample: +6285228990120
outlet_idstringRequiredExample: OTL-001
reward_idstringRequiredExample: RWD-01
is_activestringRequiredExample: Yes
Responses
200

Point reward berhasil diaktifkan/nonaktifkan

application/json
post
/pointreward/set
POST /api/pointreward/set HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "user_id": "+6285228990120",
  "outlet_id": "OTL-001",
  "reward_id": "RWD-01",
  "is_active": "Yes"
}
{
  "user_id": "text",
  "message": "Point reward set"
}

Update point reward

post
Body
user_idstringRequiredExample: +6285228990120
outlet_idstringRequiredExample: OTL-001
reward_idstringRequiredExample: RWD-01
namestringRequiredExample: Loyalty 50rb
loyalty_typestringOptionalExample: Spend
total_spendintegerOptionalExample: 50000
buy_productsstringOptionalExample: P-001,P-002
buy_categorystringOptionalExample: KAT-001
points_gainintegerOptionalExample: 5
new_member_pointsintegerOptionalExample: 10
reward_liststringOptionalExample: voucher,gratis produk
reward_categorystringOptionalExample: Umum
start_dtmstring · date-timeOptionalExample: 2025-06-01T00:00:00Z
end_dtmstring · date-timeOptionalExample: 2025-12-31T23:59:59Z
is_activestringOptionalExample: Yes
send_validation_codestringOptionalExample: No
Responses
200

Point reward berhasil diperbarui

application/json
post
/pointreward/update
POST /api/pointreward/update HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Accept: */*
Content-Length: 406

{
  "user_id": "+6285228990120",
  "outlet_id": "OTL-001",
  "reward_id": "RWD-01",
  "name": "Loyalty 50rb",
  "loyalty_type": "Spend",
  "total_spend": 50000,
  "buy_products": "P-001,P-002",
  "buy_category": "KAT-001",
  "points_gain": 5,
  "new_member_points": 10,
  "reward_list": "voucher,gratis produk",
  "reward_category": "Umum",
  "start_dtm": "2025-06-01T00:00:00Z",
  "end_dtm": "2025-12-31T23:59:59Z",
  "is_active": "Yes",
  "send_validation_code": "No"
}
{
  "user_id": "text",
  "message": "point reward edit successfully"
}

Hapus point reward

post
Body
user_idstringRequiredExample: +6285228990120
outlet_idstringRequiredExample: OTL-001
reward_idstringRequiredExample: RWD-01
Responses
200

Point reward berhasil dihapus

application/json
post
/pointreward/del
POST /api/pointreward/del HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "user_id": "+6285228990120",
  "outlet_id": "OTL-001",
  "reward_id": "RWD-01"
}
{
  "user_id": "text",
  "message": "point reward delete"
}

Last updated

Was this helpful?