Skip to content

Instantly share code, notes, and snippets.

@micnguyen
Last active September 21, 2015 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save micnguyen/ca3097c7f3f209a4ed3a to your computer and use it in GitHub Desktop.
Save micnguyen/ca3097c7f3f209a4ed3a to your computer and use it in GitHub Desktop.

CitiBank API Analysis:

RETAIL BANKING

/login/

  • Input Data: Username/Password
  • Output:
{
  "is_eligible_for_offers": "Y",
  "is_person_to_person_required": "Y",
  "token": "62114fce-04c5-457f-b850-7ba3aa7ca2c3",
  "username": "impatiencesnuffle"
}
  • Notes: Use token (Bearer token) for all future API calls

/accounts/

  • Gets a list of all the accounts and their information tied to a particular user.
  • Of Note: Balances, Type of product.
[
  {
    "account_status": "ACTIVE",
    "balances": [
      {
        "available": 1222.8800000000003,
        "current": 3949.0299999999997,
        "ledger": -533.5600000000001
      }
    ],
    "category_code": 1,
    "cops_indicator": "N",
    "details_exist": "Y",
    "display_acct_no": "123",
    "id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "is_destination_account": "N",
    "is_source_account": "Y",
    "offers_indicator": "N",
    "product_currency": "USD",
    "product_description": "Interest Checking",
    "product_type": 187,
    "txn_exist": "Y"
  },
  {
    "account_status": "ACTIVE",
    "balances": [
      {
        "available": 8299.489999999998,
        "current": 11565.46,
        "ledger": 53.61000000000009
      }
    ],
    "category_code": 1,
    "cops_indicator": "N",
    "details_exist": "Y",
    "display_acct_no": "124",
    "id": "63e84046-879c-4209-bf4a-13a94386d6da",
    "is_destination_account": "N",
    "is_source_account": "Y",
    "offers_indicator": "N",
    "product_currency": "USD",
    "product_description": "Insured Money Market",
    "product_type": 187,
    "txn_exist": "Y"
  }
]

/accounts/{id}

  • Gets the same information as /accounts/ but for a particular account id.

/accounts/{id}/balances

  • Gets the 'balances' field for a particular account id.

/accounts/{id}/transactions

  • Gets all transactions for an account ID:
  • Of Note: Description, Transaction Type,
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-02-13:40:40",
    "description": "TRANSFER FROM CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-02-13:40:40 string",
    "formatted_amount": "$1",
    "id": "e0631d81-fc6e-45f1-a282-391769c95208",
    "payment_method": "",
    "pending_date": "2015-04-02-13:40:40",
    "transaction_amount": 1,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-02-13:44:49",
    "description": "TRANSFER FROM CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-02-13:44:49 string",
    "formatted_amount": "$1",
    "id": "fc73a7c0-03b9-4992-8d96-64c814b1edc2",
    "payment_method": "",
    "pending_date": "2015-04-02-13:44:49",
    "transaction_amount": 1,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-02-13:46:31",
    "description": "TRANSFER FROM CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-02-13:46:31 string",
    "formatted_amount": "$1",
    "id": "daa58e92-68e8-4aab-ae47-7866953a8b78",
    "payment_method": "",
    "pending_date": "2015-04-02-13:46:31",
    "transaction_amount": 1,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-02-13:46:55",
    "description": "TRANSFER FROM CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-02-13:46:55 string",
    "formatted_amount": "$2",
    "id": "103b75e8-0912-4d0c-9fe7-0520185f3977",
    "payment_method": "",
    "pending_date": "2015-04-02-13:46:55",
    "transaction_amount": 2,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-02-13:47:10",
    "description": "TRANSFER FROM CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-02-13:47:10 string",
    "formatted_amount": "$2",
    "id": "c5e8bb4e-ee6d-429f-b52d-a57f83555042",
    "payment_method": "",
    "pending_date": "2015-04-02-13:47:10",
    "transaction_amount": 2,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-06-02:49:43",
    "description": "TRANSFER TO CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-06-02:49:43 sss",
    "formatted_amount": "$100",
    "id": "81408d5b-2e27-4812-9af4-7929f96c1131",
    "payment_method": "",
    "pending_date": "2015-04-06-02:49:43",
    "transaction_amount": 100,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-06-02:56:29",
    "description": "TRANSFER TO CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-06-02:56:29 sss",
    "formatted_amount": "$100",
    "id": "56db251c-fd16-4a14-b831-a4f1f7786404",
    "payment_method": "",
    "pending_date": "2015-04-06-02:56:29",
    "transaction_amount": 100,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },
  {
    "account_id": "60e6874a-3c6d-4093-b5f1-0878fab6b87c",
    "activity": "",
    "check_image_eligible": "N",
    "date_posted": "2015-04-06-06:06:32",
    "description": "TRANSFER TO CHECKING ACCOUNT 60e6874a-3c6d-4093-b5f1-0878fab6b87c 2015-04-06-06:06:32 sss",
    "formatted_amount": "$100",
    "id": "84d35565-12f0-4e82-b764-ec8bd6bd6485",
    "payment_method": "",
    "pending_date": "2015-04-06-06:06:32",
    "transaction_amount": 100,
    "transaction_identifier": "",
    "transaction_index": "",
    "transaction_type": ""
  },

