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).
amountis the per-purchase limit,budgetthe grant's budget and each one above it,counterpartyits merchant list,currencyits currency,usesandpurchasesits counts.dates,category,blockandcountryare 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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.
askopens an approval for a person;refuserefuses without asking. The amount and budget locks takerefuse_overwithask: 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 fixedamountin the grant's currency. Exactly one of the two.nullasks 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_verifyenumsettings: verify follows the over-limit settings.refuse: verify refuses every miss. One ofsettings,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:
askthe grantor first, orrefuseit. One ofask,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
- authentication_required
- insufficient_scope
- insufficient_role
- invalid_json
- parameter_invalid
- rate_limit_exceeded
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();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/mandate/settings/delegation", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"over_limit": {
"budget": {
"action": "ask",
"refuse_over": {
"percent": 10
}
}
},
"require_same_person": True
}).json()