SDK reference · Python SDK
prov.mandate.grants.set_over_limit_settings
prov.mandate.grants.set_over_limit_settings in Python SDK. Change the settings for the locks given (an admin key); a grant's own over_limit still comes first.
Signature
prov.mandate.grants.set_over_limit_settings(over_limit: Optional[dict] = …, require_same_person: Optional[bool] = …, at_verify: Optional[str] = …, require_holder_proof: Optional[bool] = …, external: Optional[str] = …, external_online_above: Optional[float] = …) -> AnyParameters
over_limitOptional[dict]require_same_personOptional[bool]at_verifyOptional[str]require_holder_proofOptional[bool]externalOptional[str]external_online_aboveOptional[float]
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
Any 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()