ocbc_cards.Rd
This function makes the information from the OCBC Cards category APIs easily accessible in an R-readable format.
There are 5 different categories, each with their own unique API
1. Credit Cards
2. Credit Card Advisor
3. Credit Card Promotions
4. Debit Card Advisor
5. Rewards Catalogue
ocbc_cards( card_type = c("Credit", "Credit Advisor", "Credit Promotions ", "Debit Advisor", "Rewards"), acctoken, country = NULL, product_type = NULL, keyword = NULL, tag = NULL, name = NULL, address = NULL, page = NULL, limit = 10, category = NULL, merchant = NULL, price = NULL )
card_type | The card category, hence the API that the function will call from. Required. Options are Credit, Credit Advisor, Credit Promotions, Debit Advisor and Rewards. Note: it is recommended to only specify 1 card type at a time. |
---|---|
acctoken | Account token. Required. Users can sign up for their api key, api secret and account token at https://api.ocbc.com/store/home |
country | Country for which available credit cards products are retrieved. Currently supported only for Malaysia (MY). Optional. Note: Parameter for 'Credit' category only. If specified for other categories, this parameter will be automatically ignored. |
product_type | Product type. Optional. Note: Parameter for 'Credit' category only. If specified for other categories, this parameter will be automatically ignored. |
keyword | Recommend a credit or debit card based on this keyword. Optional. Note: Parameter for 'Credit Advisor' and 'Debit Advisor categories only. |
tag | Filter promotions by categories and subcategories. Optional. Note: Parameter for 'Credit Promotions category only. |
name | Filter promotions by merchant names. Optional. Note: Parameter for 'Credit Promotions category only. |
address | Filter promotions by address. Optional. Note: Parameter for 'Credit Promotions category only. |
page | Specify page number for paginated response. Optional. Note: Parameter for 'Credit Promotions' and 'Rewards Catalogue' category only. |
limit | Number of promotion entries to return per page. Default = 10. Optional. Note: Parameter for 'Credit Promotions' and 'Rewards Catalogue' category only. |
category | Filter rewards by categories (e.g: retail, dining, entertainment, travel, other). Optional. Note: Parameter for 'Rewards Catalogue' category only. |
merchant | Filter rewards by merchant names. Optional. Note: Parameter for 'Rewards Catalogue' category only. |
price | Filter maximum OCBC$ cost of rewards. Optional. Note: Parameter for 'Rewards Catalogue' category only. |
A detailed dataframe of OCBC card categories with information related to the category specified (e.g A dataframe with information such as merchant, redemption item and validity date of each reward). For the 'Credit Promotions' category, the function returns a list of 2 dataframes: one of the information of the promotions and the other the terms and conditions.
#>#> # A tibble: 27 x 10 #> merchantName merchantDesc redemptionItem price validityDate instruction #> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 313@somerset Embracing S… S$10 313@some… 3900 Valid from … Please vis… #> 2 AsiaMalls "" S$10 Asiamall… 3900 Valid from … Please vis… #> 3 BEST Denki Best Denki … S$10 BEST Den… 3500 Valid from … Please app… #> 4 Caltex The Caltex … S$10 Petrol V… 3500 Valid from … Please app… #> 5 City Square… "" S$10 City Squ… 3900 Valid from … Please app… #> 6 Courts Courts star… S$10 off your… 3700 Valid from … Please app… #> 7 Creative Ea… As one of S… S$10 off your… 3500 Valid from … Please app… #> 8 Malls of Fr… Frasers Pro… S$10 Frasers … 3900 Valid from … Please app… #> 9 Gurney Drive "" S$10 off your… 3700 Valid from … "" #> 10 Hotel Fort … Hotel Fort … S$10 Hotel Fo… 3500 Valid from … Please app… #> # … with 17 more rows, and 4 more variables: outlets <chr>, terms <chr>, #> # image <chr>, category <chr>