General

Lookups

 

Retrieve reference data and validation values used across the API including bank names, account types, countries, provinces, client types, and ID types. Essential for populating dropdown lists and validating form inputs.

Lookups

A dictionary of terms used by other API calls.

Path

GET /lookups/{?type}/{?payment_methods_id}

Path Parameters

FieldTypeDescriptionExample
typeGroup type(Optional) 'access_level', 'adjustment_category', 'adjustment_type' etc.bank_name
payment_methods_idPayment Method ID(Optional) Used with type: 'bank_name'pam_123456abcd

Response Body

{
  "status": true,
  "lookups": [{
    "id": "loo_t12RRpprJLg-GhVbSmRgW",
    "parent_lookups_id": null,
    "title": "Cheque/Current",
    "enum": "CHEQUE_OR_CURRENT",
    "type": "bank_account_type"
  }, ...]
}

Response Parameters

FieldTypeDescriptionExample
statusBooleantrue - success, false - errortrue
lookupsArray of objects
*.idString(32)Unique ID of the lookuploo_t12RRpprJLg-GhVbSmRgW
*.parent_lookups_idString(32)Unique ID of the parent lookup, if applicable. This would connect provinces to countries.loo__bXENa_D8MPrR43PLM5Tv
*.titleStringWhat is this lookup calledCheque/Current
*.enumStringWhat is the lookup's ENUM valueCHEQUE_OR_CURRENT
*.typeStringGroup typebank_account_type

Examples

To find the lookup values associated with bank_name (or bank_name_lookups_id) you would call GET /lookups/bank_name/pam_-lL0a6f6bqd1rV5CXJHCk

You must provide the payment methods ID (when type is bank_name) to ensure the bank is supported by the payment method; this is especially important for DebiCheck payment methods.

// GET /payment-methods [see payment methods section]
{
    "status": true,
    "payment_methods": [{
      "id": "pam_-lL0a6f6bqd1rV5CXJHCk",
      ...
    }, ...]
}
// GET /lookups/bank_name/pam_-lL0a6f6bqd1rV5CXJHCk
{
    "status": true,
    "lookups": [{
        "id": "loo_AHRZznYtBoRL3OenxJ1WF",
        "parent_lookups_id": null,
        "title": "ABSA BANK LIMITED",
        "enum": "ABSA_BANK_LIMITED",
        "type": "bank_name"
    }, ...]
}

To find the country connected to a specific province:

// GET /lookups/country
{
    "status": true,
    "lookups": [{
        "id": "loo__bXENa_D8MPrR43PLM5Tv",
        "parent_lookups_id": null,
        "title": "South Africa",
        "enum": "ZA",
        "type": "country"
    }, ...]
}
// GET /lookups/province
{
    "status": true,
    "lookups": [{
        "id": "loo_Hjgb6k3GZoLAbbFoJoHr4",
        "parent_lookups_id": "loo__bXENa_D8MPrR43PLM5Tv", // matched to country id above
        "title": "Eastern Cape",
        "enum": "EASTERN_CAPE",
        "type": "province"
    }, ...]
}