Orvelt
API reference

Delivery and preverification

Create, email, and track customer-addressed opinion links.

Delivery operations use the preverifiedLinks permission. A preverified link is a bearer URL that identifies a server-side delivery record. QR code creation and display use the separate qrCodes permission.

GET /project/{projectId}/preverified-links

import { preverifiedLinks } from '@orvelt/business';

const result = await preverifiedLinks.list({
  projectId: 'PROJECT_ID',
  page: 1,
  limit: 25,
  sort: 'newest',
  status: 'issued',
});

if (result.error) throw new Error(result.error.message);
console.log(result.data);
curl --request GET \
  --url "$ORVELT_API_BASE_URL/project/PROJECT_ID/preverified-links?page=1&limit=25&sort=newest&status=issued" \
  --header "x-api-key: $ORVELT_BUSINESS_API_KEY"

status accepts all, issued, clicked, submitted, or expired. You can also pass a text query.

preverifiedLinks.create

POST /project/{projectId}/preverified-links

import { preverifiedLinks } from '@orvelt/business';

const result = await preverifiedLinks.create({
  projectId: 'PROJECT_ID',
  customerEmail: '[email protected]',
  customerReference: 'ORDER-2048',
  validityMinutes: 1440,
});

if (result.error) throw new Error(result.error.message);
console.log(result.data.link);
curl --request POST \
  --url "$ORVELT_API_BASE_URL/project/PROJECT_ID/preverified-links" \
  --header "x-api-key: $ORVELT_BUSINESS_API_KEY" \
  --header "content-type: application/json" \
  --data '{"customerEmail":"[email protected]","customerReference":"ORDER-2048","validityMinutes":1440}'

customerEmail is required. validityMinutes defaults to 10080 (7 days) and accepts whole minutes from 1 through 43200. The response includes verificationId, token, expiresAt, ttlSeconds, validityMinutes, and a complete link.

preverifiedLinks.sendEmail

Send an invitation request

POST /project/{projectId}/preverified-links/email

Create and email a new 7-day link by passing customerEmail:

import { preverifiedLinks } from '@orvelt/business';

const result = await preverifiedLinks.sendEmail({
  projectId: 'PROJECT_ID',
  customerEmail: '[email protected]',
  customerReference: 'ORDER-2048',
});

if (result.error) throw new Error(result.error.message);
console.log(result.data.emailedAt);
curl --request POST \
  --url "$ORVELT_API_BASE_URL/project/PROJECT_ID/preverified-links/email" \
  --header "x-api-key: $ORVELT_BUSINESS_API_KEY" \
  --header "content-type: application/json" \
  --data '{"customerEmail":"[email protected]","customerReference":"ORDER-2048"}'

To email an existing link instead, pass its verificationId and omit the customer fields. The link must belong to the project and remain unexpired.

The response includes verificationId, customerEmail, link, and emailedAt. Orvelt permits one delivery-link email per customer and project every 48 hours. During the cooldown, the operation returns 429 LINK_EMAIL_COOLDOWN with nextEligibleAt. An expired existing link returns 409; create a new link before retrying.

qrCodes.list

List project QR codes

GET /project/{projectId}/qr-codes

import { qrCodes } from '@orvelt/business';

const result = await qrCodes.list({ projectId: 'PROJECT_ID' });
if (result.error) throw new Error(result.error.message);
console.log(result.data.qrCodes);

qrCodes.create

Create a project QR code

POST /project/{projectId}/qr-codes

Pass permanent or rotating as mode:

import { qrCodes } from '@orvelt/business';

const result = await qrCodes.create({
  projectId: 'PROJECT_ID',
  mode: 'rotating',
});

if (result.error) throw new Error(result.error.message);
console.log(result.data.link);

The response includes the QR source metadata and a ready-to-display link. Creating a QR code that already exists for the requested mode returns the current credential.

qrCodes.displayRotating

Display the current rotating credential

POST /project/{projectId}/qr-codes/rotating

This endpoint does not require a QR code ID. It returns a fresh credential for the project's rotating QR source and keeps the current five-minute validity window.

import { qrCodes } from '@orvelt/business';

const result = await qrCodes.displayRotating({ projectId: 'PROJECT_ID' });
if (result.error) throw new Error(result.error.message);
console.log(result.data.link);

Regenerating or revoking QR credentials remains available only through a Business dashboard session.