UNIFIED CLEARVIEW ENDPOINT
Both Cargo Chain and Screening Log should push records to this single endpoint:
ENDPOINT: https://big-clear-view-flow.base44.app/functions/receiveClearViewUpdate
AUTH HEADER: x-api-key: [CLEARVIEW_INBOUND_API_KEY]
Required fields: mawb, source_app (Screening Log / Cargo Chain), screening_status or acceptance_status, event_timestamp
…
Total Attempts
…
Success Rate
…
Errors
…
Stale Ignored
RUN SYNC DIAGNOSTICS
Tests: create, update, duplicate prevention, malformed AWB rejection, missing source rejection, hyphen normalization.
BACKFILL LEGACY RECORDS
Merges existing ScreeningEntry records into ShipmentMaster using canonical_mawb as the dedupe key. Safe to run multiple times.