Return the full machine profile for a DID, with response fields that vary by data visibility setting.
Documentation Index
Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
Use this file to discover all available pages before exploring further.
did:peaq:0x...) or raw EVM address (0x...)| Field | Type | Description |
|---|---|---|
schema_version | string | Always "1.0" |
name | string | "Machine #<token_id>" if an NFT token exists, otherwise "Machine (no NFT)" |
peaqos.machine_id | integer | On-chain machine ID |
peaqos.did | string | Machine DID |
peaqos.operator | string or null | Operator DID from the DID document. null if not set. |
peaqos.mcr | string | Letter rating: AAA, AA, A, BBB, BB, B, NR, or Provisioned |
peaqos.mcr_score | integer | MCR score 0-100 |
peaqos.bond_status | string | "bonded" or "unbonded" |
peaqos.negative_flag | boolean | true when the AdminFlags contract has a negative-flag timestamp set for this machine. Stays true for as long as the timestamp is recorded on-chain, regardless of whether the 180-day MCR scoring penalty is still in effect. |
peaqos.event_count | integer | Total on-chain event count |
peaqos.data_visibility | string | "private", "onchain", or "public". Defaults to "private" if the DID document has no data_visibility attribute or contains an unrecognised value. |
peaqos.documentation_url | string or null | Public documentation URL from the DID document |
data_visibility value on the machine’s DID document determines which additional fields appear in the peaqos object.
data_visibility == "private"| Field | Type | Description |
|---|---|---|
peaqos.data_api | string | The machine’s data API URL from the DID document. Only present when a data_api attribute is configured. |
data_visibility == "onchain"| Field | Type | Description |
|---|---|---|
peaqos.event_data | array | Up to the first 100 events for this machine (oldest first by on-chain index), parsed from on-chain storage |
event_data:
| Field | Type | Description |
|---|---|---|
event_type | integer | 0 = revenue, 1 = activity |
origin_value | integer | Non-negative ISO 4217 minor-unit integer (e.g. cents for USD/HKD, whole units for JPY/KRW). Revenue: raw partner-submitted amount in origin_currency. Activity: arbitrary non-negative integer. |
timestamp | integer | Unix timestamp |
trust_level | integer | 0 = self-reported, 1 = on-chain verifiable, 2 = hardware-signed |
metadata | object | Parsed JSON metadata from the event. Falls back to {"raw": "..."} if the stored metadata is not valid JSON. |
origin_currency | string | Revenue only. ISO 4217 currency code in upper-case. The API normalises against the 25-fiat supported list: USD, HKD, JPY, CNY, KRW, SGD, TWD, THB, PHP, MYR, IDR, VND, INR, EUR, GBP, CHF, SEK, NOK, DKK, PLN, CAD, AUD, NZD, MXN, BRL. Codes outside this set are echoed back as-is with amount_status: "unsupported_currency". When the partner omits the currency on-chain, the server defaults to "USD". Activity events omit this field. |
origin_subunit | integer or null | Revenue only. Divisor that converts origin_value to a display amount: 100 for two-decimal currencies (USD, HKD, EUR, etc.) and 1 for the zero-decimal codes JPY, KRW, and VND. null when origin_currency is outside the supported whitelist (amount_status: "unsupported_currency"). |
usd_value | integer or null | Revenue only. FX-normalized value in USD cents. Display = usd_value / 100. null when amount_status != "ok" (FX failed); consumers must branch on amount_status before displaying. |
usd_subunit | integer | Revenue only. Always 100. USD’s minor unit divisor; the field exists to make the cents convention explicit on the wire. |
amount_status | string | Revenue only. "ok" (FX succeeded; usd_value is meaningful), "unsupported_currency" (currency not in MCR FX whitelist), or "fx_unavailable" (FX feed degraded or stale). Non-"ok" rows score conservatively and surface mcr_degraded: true on /mcr/{did}. |
data_visibility == "public"data_api URL with a 5-second timeout. The URL is validated before the request is made: private IP ranges, loopback addresses, link-local addresses, reserved ranges, multicast addresses, and known cloud metadata endpoints (169.254.169.254, metadata.google.internal) are blocked. Redirects are not followed. Responses must be valid JSON objects no larger than 1 MB.
On success:
| Field | Type | Description |
|---|---|---|
peaqos.partner_data | object | The JSON object returned by the machine’s data_api URL |
| Field | Type | Description |
|---|---|---|
peaqos.partner_data_error | string | One of the fixed strings below |
partner_data_error values:
| Value | Cause |
|---|---|
"data_api not configured" | DID has no data_api attribute |
"blocked: unsafe URL" | URL scheme is not http/https, hostname is missing, host is in the blocked list, or DNS resolves to a private/loopback/link-local/reserved/multicast IP |
"blocked: malformed URL" | URL could not be parsed |
"fetch failed" | Network error, timeout, redirect, or non-2xx HTTP response |
"response too large" | Response exceeded 1 MB |
"invalid JSON response" | Body was not valid JSON, or the parsed value was not a JSON object |
| Status | detail | Condition |
|---|---|---|
| 400 | "Empty DID" | Path parameter resolves to an empty string |
| 400 | "Invalid Ethereum address format" | DID or address does not match the expected hex format |
| 404 | "Machine DID not found" | DID address has no machineId attribute in the DID registry |
| 404 | "Machine not registered" | Machine ID is not present in the IdentityRegistry contract |
| 503 | "Service not initialised" | Server started without contract addresses |
| 503 | "Chain unavailable" | Any chain call failed |