View as Markdown

SDK reference · Node SDK

prov.mandate.grants.setOverLimitSettings

prov.mandate.grants.setOverLimitSettings in Node SDK. Change the settings for the locks given (an admin key).

Signature

prov.mandate.grants.setOverLimitSettings(params: { overLimit?: OverLimitSettings; requireSamePerson?: boolean; atVerify?: "settings" | "refuse"; /** #147: an account key can't delegate; the agent holding a mandate delegates with its own grant. */ requireHolderProof?: boolean; /** #158: ask the grantor before a hand-off outside the account (`ask`), or refuse every one. */ external?: "ask" | "refuse"; /** #158: the budget at or under which a hand-off that doesn't say allows offline checks. */ externalOnlineAbove?: number; }): Promise<DelegationSetting>

Parameters

params{ overLimit?: OverLimitSettings; requireSamePerson?: boolean; atVerify?: "settings" | "refuse"; /** #147: an account key can't delegate; the agent holding a mandate delegates with its own grant. */ requireHolderProof?: boolean; /** #158: ask the grantor before a hand-off outside the account (`ask`), or refuse every one. */ external?: "ask" | "refuse"; /** #158: the budget at or under which a hand-off that doesn't say allows offline checks. */ externalOnlineAbove?: number; }Required

Request fields

over_limitobject
Over-limit settings per lock (any subset). amount is the per-purchase limit, budget the grant's budget and each one above it, counterparty its merchant list, currency its currency, uses and purchases its counts. dates, category, block and country are accepted now and take effect with the locks they name.
Show child attributes
amountobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
budgetobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
datesobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
categoryobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
counterpartyobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
currencyobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
blockobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
usesobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
purchasesobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
countryobject
What one of a grant's locks does when a purchase goes past it. ask opens an approval for a person; refuse refuses without asking. The amount and budget locks take refuse_over with ask: past the limit plus that margin, the purchase is refused without asking.
Show child attributes
actionenumRequired
Ask a person, or refuse. One of ask, refuse.
refuse_overobject | null
The amount and budget locks only, with ask: how far past the limit a person may still be asked, as a percentage of the limit (percent, 20 by default when left out) or, in Advanced, a fixed amount in the grant's currency. Exactly one of the two. null asks at any amount over.
Show child attributes
percentnumber
The margin, in percent of the limit (20: ask up to 1.2 times the limit).
amountnumber
The margin as a fixed amount in the grant's currency (300: ask up to the limit plus 300). On a grant it needs the grant's currency.
require_same_personboolean
Accept a yes over a grant's limit only from a passkey the grant's person registered.
at_verifyenum
settings: verify follows the over-limit settings. refuse: verify refuses every miss. One of settings, refuse.
require_holder_proofboolean
An account key can't delegate: the agent that holds a mandate delegates with its own grant (holder proof), or a person in the console.
externalenum
A grant handed to an agent outside the account: ask the grantor first, or refuse it. One of ask, refuse.
external_online_abovenumber
The budget at or under which a hand-off that doesn't say allows offline checks.

Returns

Promise<DelegationSetting> The settings.

HTTP operation

PUT /v1/mandate/settings/delegation: Set the over-limit settings

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/settings/delegation`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "over_limit": {
      "budget": {
        "action": "ask",
        "refuse_over": {
          "percent": 10
        }
      }
    },
    "require_same_person": true
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.