Reference

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'pay_123456abcd

Response Body

{
    "status": true,
    "lookups": [{
        "id": "loo_abc123...",
        "parent_lookups_id": "loo_abc123...",
        "title": "Cheque/Current",
        "type": "bank_account_type"
    }, ...]
}

Response Parameters

FieldTypeDescriptionExample
statusBooleantrue - success, false - errortrue
lookupsArray of objects
*.idString(32)Unique ID of the lookuploo_abc123...
*.parent_lookups_idString(32)Unique ID of the parent lookup, if applicable. This would connect provinces to countries.loo_abc123...
*.titleStringWhat is this lookup calledCheque/Current
*.typeStringGroup typebank_account_type

Examples

To find the lookup values associated with bank_name_lookups_id you would call GET /lookups/bank_name/pam_123456abcd

You just drop the lookups_id from the parameter name.

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_123456abcd",
      ...
    }, ...]
}
// GET /lookups/bank_name/pam_123456abcd
{
    "status": true,
    "lookups": [{
        "id": "loo_abc123...",
        "parent_lookups_id": null,
        "title": "ABSA BANK LIMITED",
        "type": "bank_name"
    }, ...]
}

To find the country connected to a specific province:

// GET /lookups/country
{
    "status": true,
    "lookups": [{
        "id": "loo_b2...",
        "parent_lookups_id": null,
        "title": "South Africa",
        "type": "country"
    }, ...]
}
// GET /lookups/province
{
    "status": true,
    "lookups": [{
        "id": "loo_fE...",
        "parent_lookups_id": "loo_b2...", // This is matched to the country ID above
        "title": "Eastern Cape",
        "type": "province"
    }, ...]
}

Copyright © 2024 Kwik