Examples
SUCCESS, all data TRUE
Request | Response |
---|---|
{ "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "success verify income", "data": { "id": "abcded9a-508b-453b-9ab7-7d74", "reference_id": "this_is_ref_id_1234", "nik": true, "name": true, "gender": true, "dob": true, "company_name": "PT ABCD", "income_range": "4.5-5.5JT", "email": true, "phone": true } } |
SUCCESS, some invalid data
Request | Response |
---|---|
{ "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "20-01-1976", "email": "[email protected] ", "phone": "08123450000", "company_name": "PT ABCDEF", "income_range": "7000000" } | { "message": "success verify income", "data": { "id": "abcded9a-508b-453b-9ab7-7d74", "referenceid": "this_is_ref_id_1234", "nik": true, "name": true, "gender": true, "dob": false, "companyname": "PT ABCD", "income_range": "4.5-5.5JT", "email": false, "phone": false } } |
FAILED, nik not found
Request | Response |
---|---|
{ "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "income check not found", "data": { "id": "abcded9a-508b-453b-9ab7-7d74", "reference_id": "this_is_ref_id_1234", "nik": null, "name": null, "gender": null, "dob": null, "company_name": null, "income_range": null, "email": null, "phone": null } } |
INVALID DATA
Scenario | Request | Response |
---|---|---|
Unauthorized credentials | { "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Authorization failed" } |
“NIK” is empty | { "nik": "", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "nik", "message": "nik must be numeric value" } ] } |
“NIK” is not 16 digits | { "nik": "35200000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "nik", "message": "nik length should consist of 16 digit(s)" } ] } |
Name is empty | { "nik": "3520000000000000", "name": "", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "name", "message": "name must not be empty" } ] } |
Gender is empty or not filled with ‘M’ or ‘F’ | { "nik": "3520000000000000", "name": "John Doe", "gender": "", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "gender", "message": "invalid gender given, only accept ['M','F']" } ] } |
Dob is empty or not in the correct format | { "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "dob", "message": "dob format is incorrect, should be DD-MM-YYYY" } ] } |
Email is empty or not in correct format | { "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "email", "message": "value is not a valid email address" } ] } |
Phone is empty | { "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "", "company_name": "PT ABCD", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "phone", "message": "phone should be numeric value" } ] } |
Company name is empty | { "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "", "income_range": "5000000" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "company_name", "message": "company name must not be empty" } ] } |
Income range is empty | { "nik": "3520000000000000", "name": "John Doe", "gender": "M", "dob": "23-12-1976", "email": "[email protected] ", "phone": "08123456789", "company_name": "PT ABCD", "income_range": "" } | { "message": "Invalid payload", "error_code": "INVALID_PAYLOAD", "error_fields": [ { "field": "income_range", "message": "Income range must not be empty" } ] } |
Updated 5 months ago