List companies
When your account is business account, you can list all your companies.
Request
Request header:
GET https://api.ipaymy.com/v2/companies?detailed=1
Host: api.ipaymy.com
Accept: application/json
Authorization: Bearer your_access_token
Response
Response body:
{
"data": [
{
"account_id": 34596,
"allow_delete": false,
"business_industry": 9,
"business_type": 2,
"country_code": "SG",
"has_collected_account": true,
"id": 4685,
"is_current": true,
"name": "TEKIO CONSULTANCY",
"registration_number": "53364010E"
},
{
"account_id": 35394,
"allow_delete": true,
"business_industry": 89,
"business_type": 2,
"country_code": "SG",
"has_collected_account": false,
"id": 5137,
"is_current": false,
"name": "HOTPOT CONCEPTS PTE. LTD.",
"registration_number": "201913652R"
}
],
"error": 0
}
Response codes:
- 200: Good stuff, and the response body should be easy to parse.
- 422: Typically malformed JSON, such as an integer in place of the required alphanumeric string, or a missing key. Check the response body for further details.