API


4. Promotion Inquiry

Description : Inquiry promotion API is a promotion in the current merchant/store and at the current date where/when member is doing transaction. The promotion list must be promotions which are applicable for the member and the product that (s)he buys as well.

4.1 Custom Rule (Amount)

Description : Rule to get the point after amount, that apply as flexible as possible.
URL : https://sandbox.goodie.id/api-rest/promotion/inquiry
Method : POST
Header :
No Key Value Requirement Description
1 Content-type application/json M Security Header
2 authToken String M authentication
3 deviceUniqueId String M Device Id

Body :
No Parameter Value Requirement Description
1 memberId String M Member’s Id
2 merchantId String M Id of the merchant
3 storeId String O Store’s Id
4 custom
5 ruleName String M Custom rule’s name
6 Issuing Integer M Custom’s Issuing
7 Amount Integer M Custom’s amount

JSON Format :

{
    "memberId" : " CE38F7D7-23C4-4F81-B7B6-AA4B97567F20",
    "merchantId" : "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",
    "storeId" : "",
    "custom" :
    [
        {
            "ruleName" : "CUSTOM RULE API",
            "issuing" : 0,
            "amount" : 100000
        }
    ]
}
                        

No Status Description
1 0 Custom rule with amount type
2 1 Custom rule with issuing type

Response :
No Parameter Value Description
1 memberId String Member’s id
2 merchantId String Id of the merchant
3 memberName String Member’s name
4 storeId String Store’s id
5 transactionDate Date Member’s transaction date
6 transactionId String Member’s transaction id
7 totalPointIssuing Integer Member’s total point issuing
8 promotionNumberIssued
9 PromotionCode String Member’s promotion code
10 promotionName String Member’s promotion name
11 basicRuleName String Member’s basic rule name
12 basicRulePoint Integer Member’s basic rule point
13 customRulePoint
14 customRuleName String Member’s custom rule name
15 customRulePoint Integer Member’s custom rule point
16 abstractResponse
17 responseStatus String See details**
18 responseMessage String See details**

JSON Format :

{
    "memberId": " CE38F7D7-23C4-4F81-B7B6-AA4B97567F20",
    "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",
    "memberName": "Fitria utami",
    "storeId": "",
    "transactionDate": "2019-06-27",
    "transactionId": "",
    "totalPointIssuing": 10,
    "promotionNumberIssued": [
        {
            "promotionCode": "PRM32016001",
            "promotionName": "Unbelievable 2017",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "PRM92018003",
            "promotionName": "Promotion C",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": [
                {
                    "customRuleName": "Custom Rule C 1",
                    "customRulePoint": 10
                }
            ]
        }
    ],
    "abstractResponse": {
        "responseStatus": "INQ000",
        "responseMessage": "Inquiry success"
    }
}
                        


4.2 Custom Rule (Issuing)

Description : Rule to get the point after issuing, that apply as flexible as possible.
URL : https://sandbox.goodie.id/api-rest/promotion/inquiry
Method : POST
Header :
No Key Value Requirement Description
1 Content-type application/json M Security Header
2 authToken String M authentication
3 deviceUniqueId String M Device Id

Body :
No Parameter Value Requirement Description
1 memberId String M Member’s Id
2 merchantId String M Id of the merchant
3 storeId String O Store’s Id
4 custom
5 ruleName String M Member custom rule’s name
6 Issuing Integer M Member custom’s issuing

JSON Format :

{
    "memberId" : "CE38F7D7-23C4-4F81-B7B6-AA4B97567F20",
    "merchantId" : "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",
    "storeId" : "",
    "custom" :
    [
        {
            "ruleName" : "Opening Account BNI",
            "issuing" : 1
        }
    ]
}
                        

No Status Description
1 0 Custom rule with amount type
2 1 Custom rule with issuing type

Response :
No Parameter Value Description
1 memberId String Member’s id
2 merchantId String Id of the merchant
3 memberName String Member’s name
4 storeId String Store’s id
5 transactionDate Date Member’s transaction date
6 transactionId String Member’s transaction id
7 totalPointIssuing Integer Member’s total point issuing
8 promotionNumberIssued
9 PromotionCode String Member’s promotion code
10 promotionName String Member’s promotion name
11 basicRuleName String Member’s basic rule name
12 basicRulePoint Integer Member’s basic rule point
13 customRulePoints
14 customRuleName String Member’s custom rule name
15 customRulePoint Integer Member’s custom rule point
16 abstractResponse
17 responseStatus String See details**
18 responseMessage String See details**

JSON Format :

