{
    "info": {
        "name": "Bumantara Open API",
        "description": "PPOB integration for partner companies — check Poin, top up, and purchase products.\n\nSet the collection variables `baseUrl`, `apiKey`, and `apiSecret` before sending requests. Find your API key and secret in your company dashboard under \"Poin Perusahaan → Kredensial Open API\".",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://tokoatlas.com/api/partner",
            "type": "string"
        },
        {
            "key": "apiKey",
            "value": "mbtk_xxxxxxxxxxxxxxxx",
            "type": "string"
        },
        {
            "key": "apiSecret",
            "value": "mbts_xxxxxxxxxxxxxxxx",
            "type": "string"
        },
        {
            "key": "transactionCode",
            "value": "",
            "type": "string"
        }
    ],
    "item": [
        {
            "name": "Check Poin",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "X-Api-Key",
                        "value": "{{apiKey}}",
                        "type": "text"
                    },
                    {
                        "key": "X-Api-Secret",
                        "value": "{{apiSecret}}",
                        "type": "text"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/saldo",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "saldo"
                    ]
                },
                "description": "Returns your company's current balance."
            }
        },
        {
            "name": "Top Up Poin",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "X-Api-Key",
                        "value": "{{apiKey}}",
                        "type": "text"
                    },
                    {
                        "key": "X-Api-Secret",
                        "value": "{{apiSecret}}",
                        "type": "text"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json",
                        "type": "text"
                    },
                    {
                        "key": "Accept",
                        "value": "application/json",
                        "type": "text"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/saldo/topup",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "saldo",
                        "topup"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"amount\": 500000\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                },
                "description": "Adds balance to your company's Poin. Minimum 10,000."
            }
        },
        {
            "name": "List Products",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "X-Api-Key",
                        "value": "{{apiKey}}",
                        "type": "text"
                    },
                    {
                        "key": "X-Api-Secret",
                        "value": "{{apiSecret}}",
                        "type": "text"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/products?q=tri&provider=&page=1&rows=100",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "products"
                    ],
                    "query": [
                        {
                            "key": "q",
                            "value": "tri"
                        },
                        {
                            "key": "provider",
                            "value": ""
                        },
                        {
                            "key": "page",
                            "value": "1"
                        },
                        {
                            "key": "rows",
                            "value": "100"
                        }
                    ]
                },
                "description": "Lists available PPOB products with their selling price."
            }
        },
        {
            "name": "Buy Product",
            "request": {
                "method": "POST",
                "header": [
                    {
                        "key": "X-Api-Key",
                        "value": "{{apiKey}}",
                        "type": "text"
                    },
                    {
                        "key": "X-Api-Secret",
                        "value": "{{apiSecret}}",
                        "type": "text"
                    },
                    {
                        "key": "Content-Type",
                        "value": "application/json",
                        "type": "text"
                    },
                    {
                        "key": "Accept",
                        "value": "application/json",
                        "type": "text"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/transactions",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "transactions"
                    ]
                },
                "body": {
                    "mode": "raw",
                    "raw": "{\n    \"product_code\": \"TRS2\",\n    \"target_number\": \"0895347740321\",\n    \"partner_reference\": \"ORDER-1001\"\n}",
                    "options": {
                        "raw": {
                            "language": "json"
                        }
                    }
                },
                "description": "Purchases a PPOB product. The product's price is deducted from your Poin."
            }
        },
        {
            "name": "Check Transaction Status",
            "request": {
                "method": "GET",
                "header": [
                    {
                        "key": "X-Api-Key",
                        "value": "{{apiKey}}",
                        "type": "text"
                    },
                    {
                        "key": "X-Api-Secret",
                        "value": "{{apiSecret}}",
                        "type": "text"
                    }
                ],
                "url": {
                    "raw": "{{baseUrl}}/transactions/{{transactionCode}}",
                    "host": [
                        "{{baseUrl}}"
                    ],
                    "path": [
                        "transactions",
                        "{{transactionCode}}"
                    ]
                },
                "description": "Returns the current status of a transaction you created."
            }
        }
    ]
}