Repository navigation
hubspot: 0-18, 0-72 and 0-64 are read as communications, deal_splits and quote_templates - #746
Conversation
nuriyoo
left a comment
There was a problem hiding this comment.
The three pairings are real's. On 2026-10-15 0-18, 0-72 and 0-64 listed the same records by id as communications, deal_splits and quote_templates (none, none, and the portal's three templates); 0-64 served a template as the name does, its url aside, its search totalled 3 and its batch/read returned the id asked for; and archived=true was the same 400 on the id, the plural and the singular, naming the id each time.
Mapping them in _TYPE_IDS also opens the v4 associations route to them, on either side, since list_associations resolves both types through _resolve_type. Real answers 0-64/{id}/associations/contacts, contacts/{id}/associations/0-64, …/0-18, …/0-72 and 0-64/{id}/associations/0-18 with 200 and no results, as it does for the names, and this branch does the same. The suggestions name that route in the comment, pin two of those answers in the test, and point the test's docstring at the comment it repeats. Nothing else to change.
The record url the body mentions is in the open issue on record properties, which is #377.
At f430c3b (Python 3.12, .[dev]):
3 mutations (an id paired with a type real answers otherwise: 3 caught
0-64 quotes, 0-18 calls, 0-72 deals)
With the suggestions:
pytest (the whole suite) 6070 passed, 37 skipped
ruff check, ruff format --check clean
Measured against api.hubapi.com on 2026-10-15: each id on either side answers what its name does; the comment above _TYPE_IDS records it and the test pins it.
nuriyoo
left a comment
There was a problem hiding this comment.
Thanks for this. I applied the review's suggestion as written, as a maintainer commit, a6009d5: the comment above _TYPE_IDS adds the v4 associations route, which reads each of the three ids on either side as it reads the name, on real and here alike, and the test pins that for 0-64 against contacts and against 0-18.
At c3090f1 (main at 7a551d0 merged in; the tree matches a local merge of the two):
pytest (the whole suite, Python 3.13, .[all,dev]) 9340 passed, 2 skipped
ruff check, ruff format --check clean
Closes #551.
What changed
The objectTypeIds
0-18,0-72and0-64now resolve tocommunications,deal_splitsandquote_templates, the three entries added to_TYPE_IDSinbacklot/routers/hubspot.py. Each id serves what its name serves on the listing, a record, search and batch/read, andarchived=trueon each is the 400 its name already gets from_NO_ARCHIVED_PAGING, naming the same id. Before this, all three were the 400Invalid object or event type id: <id>.The comment above
_TYPE_IDSkeeps its rule that an id is mapped only when it is verified, and says these three are verified by real's own answers rather than by the published list. The other names in_STANDARD_OBJECT_TYPESwith no id stay unmapped: their pairings are unmeasured.Why this is what the real API does
The measurement is the one in #551, against api.hubapi.com on 2026-10-09 by the issue's author:
GET /crm/v3/objects/0-18,/0-72and/0-64answered 200 with the same records as the names,0-64served a record, search and batch/read asquote_templatesdoes, andarchived=trueon each id answered the message its name gets. I have no HubSpot key and did not call the real API.Not in this PR: the issue notes real's record
urlnames0-64; Backlot's records carry nourl, so there is nothing here to change.Verification
Tests —
pyteston a.[dev]install, Ubuntu 24.04 (WSL), Python 3.12.3: 6070 passed, 37 skipped.test_hubspot_0_18_0_72_0_64_are_their_typesfails withbacklot/frommainand passes with this change; it checks the listing, search and the archived refusal for each id, and a record and batch/read on0-64, over a corpus holding one quote template. The issue's reproduction prints the 400 for each id onmainand200 {'results': []}here, ascommunicationsanswers.Optional surfaces that ran rather than skipped — none. This was a
.[dev]install only, sotests/test_sdk.py,tests/test_s3.py,tests/test_mcp.py,tests/test_llamaindex.pyand the reader, Google and mirage tests intests/test_integrations.pysat out. The change touchesbacklot/routers/hubspot.pyandtests/test_hubspot.pyonly.Lint —
ruff check . && ruff format --check .: clean.python scripts/prose_check.py upstream/main: no findings.A test fails without this change
A new endpoint serving corpus content is ACL-scoped, proved for both an admin and a scoped token
Comments state what was measured, not the history of the fix
The second box is not ticked because no endpoint is added.