/payee_types

  • Get a list of payee types supported by bank (?)
[
  {
    "id": "733ccc5a-ags3-a344-htte-f25d6193de82",
    "value": "Payee Type 1"
  },
  {
    "id": "a4ager34-awet-34aj-ai5s-f25d6193de82",
    "value": "Payee Type 2"
  }
]

/payees

  • List of payee details
  {
    "add_payee_details": [
      {
        "prefix": "Payment Method :",
        "value": "Check"
      },
      {
        "prefix": "Last Payment:",
        "value": "23.00"
      }
    ],
    "bank_name_ext": "NOV_MOBILE",
    "detail_prefix": "Last Payment",
    "last_payment_amt": 23,
    "payee_account": "",
    "payee_description": "NOV_PAYEE",
    "payee_id": "6d598c9b-dfgh-4370-b737-f30748dfa2c7",
    "payee_list_id_2": 3,
    "payee_list_id_type": 1,
    "payee_type": 1,
    "payment_method": "Check"
  },
  {
    "add_payee_details": [
      {
        "prefix": "Payment Method :",
        "value": "Check"
      },
      {
        "prefix": "Last Payment:",
        "value": "0.00"
      },
      {
        "prefix": "Next Payment:",
        "value": "$5.00 on 08-28-2014"
      }
    ],
    "bank_name_ext": "OCT_MOBILE",
    "detail_prefix": "Last Payment",
    "last_payment_amt": 0,
    "payee_account": "",
    "payee_description": "OCT_PAYEE",
    "payee_id": "6d598c9b-fghj-4370-b737-f30748dfa2c7",
    "payee_list_id_2": 1,
    "payee_list_id_type": 1,
    "payee_type": 1,
    "payment_method": "Check"
  },
  {
    "add_payee_details": [
      {
        "prefix": "Payment Method :",
        "value": "Check"
      },
      {
        "prefix": "Last Payment:",
        "value": "10.00"
      },
      {
        "prefix": "Next Payment:",
        "value": "$115.00 on 09-28-2014"
      }
    ],
    "bank_name_ext": "SEPT_MOBILE",
    "detail_prefix": "Last Payment",
    "last_payment_amt": 110.18,
    "payee_account": "",
    "payee_description": "SEPT_PAYEE",
    "payee_id": "6d598c9b-ghjk-4370-b737-f30748dfa2c7",
    "payee_list_id_2": 2,
    "payee_list_id_type": 1,
    "payee_type": 1,
    "payment_method": "Check"
  },

/account/{id}/fund_transfers

  • Submit funds transfer to payee or account
  • QUESTION: Need some clarification of some of the fields. What is destination_id, payee_id, payee_type, payment_type

/foreign_currency

  • Get current fx rate between currencies
  • Can get specific, or a list of them via parameter
[
  {
    "from_currency": "USD",
    "id": "a72c5caf-edac-4900-9b07-606cde3ad555",
    "rate": 0.65,
    "to_currency": "GBP"
  },
  {
    "from_currency": "GBP",
    "id": "806e001f-840a-4f72-9700-f0286918972d",
    "rate": 1.55,
    "to_currency": "USD"
  },
  {
    "from_currency": "USD",
    "id": "981da975-1d2a-4269-9d47-2fbc4ae21ad5",
    "rate": 0.88,
    "to_currency": "EUR"
  },
]

/catalog/

  • Get a list of reward items for redemption
  • Can filter by item category
