Easy Labs
SDKsNode.jsResources

Compliance Forms

Compliance Forms — methods, parameters, and examples for @easylabs/node.

Compliance forms (e.g. card-network agreements, sponsor disclosures) are issued to your company by Easy Labs and must be signed before certain product capabilities are unlocked. The SDK lets you list pending and historical forms, fetch one by ID, and submit a signature.

Methods

easy.listComplianceForms();                      // GET /compliance-forms
easy.getComplianceForm(formId);                  // GET /compliance-forms/:id
easy.signComplianceForm(formId, body);           // PUT /compliance-forms/:id/sign
const forms = await easy.listComplianceForms();
const pending = forms.data.filter((f) => f.status !== "signed");

for (const f of pending) {
  await easy.signComplianceForm(f.id, {
    name: "Ada Lovelace",
    title: "CEO",
  });
}

Object shape

ComplianceFormData:

FieldTypeNotes
idstring
typestringThe form template, e.g. card-network terms.
statusstringpending, signed, etc.
signed_atstring | nullISO timestamp.
signed_name / signed_titlestring | null
due_atstring | nullDeadline before features lock.
metadataRecord<string, unknown>

SignComplianceForm body: { name: string; title: string }.

Examples

Block deploys when a form is overdue

const forms = await easy.listComplianceForms();
const overdue = forms.data.filter(
  (f) => f.status !== "signed" && f.due_at && Date.parse(f.due_at) < Date.now(),
);
if (overdue.length) {
  throw new Error(`Sign these compliance forms first: ${overdue.map((f) => f.type).join(", ")}`);
}

Audit who signed what

const forms = await easy.listComplianceForms();
console.table(
  forms.data.filter((f) => f.signed_at).map((f) => ({
    type: f.type,
    signed_by: `${f.signed_name} (${f.signed_title})`,
    signed_at: f.signed_at,
  })),
);

On this page