getCompanyInfo

POST public/getCompanyInfo

Returns information about a company: its address, contacts, parent company, and site and device counts. Add include_sites=1 to also return every location in the company, with each location's status, address, hardware, and installed applications.

Request syntax

curl https://apiv2.acumera.net/public/getCompanyInfo \
  --cookie av_session.txt \
  --data-urlencode "customer_code=<customer_code>" \
  [--data-urlencode "include_sites=1"]

Optional parameters are shown in brackets. The username, password, and tfa_token parameters are also accepted, and are required only if the client hasn't already signed in with login. See Getting started with the SC//AcuVigil API.

Request parameters

The request accepts the following parameters in a form-encoded body.

Parameter Type Description Required Default value
customer_code String The company's customer code: five lowercase letters, for example exmpl. The customer code appears in the dashboard's address bar as u=<customer_code> when you open the company. Yes
include_sites Integer Set to 1 to include the company's locations in the response. No Locations aren't included

Response syntax

{
    "success": "string",
    "data": {
        "handle": "string",
        "company_id": "string",
        "name": "string",
        "billing_name": "string",
        "description": "string",
        "company_type": "string",
        "url": "string",
        "address": { "addressline1": "string", "addressline2": "string", "city": "string", "state": "string", "postal_code": "string", "country": "string" },
        "phone_numbers": [ { "number": "string", "extension": "string", "description": "string", "connection_type": "string", "primary": "string" } ],
        "timezone": "string",
        "tfa_validator": "string",
        "suspend_on_site_down": "string",
        "parent_company": { "handle": "string", "name": "string" },
        "billed_to_company": "string",
        "lead_technician": "string",
        "primary_contact": { "name": "string", "email": "string", "address": { }, "phone_numbers": [ ] },
        "billing_contact": { "name": "string", "email": "string", "address": { }, "phone_numbers": [ ] },
        "location_count": number,
        "active_location_count": number,
        "device_count": { "<model>": { "<status>": number } },
        "created": "string",
        "last_updated": "string",
        "locations": [ { } ]
    }
}

Response parameters

If the call succeeds, success is "1" and the following data is returned.

