API


5. Promotion Posting

Description : Posting promotion API is used for getting the point after the mobile hit API Promotion Inquiry.

5.1 Custom Rule (Amount)

Description : Rule to get the point after amount, that apply as flexible as posibble.
URL : https://sandbox.goodie.id/api-rest/promotion/posting
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"
}}
                        


5.2 Custom Rule (Issuing)

Description :
URL : https://sandbox.goodie.id/api-rest/promotion/posting
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
        }
    ]
}
                        

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": "45F1D2D1-30D5-43ED-B173-50E5644ED516",
    "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"
    }
}
                        

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

5.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/posting
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": "E8690CAC-4EF7-43B5-828C-8173078BEA38",
    "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": "INQ001",
        "responseMessage": "Redeem success"
    }
}