{
    "memberId": "CE38F7D7-23C4-4F81-B7B6-AA4B97567F20",
    "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",
    "memberName": "fitria utami",
    "storeId": "",
    "transactionDate": "2019-06-27",
    "transactionId": "",
    "totalPointIssuing": 2,
    "promotionNumberIssued": [
        {
            "promotionCode": "PRMBNI01",
            "promotionName": "Opening Account BNI Promotion",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": [
                {
                    "customRuleName": "Opening Account BNI",
                    "customRulePoint": 1
                }
            ]
        },
        {
            "promotionCode": "SAPP01",
            "promotionName": "Promotion BNI",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": [
                {
                    "customRuleName": "Opening Account BNI",
                    "customRulePoint": 1
                }
            ]
        },
        {
            "promotionCode": "test12312",
            "promotionName": "AStest22",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "test123",
            "promotionName": "AStest",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "Promo123",
            "promotionName": "Promo123",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "AsTest",
            "promotionName": "TestLifetime",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "AsTestPeriod",
            "promotionName": "TestPeriod",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "promo1",
            "promotionName": "test",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        }
    ],
    "abstractResponse": {
        "responseStatus": "INQ001",
        "responseMessage": "Redeem success"
    }
}
                        

4.3 Basic Rule

Description : rules to get the points that apply generally, divided into:

- Percentage, customer will get the point with percentage from total amount and maximum point set on maximum points.

- Fixed amount, customer will get a point with base loyalty point for each amount of and maximum point set on maximum points.

URL : https://sandbox.goodie.id/api-rest/promotion/inquiry
Method : POST
Header :
No Key Value Requirement Description
1 Content-type application/json M Security Header
2 authToken String M authentication
3 deviceUniqueId String M Device Id

Body :
No Parameter Value Requirement Description
1 memberId String M Member’s Id
2 merchantId String M Id of the merchant
3 storeId String O Store’s Id
4 Basic
5 productCode String O Merchant’s product code
6 totalTrxAmount String M Member’s total transaction
7 refNumber String M Member’s reference number

JSON Format :

{
    "memberId" : " CE38F7D7-23C4-4F81-B7B6-AA4B97567F20",
    "merchantId" : "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",
    "storeId" : "",
    "basic" :
    {
        "productCode": "BNIPC001",
        "totalTrxAmount" : 10000,
        "refNumber" : "FIT001TEST"
    }
}
                        

Response :
No Parameter Value Description
1 memberId String Member’s id
2 merchantId String Id of the merchant
3 memberName String Member’s name
4 storeId String Store’s id
5 transactionDate Date Member’s transaction date
6 transactionId String Member’s transaction id
7 totalPointIssuing Integer Member’s total point issuing
8 promotionNumberIssued
9 PromotionCode String Member’s promotion code
10 promotionName String Member’s promotion name
11 basicRuleName String Member’s basic rule name
12 basicRulePoint Integer Member’s basic rule point
13 customRulePoints
14 customRuleName String Member’s custom rule name
15 customRulePoint Integer Member’s custom rule point
16 abstractResponse
17 responseStatus String See details**
18 responseMessage String See details**

JSON Format :

{
    "memberId": "CE38F7D7-23C4-4F81-B7B6-AA4B97567F20",
    "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",
    "memberName": "fitria utami",
    "storeId": "",
    "transactionDate": "2019-06-27",
    "transactionId": "",
    "totalPointIssuing": 40,
    "promotionNumberIssued": [
        {
            "promotionCode": "PRMBNI01",
            "promotionName": "Opening Account BNI Promotion",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "SAPP01",
            "promotionName": "Promotion BNI",
            "basicRuleName": "Basic Rule BNI",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "test12312",
            "promotionName": "AStest22",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "test123",
            "promotionName": "AStest",
            "basicRuleName": "",
            "basicRulePoint": 0,
            "customRulePoints": []
        },
        {
            "promotionCode": "Promo123",
            "promotionName": "Promo123",
            "basicRuleName": "BNI New Basic Rule",
            "basicRulePoint": 10,
            "customRulePoints": []
        },
        {
            "promotionCode": "AsTest",
            "promotionName": "TestLifetime",
            "basicRuleName": "AsTestBasic",
            "basicRulePoint": 10,
            "customRulePoints": []
        },
        {
            "promotionCode": "AsTestPeriod",
            "promotionName": "TestPeriod",
            "basicRuleName": "AsTestBasic",
            "basicRulePoint": 10,
            "customRulePoints": []
        },
        {
            "promotionCode": "promo1",
            "promotionName": "test",
            "basicRuleName": "AsTestBasic",
            "basicRulePoint": 10,
            "customRulePoints": []
        }
    ],
    "abstractResponse": {
        "responseStatus": "INQ000",
        "responseMessage": "Inquiry success"
    }
}