SDK reference · Node SDK

prov.authorize.calls.guestConfirmation

prov.authorize.calls.guestConfirmation in Node SDK. Send a confirmation straight to the guest contact you hold, for a caller not on Provenance.

Signature

prov.authorize.calls.guestConfirmation(id: string, params: GuestConfirmationParams): Promise<CallCheck>

Parameters

idstringRequired
paramsGuestConfirmationParamsRequired

Request fields

idstringpathRequired
The check's ID (ccx_).
contactobject
The guest's phone, email or both, from your own records. Leave it out for a link only confirmation: nothing is sent and the response carries approve_url for you to pass on.
Show child attributes
phonestring
An E.164 phone number (+14155550132). Spaces are removed; nothing else is guessed.
emailstring
An email address, compared in lower case.
text_consentobject
With phone: your statement that the person at this phone agreed to your texts, recorded with the request (the same record as POST /v1/account/text_consents). Needs the consent mode company (409 text_consent_mode_mismatch otherwise) and the Pro plan or higher. Read on capture requests, checkout approvals and checkout assessments; refused on an approver invite.
Show child attributes
methodenumRequired
How the person agreed. One of sign_up_form, in_app, in_person, customer_list.
obtained_attimestampRequired
When they agreed; not in the future.
evidence_urlstring
An https link to how they agreed. Stored, never fetched.
deliveryenum
send: Provenance sends the request on the channels channels allows. self: link only. Nothing is sent and the response returns the link for you to pass on. Left out, a request with no contact is link only and any other takes your account's default (send out of the box). With a default of link only, a request that gives a contact must say send. One of send, self.
channelsarray of enums
Which of Provenance's messages may go, in any order: app_notification (the person's Provenance app, when the contact matches one person there), email and text. Left out, your account's default (all three out of the box). With all three, the person gets the app notification and the email when their contact matches, and the text and the email otherwise; a narrower list sends only what it names (the text goes in the notification's place only with text, the email beside either only with email). Each message is reported on its own in deliveries. A list that can reach none of the contacts is refused, as are sms and app_push.
follow_up_textobject
The follow-up text for this request (or, on PUT /v1/account/reminders, the default). Each key left out takes your account's saved default; the whole object left out takes all three (on, not_opened, 5 minutes out of the box). On a live deployment it is Pro and above (402 plan_required on Free, nothing created or saved); in the sandbox it works on every plan. Refused beside delivery: "self".
Show child attributes
enabledboolean
false sends no follow-up text.
whenenum
not_opened (the default) or not_finished. One of not_opened, not_finished.
after_minutesinteger
A whole number of minutes from 1 to 1440, counted from the notification. On a create it must be shorter than the request's expires_in (400 parameter_invalid on follow_up_text.after_minutes); a longer wait from your default is kept, and the text is skipped as expired if the request ends first.
remindersobject
This request's automatic reminders, in the shape of one product's schedule in Settings (schedules.<kind> on /v1/account/reminders): capture_request for a capture request, checkout_approval for a cart approval (and an assessment's challenge or a guest confirmation), approval for a routed approval. Keys left out take your account's saved values, as a PUT to Settings does: after alone changes the timings of a schedule that is on, and enabled: true turns it on. The cap, the minimum gap and quiet hours apply as built; an offset at or past the request's expiry is left out. Fixed at create: a later change in Settings leaves the request as it was. Refused beside delivery: "self".
Show child attributes
enabledboolean
true tracks this request on the schedule (Pro and above on a live deployment: 402 plan_required on reminders.enabled below Pro, nothing created; every plan in the sandbox); false sends it no automatic reminder (one by hand or by API is still allowed).
afterarray of strings
Up to three offsets from the request's creation (10m, 24h, 3d), increasing, each at least the minimum gap after the one before, at most 7 days. Errors use the Settings messages on reminders.after.
descriptionstringRequired
What the person confirms, shown to them.
amountinteger
An amount to show, in minor units.
currencystring
The three-letter currency code.
waitinteger
Seconds the confirmation stays open. Default 120.

Returns

Promise<CallCheck> The check, waiting for the person.

HTTP operation

POST /v1/authorize/call_checks/{id}/guest_confirmations: Confirm with the guest

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/call_checks`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "from": "+14155550177", "to": "+14155550123", "code": "123456" }),
})).json();
const checkId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/call_checks/${checkId}/guest_confirmations`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "contact": {
      "phone": "+14155550199",
      "email": "rowan@tarrowby.example"
    },
    "description": "Confirm your table for 2 at 7pm Friday"
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.