PointReward
Body
user_idstringRequiredExample:
+6285228990120outlet_idstringRequiredExample:
OTL-001Responses
200
Data point reward berhasil ditampilkan
application/json
500
Gagal menampilkan data point reward karena error internal
post
/pointreward/showPOST /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"
}
]Body
user_idstringRequiredExample:
+6285228990120outlet_idstringRequiredExample:
OTL-001namestringRequiredExample:
Loyalty Program 1loyalty_typestringOptionalExample:
spendingtotal_spendnumberOptionalExample:
50000buy_productsstring[]OptionalExample:
["PRD-001","PRD-002"]buy_categorystringOptionalExample:
CAT-001points_gainintegerOptionalExample:
10new_member_pointsintegerOptionalExample:
5reward_liststring[]OptionalExample:
["Voucher 10%","Produk Gratis"]reward_categorystringOptionalExample:
Voucherstart_dtmstring · date-timeOptionalExample:
2025-06-01T00:00:00Zend_dtmstring · date-timeOptionalExample:
2025-12-31T23:59:59Zis_activestringOptionalExample:
Yessend_validation_codestringOptionalExample:
NoResponses
200
Berhasil menambahkan point reward
application/json
500
Gagal menambahkan point reward karena error internal
post
/pointreward/addPOST /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"
}Body
user_idstringRequiredExample:
+6285228990120outlet_idstringRequiredExample:
OTL-001reward_idstringRequiredExample:
RWD-01is_activestringRequiredExample:
YesResponses
200
Point reward berhasil diaktifkan/nonaktifkan
application/json
500
Terjadi kesalahan saat memperbarui point reward
post
/pointreward/setPOST /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"
}Body
user_idstringRequiredExample:
+6285228990120outlet_idstringRequiredExample:
OTL-001reward_idstringRequiredExample:
RWD-01namestringRequiredExample:
Loyalty 50rbloyalty_typestringOptionalExample:
Spendtotal_spendintegerOptionalExample:
50000buy_productsstringOptionalExample:
P-001,P-002buy_categorystringOptionalExample:
KAT-001points_gainintegerOptionalExample:
5new_member_pointsintegerOptionalExample:
10reward_liststringOptionalExample:
voucher,gratis produkreward_categorystringOptionalExample:
Umumstart_dtmstring · date-timeOptionalExample:
2025-06-01T00:00:00Zend_dtmstring · date-timeOptionalExample:
2025-12-31T23:59:59Zis_activestringOptionalExample:
Yessend_validation_codestringOptionalExample:
NoResponses
200
Point reward berhasil diperbarui
application/json
500
Gagal memperbarui point reward
post
/pointreward/updatePOST /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"
}Body
user_idstringRequiredExample:
+6285228990120outlet_idstringRequiredExample:
OTL-001reward_idstringRequiredExample:
RWD-01Responses
200
Point reward berhasil dihapus
application/json
500
Gagal menghapus point reward
post
/pointreward/delPOST /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?