Earning Coupon Code

The Earning Coupon Code API allows users to earn points by entering a unique code. Each code can only be used once. There are two types of codes: a long code and a short code. Please coordinate with our Account Executive to decide which type of code you will use. Additionally, ensure that you have determined where the code will be applied and the value associated with it.

Coordination is required to select the appropriate code type and ensure the correct configuration for the code's usage and associated reward value.

Earning Coupon Code

POST /earning/coupon-code

Unlike other Earning by Purchase, this one does not use the amount as the primary factor for earning points. Instead, the unique code is the key to the transaction.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

client_code

string

client identifier

tracking_code

string

Unique code

phone_number

string

phone number of the customer

Response

{
    "status": "success",
    "status_code": 200,
    "message": "Earning success.",
    "data": [
        {
            "id": 16,
            "card_type_multiplier": 2,
            "receipt_number": "EA/18/00000012",
            "transaction_date": "2018-08-20",
            "amount": 255000,
            "points": {
                "redeem_point": {
                    "regular": 510,
                    "reward": 0,
                    "bonus": 0
                },
                "lucky_draw_point": {
                    "regular": 5,
                    "reward": 0,
                    "bonus": 0
                },
                "lucky_draw_numbers": {
                    "from": "0000000315",
                    "to": "0000000319"
                }
            },
            "receipt_type": "combine",
            "posted_by": "admin",
            "status": "success",
            "voided": {
                "by": null,
                "at": null
            },
            "adjusted": {
                "by": null,
                "at": null
            },
            "card_type": {
                "id": 9,
                "name": "Grand Indonesia Gold Card",
                "target_amount": 500000,
                "minimum_expense": 2000000,
                "multiplier_point": 2,
                "expired_period": 365,
                "level_up_evaluation_days": 20,
                "level_down_evaluation_days": 20,
                "default": false,
                "active": true,
                "image": null
            },
            "details": [
                {
                    "id": 46,
                    "transaction_date": "2018-08-20 11:38:00",
                    "amount": 150000,
                    "note": "Example Note",
                    "invoice_photo": "http://localhost/loyalto/public/uploads/earning/invoice-photo/JHJH8NV08L-1540445900.png",
                    "store": {
                        "id": 4,
                        "code": "001",
                        "name": "KFC",
                        "contact_name": null,
                        "contact_email": null,
                        "contact_phone": null,
                        "note": "",
                        "unit": null,
                        "floor": 0,
                        "longitude": 0,
                        "latitude": 0,
                        "altitude": 0,
                        "image": "http://localhost/loyalto/public/uploads/store/photo/BWMUIYS80Y-1534176249.jpg"
                    },
                    "payment": {
                        "id": 5,
                        "code": "001",
                        "name": "Cash"
                    }
                },
                {
                    "id": 47,
                    "transaction_date": "2018-08-20 11:38:00",
                    "amount": 5000,
                    "note": "Example Note",
                    "invoice_photo": null,
                    "store": {
                        "id": 9,
                        "code": "002",
                        "name": "McD",
                        "contact_name": "Jimmy Setiawan",
                        "contact_email": "[email protected]",
                        "contact_phone": "081385183353",
                        "note": "",
                        "unit": null,
                        "floor": 0,
                        "longitude": 0,
                        "latitude": 0,
                        "altitude": 0,
                        "image": null
                    },
                    "payment": {
                        "id": 7,
                        "code": "003",
                        "name": "Credit BCA"
                    }
                },
                {
                    "id": 48,
                    "transaction_date": "2018-08-20 11:38:00",
                    "amount": 100000,
                    "note": "Example Note",
                    "invoice_photo": null,
                    "store": {
                        "id": 10,
                        "code": "003",
                        "name": "Timezone",
                        "contact_name": "Jimmy Setiawan",
                        "contact_email": "[email protected]",
                        "contact_phone": "081385183353",
                        "note": "",
                        "unit": null,
                        "floor": 0,
                        "longitude": 0,
                        "latitude": 0,
                        "altitude": 0,
                        "image": null
                    },
                    "payment": {
                        "id": 6,
                        "code": "002",
                        "name": "Debit BCA"
                    }
                }
            ]
        }
    ]
}

Last updated