Organization API

Purpose

To get the organization data.

Request URL

https://www.zohoapis.com/crm/v2/org

Request Method

GET

Scope

scope=ZohoCRM.org.{operation_type}

Possible operation types
ALL - Full access to Organization data
READ - Get Organization data

Attributes:

  • "iso_code" : string representing base currency of the current org

  • "mc_status" : Checks if Multi-Currency is enabled or disabled.

Sample Request


				curl "https://www.zohoapis.com/crm/v2/org"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"			

Sample Response


				{
    "org": [
       {
            "country": "US",
            "mc_status": false,
            "gapps_enabled": false,
            "id": "111111000000033001",
            "state": null,
            "employee_count": "154",
            "website": "www.zylker.com",
            "currency_symbol": "$",
            "mobile": null,
            "currency_locale": "en_US",
            "primary_zuid": "5478235",
            "zgid": "5478236",
            "country_code": "US",
            "license_details": {
                "paid_expiry": null,
                "users_license_purchased": 3,
                "trial_type": "professional",
                "trial_expiry": "2018-05-17T17:20:05+05:30",
                "paid": false,
                "paid_type": "free"
            },
            "company_name": null,
            "privacy_settings": true,
            "primary_email": "p.boyle@zylker.com",
            "iso_code": "USD"
        }
    ]
}			

Sample Request


				ZCRMRestClient client = ZCRMRestClient.getInstance();
APIResponse response = client.getOrganizationDetails();
ZCRMOrganization org = (ZCRMOrganization) response.getData();			

Sample Response


				{
    "org": [
       {
            "country": "US",
            "mc_status": false,
            "gapps_enabled": false,
            "id": "111111000000033001",
            "state": null,
            "employee_count": "154",
            "website": "www.zylker.com",
            "currency_symbol": "$",
            "mobile": null,
            "currency_locale": "en_US",
            "primary_zuid": "5478235",
            "zgid": "5478236",
            "country_code": "US",
            "license_details": {
                "paid_expiry": null,
                "users_license_purchased": 3,
                "trial_type": "professional",
                "trial_expiry": "2018-05-17T17:20:05+05:30",
                "paid": false,
                "paid_type": "free"
            },
            "company_name": null,
            "privacy_settings": true,
            "primary_email": "p.boyle@zylker.com",
            "iso_code": "USD"
        }
    ]
}			

Sample Request


				try{
          $restIns=ZCRMRestClient::getInstance();
          $res=$restIns->getOrganizationDetails();
          $orgIns=$res->getData();
          echo $orgIns->getCompanyName();
          echo $orgIns->getOrgId();
          echo $orgIns->getCountryCode();
          echo $orgIns->getCountry();
          echo $orgIns->getCurrencyLocale();
          echo $orgIns->getFax();
          echo $orgIns->getAlias();
          echo $orgIns->getDescription();
          echo $orgIns->getStreet();
          echo $orgIns->getCity();
          echo $orgIns->getState();
          echo $orgIns->getZgid();
          echo $orgIns->getWebSite();
          echo $orgIns->getPrimaryEmail();
          echo $orgIns->getPrimaryZuid();
          echo $orgIns->getIsoCode();
          echo $orgIns->getPhone();
          echo $orgIns->getMobile();
          echo $orgIns->getEmployeeCount();
          echo $orgIns->getCurrencySymbol();
          echo $orgIns->getTimeZone();
          echo $orgIns->getMcStatus();
          echo $orgIns->isGappsEnabled();
          echo $orgIns->isPaidAccount();
          echo $orgIns->getPaidExpiry();
          echo $orgIns->getPaidType();
          echo $orgIns->getTrialType();
          echo $orgIns->getTrialExpiry();
          echo $orgIns->getZipCode();
          }
          catch (ZCRMException $e)
          {
          echo $e->getCode();
          echo $e->getExceptionDetails();
          echo $e->getMessage();
          echo $e->getTraceAsString();
          }			

