Python
invoice = niadra.object_state("invoice:erp:0823")
if invoice:
print({name: f.v for name, f in invoice.fields.items()}, invoice.as_of)const { data: invoice } = await niadra.objectState("invoice:erp:0823");
if (invoice) console.log(invoice.fields, invoice.as_of);curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ref": {
"type": "invoice",
"namespace": "erp",
"id": "0823"
},
"as_of": "2026-09-22T17:06:21Z",
"fields": {
"status": {
"v": "credited",
"logic": "yes",
"status": "fresh",
"claim_safe": false,
"observed_at": "2026-09-22T17:06:21Z",
"src": "erp"
},
"amount_due": {
"v": 49.9,
"logic": "yes",
"status": "fresh",
"claim_safe": false,
"observed_at": "2026-09-22T17:06:21Z",
"src": "erp"
}
}
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Objetos
Ler um objeto
Um pedido, ticket ou fatura como uma leitura de estado o serve: cada campo com o valor lógico, os carimbos e o frescor.
GET
/
v1
/
objects
/
{object_type}
/
{namespace}
/
{external_id}
Python
invoice = niadra.object_state("invoice:erp:0823")
if invoice:
print({name: f.v for name, f in invoice.fields.items()}, invoice.as_of)const { data: invoice } = await niadra.objectState("invoice:erp:0823");
if (invoice) console.log(invoice.fields, invoice.as_of);curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/objects/{object_type}/{namespace}/{external_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ref": {
"type": "invoice",
"namespace": "erp",
"id": "0823"
},
"as_of": "2026-09-22T17:06:21Z",
"fields": {
"status": {
"v": "credited",
"logic": "yes",
"status": "fresh",
"claim_safe": false,
"observed_at": "2026-09-22T17:06:21Z",
"src": "erp"
},
"amount_due": {
"v": 49.9,
"logic": "yes",
"status": "fresh",
"claim_safe": false,
"observed_at": "2026-09-22T17:06:21Z",
"src": "erp"
}
}
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Parâmetros de caminho
Resposta
O objeto.
Um objeto como uma leitura de estado o serve: campos com os quatro valores lógicos e os carimbos, valores computados, ciclo de vida, temporizadores e leituras nomeadas, e o que não pode ser afirmado com dado dessa idade. Uma leitura nunca recusa; uma leitura decide de um tipo que pede isso leva refusal ao lado dos valores, para a ferramenta da empresa.

