Ceyltech
  • Home
  • Copy-docs Analysis
  • About
  • Contact
  • Sign in

Export & Webhook Schema

Results can be exported as structured JSON for your own integration with Business Central, SAP, Odoo, NetSuite, Power Automate or other tools. The receiving system needs an integration that accepts the data. Two delivery paths share the same field vocabulary: the download export (Export button in the app: JSON / CSV / Excel) and the webhook (we POST results to your URL automatically).

Schema version: 1. Within a major version we only make additive changes (new fields, new keys). Removals or renames would ship as version 2 with notice, so your integrations won't silently break.

1. Download export (JSON)

Click Export → JSON after an analysis. Shape:

{
  "schemaVersion": 1,
  "generatedAt": "2026-08-05T14:31:22.000Z",
  "source": "Ceyltech Document Checker",
  "fields": {
    "Container Number": {
      "bcSuggestedField": "containerNumber",
      "extractions": [
        { "value": "CRSU6119884", "page": 3, "docType": "Bill of Lading" }
      ]
    },
    "Net Weight": {
      "bcSuggestedField": "netWeight",
      "extractions": [
        { "value": "25.259,68", "page": 1, "docType": "Invoice" }
      ]
    }
  },
  "analysisId": "a1b2c3…",
  "findings": [
    {
      "field": "Net Weight",
      "verdict": "mismatch",
      "status": "handled",
      "by": "Maria Jensen",
      "byEmail": "maria@example.com",
      "at": "2026-11-03T13:05:12Z",
      "note": "Asked the forwarder for a corrected bill of lading"
    },
    {
      "field": "Seal Number",
      "verdict": "missing",
      "status": "open",
      "by": null, "byEmail": null, "at": null, "note": null
    }
  ]
}

Fields contain the occurrences retained by the analysis: the extracted value, page and assigned document type. Reading and normalisation can differ from the printed page, so review the source evidence. bcSuggestedField is a suggested ERP field key (camelCase, Business Central REST v2 vocabulary where one exists).

Findings and what your team did about them

A finding is a check that needs a person: a value that differs between the documents (mismatch), one that needs a second look (warn), or one missing from a document your requirements ask for it on (missing). In the app, anyone in your team can mark a finding handled or ignored, with a short note. findings lists every finding of the check, and every other check someone marked:

KeyWhat it holds
fieldThe checked field, the same name as in fields.
verdictWhat the check found, as the row shows it: mismatch, warn, missing (or match for a check that was marked and has matched since).
statusopen (nobody has marked it), handled or ignored.
by, byEmailWho marked it: their name (or email) and their email. null while open.
atWhen, in UTC (ISO 8601). null while open.
noteThe note, up to 300 characters, or null.

A record never changes the check: a handled mismatch is still a mismatch, so your system can still see what the documents said. analysisId is the id of the check, the same as in the webhook.

Field name → suggested ERP key

FieldSuggested keyFieldSuggested key
Container NumbercontainerNumberSeal NumbersealNumber
Net WeightnetWeightGross WeightgrossWeight
Number of CartonsunitsOfMeasureQuantityHS CodetariffNoCode
PlantsplantNumberProduct Namedescription
Production DateproductionDateExpiry DateexpirationDate
Exporter NamevendorNameExporter AddressvendorAddress
Importer NameshipToNameImporter AddressshipToAddressLine1
Final DestinationsshipToCityLot NumberslotNo
Cargo Tracking NumbercargoTrackingNumber

Custom fields you define keep their own names (non-alphanumeric characters stripped in the key). CSV and Excel exports flatten the same data into one row per extraction: the columns displayName, bcSuggestedField, value, page, docType, then recordStatus, recordBy, recordAt and recordNote, the record of that field's finding as above. The four record columns are empty for a field whose check passed and that nobody marked.

2. Webhook (push)

Configure a URL in Settings → Business Central Integration → Webhook. When enabled, completed results are queued for delivery to that URL. The receiving system must accept the request; delivery can be delayed or fail.

Request

  • POST to your https URL, Content-Type: application/json
  • X-Ceyltech-Event: analysis.completed, finding.updated (only when you turn it on, see below), or webhook.test for test deliveries
  • X-Ceyltech-Signature: sha256=<hex>, the HMAC-SHA256 of the raw request body using your signing secret
  • X-Ceyltech-Timestamp: when we sent it, in whole seconds since 1 January 1970 (UTC), for example 1793711112
  • X-Ceyltech-Timed-Signature: t=<timestamp>,v1=<hex>, the HMAC-SHA256 of the timestamp, a full stop and the raw request body (1793711112.{"schemaVersion": 1, …}), with the same signing secret

Payload

