SDK reference · Node SDK

prov.authorize.network.agentRecord

prov.authorize.network.agentRecord in Node SDK. Agent makers: your agent's record as merchants see it, with the counts behind it by week.

Signature

prov.authorize.network.agentRecord(agentId: string): Promise<{ object: "agent_record"; agentId: string; showRecord: boolean; networkSignals: NetworkSignals; weeks: { week: string; requests: number; accepted: number; reports: number }[]; reports: NetworkReport[]; }>

Parameters

agentIdstringRequired

Request fields

idstringpathRequired
Your agent's ID.

Returns

Promise<{ object: "agent_record"; agentId: string; showRecord: boolean; networkSignals: NetworkSignals; weeks: { week: string; requests: number; accepted: number; reports: number }[]; reports: NetworkReport[]; }> The agent's record.

HTTP operation

GET /v1/mandate/agents/{id}/record: Get your agent's record

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "name": "Cartwise" }),
})).json();
const agentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/record`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.