{"_id":"5d1d92c6294114022e4d2df3","version":{"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","__v":22,"createdAt":"2015-10-29T19:08:12.724Z","releaseDate":"2015-10-29T19:08:12.724Z","categories":["56326e9ddf556c0d00cd08cb","56326e9ddf556c0d00cd08cc","56326e9ddf556c0d00cd08cd","56326e9ddf556c0d00cd08ce","56326e9ddf556c0d00cd08cf","56326e9ddf556c0d00cd08d0","56326e9ddf556c0d00cd08d1","56326e9ddf556c0d00cd08d2","56326e9ddf556c0d00cd08d3","56326e9ddf556c0d00cd08d4","56d942ac337fd11300d6a251","5ab2fcf66a1d77001230b47e","5afc2943bd2ef4000330bca7","5d1d87419a969a00141c6b4c","5d1d8948ef26b2002c6468d1","5d1d8afe7b2b24005bec7de0","5d1d8b24f5cfcb00201490bb","5d1d8bb82d46d1004a02581f","5d1d8de1e4edb0019ed63acd","5d1d8f6b613fb90050d0d3e0","5d1d934ed377870191039d28","5d1d99810b2e4600500eb5ff","5d1da14e613fb90050d0d491","5d229a846cf323005a7fa998","5d229a8c8abf65001cc4768d","5d229a9494b856002e26b6e1","5d229a9bf77bb900507ccb04","5d229aa88abf65001cc4768e","5d24310a9ca8c80054786177","5d24359101cc3a00508e7482","5d24418fa791b20050733b32"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"collector","version_clean":"2.1.0","version":"2.1"},"updatedAt":"2019-07-04T09:11:07.826Z","project":"544fc17e698ab40800b4f891","category":{"_id":"5d1d8f6b613fb90050d0d3e0","project":"544fc17e698ab40800b4f891","version":"56326e9cdf556c0d00cd08ca","isAPI":false,"__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2019-07-04T05:32:27.464Z","from_sync":false,"order":17,"slug":"cash-out-1","title":"Cash Out"},"user":"5d19a189b4596f0072f571d4","__v":3,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-07-04T05:46:46.282Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"apiSetting":"5d1d8bb82d46d1004a02581d","examples":{"codes":[{"code":"import json\nimport requests\n\nTOKEN = 'YOUR TOKEN'\nurl = 'https://coins.ph/api/v3/validate-field/'\n\nheaders = {\n    'Authorization': 'Bearer {}'.format(TOKEN),\n    'Content-Type': 'application/json;charset=UTF-8',\n    'Accept': 'application/json'\n}\n\nbody = json.dumps({\n    'field_type': 'account_number',\n    'account_number': '3589101185',\n    'account_type': 'bpi'\n})\n\nrequests.post(url, headers=headers, data=body)","language":"python"}]},"results":{"codes":[{"name":"","code":"{\n  \"is_valid\": true\n}","language":"json","status":200},{"name":"","code":"{\n    \"errors\": {\n        \"account_number\": [\"Bank account number should be 10 digits\"]\n    }\n}","language":"json","status":400}]},"method":"post","auth":"required","params":[{"_id":"5d1d92c6294114022e4d2df8","ref":"","in":"body","required":true,"desc":"The kind of field to validate. Valid values are `account_number` and `mobile_number`.","default":"","type":"string","name":"field_type"},{"_id":"5d1d92c6294114022e4d2df7","ref":"","in":"body","required":false,"desc":"Specifies the value of an account number. (Required for `account_number` field type.)","default":"","type":"string","name":"account_number"},{"_id":"5d1d92c6294114022e4d2df6","ref":"","in":"body","required":false,"desc":"The payment outlet ID where the account number field value should be validated against. (Required for `account_number` field type.)","default":"","type":"string","name":"account_type"},{"_id":"5d1d92c6294114022e4d2df5","ref":"","in":"body","required":false,"desc":"Specifies the value of a mobile number field type. It should follow the E.164 phone number formatting. (Required for `mobile_number` field type)","default":"","type":"string","name":"mobile_number"},{"_id":"5d1d92c6294114022e4d2df4","ref":"","in":"body","required":false,"desc":"The region of the mobile number. Valid values are `PH` and `TH`. (Required for `mobile_number` field type)","default":"","type":"string","name":"region"}],"url":"/api/v3/validate-field/"},"isReference":true,"order":3,"body":"Cash outs require users to fill up fields that give us information about the recipient. These fields vary per payment outlet, and have different validation rules. This endpoint helps determine whether a field value is valid.","excerpt":"Validate field values","slug":"validate-field-1","type":"endpoint","title":"validate-field"}

postvalidate-field

Validate field values

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

field_type:
required
string
The kind of field to validate. Valid values are `account_number` and `mobile_number`.
account_number:
string
Specifies the value of an account number. (Required for `account_number` field type.)
account_type:
string
The payment outlet ID where the account number field value should be validated against. (Required for `account_number` field type.)
mobile_number:
string
Specifies the value of a mobile number field type. It should follow the E.164 phone number formatting. (Required for `mobile_number` field type)
region:
string
The region of the mobile number. Valid values are `PH` and `TH`. (Required for `mobile_number` field type)

Examples


Result Format


Documentation

Cash outs require users to fill up fields that give us information about the recipient. These fields vary per payment outlet, and have different validation rules. This endpoint helps determine whether a field value is valid.