SDK reference · Python SDK
prov.authorize.calls.request
prov.authorize.calls.request in Python SDK. Ask for more during the call: within_scope, or a confirmation to the person while the call holds.
Signature
prov.authorize.calls.request(check_id: str, action_type: str, description: str, amount: Optional[int] = …, currency: Optional[str] = …, wait: Optional[int] = …) -> AnyParameters
check_idstrRequiredaction_typestrRequireddescriptionstrRequiredamountOptional[int]currencyOptional[str]waitOptional[int]
Request fields
idstringpathRequired- The check's ID (
ccx_). action_typestringRequired- What the caller asks for, as a call purpose such as
book. amountinteger | null- The amount in minor units.
currencystring | null- The three-letter currency code.
descriptionstringRequired- The request in a sentence, shown to the person.
waitinteger- Seconds the confirmation stays open. Default 120.
Returns
Any The check, with the request and its status.
HTTP operation
POST /v1/authorize/call_checks/{id}/requests: Ask for more during a call
Errors
- parameter_invalid
- parameter_missing
- authentication_required
- insufficient_scope
- resource_missing
- call_check_not_verified
- trial_ended
- rate_limit_exceeded
- calls_not_configured
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/call_checks/ccx_01M6XS88P2M5MCC1VC53DYC1TJ/requests`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"action_type": "book",
"amount": 45000,
"currency": "USD",
"description": "Private room for 12, with a deposit",
"wait": 120
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/call_checks/ccx_01M6XS88P2M5MCC1VC53DYC1TJ/requests", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"action_type": "book",
"amount": 45000,
"currency": "USD",
"description": "Private room for 12, with a deposit",
"wait": 120
}).json()