Field Description
handle The company's customer code.
company_id The company's numeric ID.
name, billing_name, description The company's name, billing name, and description.
company_type The kind of customer, for example Direct Customer or Reseller.
address, phone_numbers, url The company's address, phone numbers, and website.
timezone The company's time zone, for example America/Chicago.
parent_company The customer code and name of the company's parent company, if it has one. See Company structure and site access.
primary_contact, billing_contact The name, email address, address, and phone numbers of each contact.
location_count The number of locations in the company (a number).
active_location_count The number of active locations (a number).
device_count For each ESD model, the number of ESDs in each status, for example "SG2v1": {"OK": 3, "CRITICAL": 1}.
created, last_updated When the company record was created and last changed, as YYYY-MM-DD HH:MM:SS.
locations Only when include_sites=1. One entry per location, with location_id, location_name, status (for example OK, CRITICAL, DOWN, MONITORING_OFF, or NOT_INSTALLED), address, latitude, longitude, hardware (the location's ESDs), location_apps (installed applications), and other location details.

Errors

If the call fails, success is "0", and returnCode and returnMessage describe the problem. The HTTP status is still 200.

Return code Message Cause
API_MISSING_HANDLE No customer code was supplied. customer_code is missing.
API_INVALID_HANDLE The supplied customer code is invalid. customer_code isn't five lowercase letters.
API_COMPANY_NOT_FOUND The specified company was not found. No company has that customer code.
AUTH_FAILED_FUNC_NOT_ALLOWED Authorization failed because you are not permitted to access the requested function. Your account doesn't have access to the company.
INVALID_LOGIN We were unable to log you in. Make sure you entered the correct username, password and 2FA code. You haven't signed in, your session has ended, or the credentials sent with the call are wrong.

Examples

Example: Return company information

This example returns the details of the company with customer code exmpl.

curl https://apiv2.acumera.net/public/getCompanyInfo \
  --cookie av_session.txt \
  --data-urlencode "customer_code=exmpl"

Response (shortened; contacts and some fields removed):

{
    "success": "1",
    "data": {
        "handle": "exmpl",
        "company_id": "59584",
        "name": "Example Company",
        "billing_name": "",
        "description": "Convenience store chain",
        "company_type": "Direct Customer",
        "url": "",
        "address": {
            "addressline1": "200 Commerce Blvd",
            "addressline2": "",
            "city": "Austin",
            "state": "TX",
            "postal_code": "78701",
            "country": "US"
        },
        "phone_numbers": [
            {
                "number": "5125550100",
                "extension": "",
                "description": "Main",
                "connection_type": "",
                "primary": "1"
            }
        ],
        "timezone": "America/Chicago",
        "parent_company": {
            "handle": "exprt",
            "name": "Example Holdings"
        },
        "location_count": 25,
        "active_location_count": 8,
        "device_count": {
            "SG2v1": {
                "OK": 0,
                "INFO": 0,
                "WARNING": 0,
                "CRITICAL": 5,
                "DOWN": 0,
                "MONITORING_OFF": 0,
                "NOT_INSTALLED": 0
            }
        },
        "created": "2023-08-05 15:15:38",
        "last_updated": "2026-09-01 17:04:35"
    }
}

Example: Return company information and all locations

This example also returns every location in the company. Use the location_id values with other functions, such as getStatusDocument and getRegisteredDevices.

curl https://apiv2.acumera.net/public/getCompanyInfo \
  --cookie av_session.txt \
  --data-urlencode "customer_code=exmpl" \
  --data-urlencode "include_sites=1"

Response (shortened to one location and a few fields):

{
    "success": "1",
    "data": {
        "handle": "exmpl",
        "company_id": "59584",
        "name": "Example Company",
        "description": "Convenience store chain",
        "company_type": "Direct Customer",
        "address": {
            "addressline1": "200 Commerce Blvd",
            "addressline2": "",
            "city": "Austin",
            "state": "TX",
            "postal_code": "78701",
            "country": "US"
        },
        "timezone": "America/Chicago",
        "location_count": 25,
        "active_location_count": 8,
        "created": "2023-08-05 15:15:38",
        "last_updated": "2026-09-01 17:04:35",
        "locations": [
            {
                "location_id": "4510",
                "location_name": "Store 101",
                "handle": "exmpl",
                "company_name": "Example Company",
                "status": "CRITICAL",
                "down_devices": "",
                "custom_id": "",
                "description": "Main Street store",
                "site_contact": "Pat Example",
                "address": {
                    "addressline1": "100 Main St",
                    "addressline2": "",
                    "city": "Austin",
                    "state": "TX",
                    "postal_code": "78701",
                    "country": "US"
                },
                "timezone": "America/Chicago",
                "latitude": "30.2672000",
                "longitude": "-97.7431000",
                "hardware": [
                    {
                        "serial_number": "0041ac000003",
                        "hardware_type": "sg",
                        "hardware_version": "1.1",
                        "bb_serial_number": "MF0000000000",
                        "label": "Acumera",
                        "toolchains": [
                            "santaka",
                            "tomato"
                        ],
                        "date_installed": "2023-12-22 18:34:27"
                    }
                ],
                "location_apps": [
                    {
                        "app_name": "System",
                        "version": "PA4000",
                        "toolchain": "santaka",
                        "status": "Production",
                        "date_installed": "2023-12-22 18:34:23",
                        "last_updated": "2024-10-17 21:00:15"
                    },
                    {
                        "app_name": "Clients",
                        "version": "",
                        "toolchain": "santaka",
                        "status": "Production",
                        "date_installed": "2023-12-22 18:34:23",
                        "last_updated": ""
                    }
                ]
            }
        ]
    }
}