Get active counters for a business

This endpoint returns the active counters for a business.

GET /api/v2/businesses/{businessId}/counter

If the data included in the request is correct —businessId— the response will contain a list of active counters within the business, detailing the following information:

  • id: unique identifier that links the business to the counter.

  • shortName: abbreviation for the counter. If a custom abbreviation is not provided, the default counter abbreviation will be used.

  • scope: time range of the counter. Possible values are YEAR, SEMESTER, MONTH, WEEK, DAY, and CUSTOM, determining whether the counter measures data at the annual, semi-annual, monthly, weekly, daily or custom interval level.

  • dataType: type of data the counter handles. Possible values are NONE, TIME, LOCALTIME, INTEGER, DECIMAL, BOOLEAN and PERCENTAGE.

Below is an example response:

[
    {
        "id": 4035,
        "shortName": "HNS",
        "scope": "WEEK",
        "dataType": "TIME"
    },
    {
        "id": 4036,
        "shortName": "DLM",
        "scope": "MONTH",
        "dataType": "INTEGER"
    },
    {
        "id": 4037,
        "shortName": "HNM",
        "scope": "MONTH",
        "dataType": "TIME"
    },
    {
        "id": 4038,
        "shortName": "DLS",
        "scope": "WEEK",
        "dataType": "INTEGER"
    }
]

Considerations

The request returns the active counters associated with the business, which can then be selected at the service level for visibility on specific screens.