HubSpot / Dawap editorial lab — 6–7 November 2026

Requirements: Python >=3.11 (standard library); PHP >=8.1 with curl/json/mbstring,
Composer and hubspot/api-client exactly 15.1.0 (official package).

Run locally from the extracted archive:
  python3 test_integration.py
  python3 demo.py
  composer require hubspot/api-client:15.1.0
  php sdk_lab.php
For check_container.php also install symfony/dependency-injection, symfony/config,
symfony/yaml (or set DAWAP_SYMFONY_AUTOLOAD to an existing Symfony autoload.php).
DAWAP_COMPOSER_AUTOLOAD may point to an alternate Composer autoload.php.
services.yaml is an isolated DI example, not a change to this website's services.

Evidence: 58 Python tests (55 fixtures and 3 actual loopback HTTP exchanges),
24 PHP assertions over 6 Guzzle mock requests, plus Symfony container compilation
and SDK instantiation. No external HubSpot requests, real records, email delivery
or ERP writes. Synthetic portals 7/8, contacts 101/102/201/301, company 42, ERP E42.

Python CRM endpoints use /crm/objects/2026-09/.... SDK 15.1.0 actually builds v3
contacts and /crm/v3/objects/0-3 for deals. These are separate contracts. Do not
rename generated SDK paths to pretend the SDK supports dated endpoints.
Read-only communication preferences use v4 results; plan its migration before
v4 support ends in March 2027, according to HubSpot's current changelog.

Scope: select the typed primary company across pages; create one deal per
qualified business request using trusted server-side identities; restrict PATCH
to approved fields; persist effects, alias chains, job generations, preferences
and signed v3 notification batches in SQLite. Delivery deduplication is separate
from business idempotency. The inbox commits before a receiver acknowledges.
Neither the inbox nor this archive is a deployed webhook server or queue worker.
The client uses no redirects or implicit retry. The loopback tests exercise
Client._send directly; they do not redirect an actual HubSpot request.

Production gaps to complete and test in the actual account:
- OAuth refresh, secrets management, scopes, subscriptions/editions and quotas;
- schema/property discovery, pipeline/stage IDs and association label contracts;
- provisioning identity mappings and qualifying native merge/deletion events;
- workers, transactional locking/fencing, concurrent admission, reconciliation,
  outbox dispatch, bounded backoff, monitoring, retention and encryption;
- effects left pending after a lost response deliberately stay blocked. Read
  back and obtain an audited reconciliation decision; no automatic reset API
  is provided. Database reservation alone cannot prove exactly-once execution;
- archived=true on a direct read and manual approval are independent inputs.
  Search absence is never sufficient. A privacy hold cannot resume via this lab;
- can_send is a technical gate for a previously qualified permission. Global
  unsubscribe-all, the fresh native per-subscription state, brand and applicable
  legal basis must be independently verified at dispatch. ALLOWED is an explicit
  input, NOT inferred from an empty response. preference_statuses only reads
  per-type statuses. This program does not implement the global veto adapter,
  decide legal permission, resubscribe or send email;
- v3 verifier requires the app client secret, exact configured public URL and raw
  request bytes, not the Service Key. Select the actual native signature version
  explicitly; no fallback from an invalid v3 signature. A 30-second future
  tolerance is a local policy choice. Validate proxy configuration separately;
- consent, archival, merge and invoice identity have distinct responsibilities.
  The ERP and consent evidence are synthetic and do not constitute a client case.

Sources checked 6–7 November 2026:
https://github.com/HubSpot/hubspot-api-php (15.1.0 / bf2a661f3843ae86f4972a17202d369d971061f7)
https://developers.hubspot.com/docs/api-reference/latest/crm/objects/contacts/guide
https://developers.hubspot.com/docs/api-reference/latest/crm/objects/deals/guide
https://developers.hubspot.com/docs/api-reference/latest/crm/associations/associate-records/guide
https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/request-validation
https://developers.hubspot.com/docs/api-reference/legacy/communication-preferences/guide
https://developers.hubspot.com/changelog/legacy-private-app-creation-sunset
https://developers.hubspot.com/changelog/deprecating-support-for-hubspot-v4-apis

quote_policy.py separately reproduces 8 normalized ADV decisions, 6 invalid-input
guards and 4 boundaries. transfer_quote adds 8 tests of durable reservation and
replay to the main 58-test suite. The ERP is a callback fixture, not a native API.
The native quote read/acceptance adapter, taxes/discounts and concurrency are out
of scope. Existing lines and product occurrences must remain distinct.
SDK v3 paths have a separate September 2027 support deadline:
https://developers.hubspot.com/changelog/legacy-apis-and-legacy-apps-whats-going-unsupported-and-when