{
  "schemaVersion": 1,
  "event": "analysis.completed",
  "generatedAt": "2026-08-05T14:31:22.000000+00:00",
  "source": "Ceyltech Document Checker",
  "document": {
    "id": "95435df0626642edad5152b293ca271c",
    "analysisId": "a1b2c3…",
    "documentType": "Page 1: Invoice\nPage 2: Invoice\nPage 3: Bill of Lading"
  },
  "fields": {
    "Container Number": [ { "value": "CRSU6119884", "page": 3 } ],
    "Net Weight":       [ { "value": "25.259,68",  "page": 1 } ]
  },
  "findings": [
    { "field": "Net Weight", "verdict": "mismatch", "status": "open",
      "by": null, "byEmail": null, "at": null, "note": null }
  ]
}

findings lists the values that differ between the documents (mismatch) or need a second look (warn), each open: nobody has marked one yet when the check has just finished. The keys are the ones of the download export above. A value missing from a document your requirements name is worked out in the app, so it shows in the download export but not in this list.

When someone marks a finding: finding.updated

Tick Also send a message when someone marks a finding handled or ignored, or opens it again under the webhook in Settings, and every change of a record is POSTed to the same URL, signed the same way, with X-Ceyltech-Event: finding.updated. It stays off until you tick it, so a flow built for analysis.completed only ever gets what it was made for.

{
  "schemaVersion": 1,
  "event": "finding.updated",
  "generatedAt": "2026-11-03T13:05:12.481920+00:00",
  "source": "Ceyltech Document Checker",
  "document": {
    "id": "95435df0626642edad5152b293ca271c",
    "analysisId": "a1b2c3…"
  },
  "finding": {
    "field": "Net Weight",
    "verdict": "mismatch",
    "status": "handled",
    "by": "Maria Jensen",
    "byEmail": "maria@example.com",
    "at": "2026-11-03T13:05:12Z",
    "note": "Asked the forwarder for a corrected bill of lading"
  }
}

status is handled, ignored, or open when someone opened the finding again; by and at then say who did and when, and note is null. Match it to the check with document.analysisId.

Verifying the signature

# Python
import hmac, hashlib
expected = "sha256=" + hmac.new(SECRET.encode(), raw_body, hashlib.sha256).hexdigest()
valid = hmac.compare_digest(expected, request.headers["X-Ceyltech-Signature"])

Always compare against the raw request body bytes, before any JSON parsing. Use the Send test button in Settings to receive a sample payload while building.

Refusing an old delivery (recommended)

A signature alone cannot tell a fresh delivery from an old one that someone recorded on the way and sends to you again. The timed signature can: check it, and refuse any delivery older than five minutes (300 seconds). The time is part of what is signed, so changing t breaks the signature.

# Python
import hmac, hashlib, time

def fresh_and_signed(raw_body, headers, secret, tolerance=300):
    try:
        parts = dict(p.split("=", 1) for p in headers["X-Ceyltech-Timed-Signature"].split(","))
        timestamp = int(parts["t"])
    except (KeyError, ValueError):
        return False
    if abs(time.time() - timestamp) > tolerance:
        return False  # older than 5 minutes, or a clock far off: refuse it
    signed = str(timestamp).encode() + b"." + raw_body
    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))
// Node.js (with Express, read the body as raw bytes: express.raw({ type: 'application/json' }))
const crypto = require('crypto');

function freshAndSigned(rawBody, headers, secret, tolerance = 300) {
  const parts = Object.fromEntries(String(headers['x-ceyltech-timed-signature'] || '')
    .split(',').map(p => p.split('=')));
  const timestamp = Number(parts.t);
  if (!Number.isInteger(timestamp) || Math.abs(Date.now() / 1000 - timestamp) > tolerance) {
    return false; // older than 5 minutes, or a clock far off: refuse it
  }
  const expected = crypto.createHmac('sha256', secret).update(timestamp + '.').update(rawBody).digest('hex');
  const given = Buffer.from(String(parts.v1 || ''));
  const wanted = Buffer.from(expected);
  return given.length === wanted.length && crypto.timingSafeEqual(given, wanted);
}

Keep your server's clock set by an internet time service (NTP): a clock several minutes off refuses good deliveries too. Both signatures use the same signing secret, and Send test carries both, so you can try this before your first real check. X-Ceyltech-Signature stays exactly as it was, so a receiver built on it keeps working.

3. Using it with Power Automate (SAP, Dynamics, Teams, email…)

  1. In Power Automate, create a flow starting with the trigger “When an HTTP request is received.”
  2. Paste the webhook payload above into “Use sample payload to generate schema.”
  3. Save the flow and copy the generated HTTP URL.
  4. Paste that URL into Settings → Webhook in Ceyltech and click Send test.
  5. Add whatever actions you need: create a record in Dynamics, post to Teams, write to SharePoint, forward to your SAP middleware. Power Automate has connectors for hundreds of systems.

The webhook can be received by your own service or automation platform. Authentication, field mapping and any third-party licence requirements depend on the integration you build.

Questions?

We're happy to help you wire this into your systems: contact@ceyltech.com.