Sample Response


				{
    "org": [
       {
            "country": "US",
            "mc_status": false,
            "gapps_enabled": false,
            "id": "111111000000033001",
            "state": null,
            "employee_count": "154",
            "website": "www.zylker.com",
            "currency_symbol": "$",
            "mobile": null,
            "currency_locale": "en_US",
            "primary_zuid": "5478235",
            "zgid": "5478236",
            "country_code": "US",
            "license_details": {
                "paid_expiry": null,
                "users_license_purchased": 3,
                "trial_type": "professional",
                "trial_expiry": "2018-05-17T17:20:05+05:30",
                "paid": false,
                "paid_type": "free"
            },
            "company_name": null,
            "privacy_settings": true,
            "primary_email": "p.boyle@zylker.com",
            "iso_code": "USD"
        }
    ]
}			

Sample Request


				def get_org_details(self):
          try:
            resp=ZCRMRestClient.get_instance().get_organization_details()
              print resp.status_code
         org_ins=resp.data
              print org_ins.company_name
              print org_ins.org_id
              print org_ins.alias
              print org_ins.primary_zuid
              print org_ins.zgid
              print org_ins.primary_email
              print org_ins.website
              print org_ins.mobile
              print org_ins.phone
              print org_ins.employee_count
              print org_ins.description
              print org_ins.time_zone
              print org_ins.iso_code
              print org_ins.currency_locale
              print org_ins.currency_symbol
              print org_ins.street
              print org_ins.state
              print org_ins.city
              print org_ins.country
              print org_ins.zip_code
              print org_ins.country_code
              print org_ins.fax
              print org_ins.mc_status
              print org_ins.is_gapps_enabled
              print org_ins.paid_expiry
              print org_ins.trial_type
              print org_ins.trial_expiry
              print org_ins.is_paid_account
              print org_ins.paid_type
          except ZCRMException as ex:
              print ex.status_code
              print ex.error_message
              print ex.error_code
              print ex.error_details
              print ex.error_content			

Sample Response


				{
    "org": [
       {
            "country": "US",
            "mc_status": false,
            "gapps_enabled": false,
            "id": "111111000000033001",
            "state": null,
            "employee_count": "154",
            "website": "www.zylker.com",
            "currency_symbol": "$",
            "mobile": null,
            "currency_locale": "en_US",
            "primary_zuid": "5478235",
            "zgid": "5478236",
            "country_code": "US",
            "license_details": {
                "paid_expiry": null,
                "users_license_purchased": 3,
                "trial_type": "professional",
                "trial_expiry": "2018-05-17T17:20:05+05:30",
                "paid": false,
                "paid_type": "free"
            },
            "company_name": null,
            "privacy_settings": true,
            "primary_email": "p.boyle@zylker.com",
            "iso_code": "USD"
        }
    ]
}			

Sample Request


				ZCRMRestClient restClient = ZCRMRestClient.GetInstance();
APIResponse response = restClient.GetOrganizationDetails();
ZCRMOrganization organization = (ZCRMOrganization)response.Data;			

Sample Response


				{
    "org": [
       {
            "country": "US",
            "mc_status": false,
            "gapps_enabled": false,
            "id": "111111000000033001",
            "state": null,
            "employee_count": "154",
            "website": "www.zylker.com",
            "currency_symbol": "$",
            "mobile": null,
            "currency_locale": "en_US",
            "primary_zuid": "5478235",
            "zgid": "5478236",
            "country_code": "US",
            "license_details": {
                "paid_expiry": null,
                "users_license_purchased": 3,
                "trial_type": "professional",
                "trial_expiry": "2018-05-17T17:20:05+05:30",
                "paid": false,
                "paid_type": "free"
            },
            "company_name": null,
            "privacy_settings": true,
            "primary_email": "p.boyle@zylker.com",
            "iso_code": "USD"
        }
    ]
}