[
  {
    "item_category": "Shopping",
    "item_code": "1A002136",
    "item_description": "Valid at: Paragon Shopping Centre #04-13/14 Bugis Junction #02-10B VivoCity #02-29A Orchard Central #01-01 Orchard Gateway, #03-19 Wheelock Place #02-02/03 Shaw Centre, #01-07/11 Ngee Ann City #B2-39A",
    "item_name": "NIKE by SUTL $20 Voucher ",
    "point_required": 5390,
    "points_available": 100000
  },
  {
    "item_category": "Dining",
    "item_code": "1B002228",
    "item_description": "Valid at all Jack's Place Restaurants Valid for dine in only. Not valid for take away Valid for dine in and take away Not valid on the eve of / and on Public Holidays and special occasions such as Valentine's Day, Mother's Day and Father's Day Not valid with other vouchers, promotions, credit cards offer, and member's discounts Payment can be made by Cash & Credit Cards(Above $12) Any unused amount of the voucher will not be refunded Voucher is not exchangeable for cash or in kind Voucher must be presented prior to ordering",
    "item_name": "Jack's Place $50 Voucher ",
    "point_required": 12020,
    "points_available": 100000
  },
  {
    "item_category": "Shopping",
    "item_code": "1A002169",
    "item_description": "Applicable solely on watches, excludes accessories (batteries & straps) • Redeem at all the following Swatch Outlets only: • Ion Orchard #B2-37 • Raffles City Shopping Centre #01-41 • Marina Bay Sands #B2-105 • Bugis Junction #01-16 • JEM #02-32A • Plaza Singapura, #B1-27 • Junction 8 #01-13 • Jurong Point Shopping Centre #01-60 • Suntec City #01-322 • nex #01-79 • Tampines Mall #01-K3 • Changi Airport Terminal 3",
    "item_name": "SWATCH $50 VOUCHER ",
    "point_required": 12870,
    "points_available": 100000
  },
  {
    "item_category": "LifeStyle",
    "item_code": "1D004044",
    "item_description": "Valid at: APS Lifestyle Gallery, 9 Muthuraman Chetty Road Level 5, Tel: 6235 1333 Subject to stock availability",
    "item_name": "Vintec wine cabinet-V30SG @ $200 ",
    "point_required": 97550,
    "points_available": 100000
  },
  {
    "item_category": "LifeStyle",
    "item_code": "1D004168",
    "item_description": "Redeem at TwoBros Outlets #02-25 Novena Square Tel: 6353 3183 1 Maju Ave, MyVillage@Serangoon Gardens Tel: 6634 5873 112 East Coast Road, #02-19, 112 Katong Tel: 6694 8810 11 Tanjong Katong Road #02-52 OneKM Tel: 6702 2170",
    "item_name": "A-JAYS ONE EARPHONES",
    "point_required": 15320,
    "points_available": 100000
  },
]

/rewards/redemption

  • Submit an item redemption for your account
  • Pass in a lot of contact details into API
  • QUESTION: What is "redemption_details" required parameters?

/locations

  • List of ATMS by longitude/lat.
  • Can filter with radius, location type, address, city, state, post code.
{
    "address_1": "Str. Emil Isac nr. 20",
    "address_2": "",
    "city": "Cluj-Napoca",
    "comments": "24 HR ATM, Citibank - Euronet",
    "country": "United Kingdom",
    "external_link": "www.citibank.com",
    "id": "8ea58540-asdf-4e8d-b20b-eac25dfd38f7",
    "latitude": "46.771798",
    "location_type": "ATM",
    "longitude": "23.584348",
    "name": "ATM London Shop,CJ (Citibank - Euronet)",
    "phone": "555-555-5555",
    "postal_code": "",
    "state": ""
  },
  {
    "address_1": "Promenade Level",
    "address_2": "Cabot Place East, Canary Wharf",
    "city": "London",
    "comments": "24 HR ATM, HELOC, HELOAN, MRTG, BUSINESS DEPOSITS",
    "country": "United Kingdom",
    "external_link": "www.citibank.com",
    "id": "8ea58540-qwer-4e8d-b20b-eac25dfd38f7",
    "latitude": "51.505180",
    "location_type": "BRANCH",
    "longitude": "-0.021660",
    "name": "Cabot Place Branch",
    "phone": "555-555-5555",
    "postal_code": "E14 4QS",
    "state": ""
  },
  {
    "address_1": "3 Hanover Square",
    "address_2": "W1S 1HD",
    "city": "London",
    "comments": "BUSINESS DEPOSITS",
    "country": "United Kingdom",
    "external_link": "www.citibank.com",
    "id": "8ea58540-awe5-4e8d-b20b-eac25dfd38f7",
    "latitude": "51.513679",
    "location_type": "BRANCH",
    "longitude": "-0.143001",
    "name": "Hanover Square - Citigold Wealth Management",
    "phone": "555-555-5555",
    "postal_code": "W1S 1HD",
    "state": ""
  },
  {
    "address_1": "25 Canada Square",
    "address_2": "Canary Wharf",
    "city": "London",
    "comments": "24 HR ATM, HELOC, HELOAN, MRTG, BUSINESS DEPOSITS",
    "country": "United Kingdom",
    "external_link": "www.citibank.com",
    "id": "8ea58540-we65-4e8d-b20b-eac25dfd38f7",
    "latitude": "51.503934",
    "location_type": "ATM",
    "longitude": "-0.018132",
    "name": "Canada Square - Citigold Wealth Management",
    "phone": "555-606-5555",
    "postal_code": "E14 5LB",
    "state": ""
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment