Customer API / Integration guide

Integrate with the Customer API

Follow the shared workflow and wire contracts used across discovery, aggregate data, and downtime requests.

In this article

Follow the request workflow

Production requests use https://api.wavac.io. Authenticate with the method configured for the integration, then call discovery and select only identifiers returned for the current credential. Query aggregate data or downtime using a discovered siteId and any narrower filters.

Method Endpoint Purpose
GET /api/customer/v1/discovery List available resources and the visible site, line, machine, and Friendly Tag hierarchy.
GET /api/customer/v1/data Read aggregate Friendly Tag values.
GET /api/customer/v1/downtime Read downtime events that overlap a time interval.
GET /api/customer/v1/downtime/codes List active downtime codes available for a site.

Follow nextCursor until it is null while keeping the original query unchanged. Reconcile the complete interval later when late or corrected data must be included.

Format dates and times

Send from and to as RFC 3339 timestamps with an explicit offset:

YYYY-MM-DDTHH:mm:ss[.fffffff](Z|+HH:mm|-HH:mm)

Valid examples include 2026-09-01T13:36:10Z, 2026-09-01T13:36:10.5696790Z, and 2026-09-01T09:36:10-04:00.

Concern Contract
Offset Required. Use Z for UTC or a numeric offset such as -04:00.
Fractional seconds Optional, with one through seven digits.
Query encoding Encode a positive offset's + as %2B; standard URL builders do this automatically.
Time range Half-open: from is included and to is excluded.
Aggregate timestamp UTC start of the bucket.
Response timestamp Normalized to UTC and written with Z.
Open downtime endedAt is null until the event ends.

Do not send locale-specific dates, timestamps without an offset, named time zones, or Unix timestamps in from and to.

Read JSON as UTF-8

Responses use JSON encoded as UTF-8 and camel-case property names. Send Accept: application/json. Do not depend on JSON property order.

Names, labels, categories, and engineering units are Unicode display text. Decode them as UTF-8, preserve the received text, and do not use a display value as an identifier.

{
  "siteName": "Fábrica Norte",
  "lineName": "Línea de empaque",
  "tagName": "温度"
}

JSON null is distinct from an empty string. Optional values such as engineeringUnits, downtime display metadata, and endedAt can be null.

Preserve identifiers and numbers

Value Format
siteId, lineId, machineId Copy exactly from discovery. They are case-sensitive and cannot contain spaces.
tagGuid, eventId Canonical UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Never construct a tagGuid.
cursor Opaque URL-safe string returned unchanged.
aggregationIntervalSeconds, pageSize, downCode, sampleCount, sortOrder JSON integers.
durationMs Integer elapsed milliseconds.
value, minimum, maximum JSON numbers, not quoted strings.
isFallbackCode JSON true or false, not 1, 0, or quoted text.

Percent-encode query values with a standard URL builder. Repeated filters use the same key more than once, for example tagGuid=<guid-1>&tagGuid=<guid-2>.

Read effective limits

Discovery reports available fields and filters, maximum time range, result limit, and minimum aggregation interval. An oversized positive pageSize is capped, and X-Effective-Page-Size reports the value used. An aggregation interval below the permitted minimum is raised, and X-Effective-Aggregation-Interval-Seconds reports the effective interval.

Rate-limit headers describe the daily request allowance:

Header Meaning
RateLimit-Limit Total requests available in the current UTC allowance window, when a fixed limit applies.
RateLimit-Remaining Requests remaining after the current request.
RateLimit-Reset Unix timestamp in whole seconds when the UTC allowance resets.
Retry-After Seconds to wait after a 429 response.

Continue with reference

Use the discovery, aggregate data, and downtime references for exact operation contracts. Read pagination and data consistency before persisting results.