Hubspot - sgml/signature GitHub Wiki
Mappings
README: Mapping Boutique Proto-CRM Stacks to HubSpot Product Areas via OSI Model
This document maps the components of non-commercial, non-Windows proto-CRM systems (circa 1995–2000) to modern HubSpot CRM product categories using the OSI model as a semantic scaffold. It enables comparative lineage tracing between early open-source CRM logic and contemporary SaaS abstractions.
Scope
- Timeframe: 1995–2000
- Stack: Boutique, open-source, non-Windows
- CRM Type: Proto-CRM (contact tracking, email logging, reminders, reporting)
- Mapping: HubSpot product areas → OSI model layers
HubSpot → OSI Model Mapping
| HubSpot Product Area | OSI Model Layers Engaged |
|---|---|
| Marketing Hub | Layer 7 (Application), Layer 6 (Presentation) |
| Sales Hub | Layer 7 (Application), Layer 5 (Session) |
| Service Hub | Layer 7 (Application), Layer 4 (Transport) |
| CMS Hub | Layer 7 (Application), Layer 6 (Presentation), Layer 3 (Network) |
| Operations Hub | Layer 7 (Application), Layer 2 (Data Link), Layer 1 (Physical) |
Example: FreeBSD CRM Stack (1999)
| Component | HubSpot Analog | OSI Layer(s) |
|---|---|---|
| HTML + JavaScript | CMS Hub | 7, 6 |
| Perl CGI Scripts | Sales Hub | 7, 5 |
| PostgreSQL | Sales Hub | 7 |
| sendmail + Mail::Send | Marketing Hub | 7 |
| cron + rsync | Operations Hub | 7, 2, 1 |
OSI Model Layers and Related RFCs
| OSI Layer | Name | Function Summary | Key RFCs & Notes |
|---|---|---|---|
| 7 | Application | Interfaces for end-user services (e.g., HTTP, SMTP) | RFC 5321 (SMTP), RFC 7230 (HTTP/1.1), RFC 1939 (POP3), RFC 3501 (IMAP) |
| 6 | Presentation | Data translation, encryption, compression | RFC 1421–1424 (PEM), RFC 2045–2049 (MIME), RFC 5246 (TLS 1.2) |
| 5 | Session | Connection management between applications | RFC 6455 (WebSockets), RFC 5352 (SCTP) |
| 4 | Transport | Reliable delivery, flow control (TCP, UDP) | RFC 793 (TCP), RFC 768 (UDP), RFC 9293 (Updated TCP) |
| 3 | Network | Routing, addressing (IP, ICMP) | RFC 791 (IPv4), RFC 2460 (IPv6), RFC 792 (ICMP), RFC 1191 (Path MTU Discovery) |
| 2 | Data Link | Framing, MAC addressing, error detection | IEEE 802.3 (Ethernet), RFC 894 (IP over Ethernet), RFC 1042 (IP over IEEE 802) |
| 1 | Physical | Transmission media, signaling | Defined by hardware standards (e.g., RS-232, IEEE 802.3); not governed by RFCs |
Usage
This mapping supports:
- Credential lineage overlays
- Migration burden analysis
- Audit hygiene documentation
- Educational reuse in CRM architecture history
Notes
- All components are open-source and non-commercial.
- No Windows-based tools are included.
- Mapping is symbolic and modular, suitable for ASCII-only overlays.
API SDKs
SDK Test Directories
| SDK | Repo URL | Test Directory Path |
|---|---|---|
| Python | https://github.com/HubSpot/hubspot-api-python | /tests/ |
| Node.js | https://github.com/HubSpot/hubspot-api-nodejs | /test/crm/ |
| Java | https://github.com/HubSpot/hubspot-api-java | /src/test/java/com/hubspot/api/crm/ |
PublicObjectSearchRequest Files
| SDK | File Path Example | Purpose |
|---|---|---|
| Python | tests/test_crm_contacts.py | Tests do_search with filters and pagination |
| Node.js | test/crm/contacts.spec.ts | Validates PublicObjectSearchRequest structure |
| Java | CrmSearchApiTest.java | Verifies filter group behavior and limits |
Key Constraints Validated
- Max 5 filterGroups per request
- Max 3 filters per group
- Max 100 properties returned
- Cursor-based pagination via
paging.next.after
References
- https://github.com/HubSpot/hubspot-api-python
- https://github.com/HubSpot/hubspot-api-nodejs
- https://github.com/HubSpot/hubspot-api-java
OpenAPI Hubspot
- http://api.hubspot.com/public/api/spec/v1/specs
- https://developers.hubspot.com/beta-docs/reference/api/deprecated/overview
OAuth
- https://developers.hubspot.com/beta-docs/guides/api/app-management/oauth-tokens
- https://knowledge.hubspot.com/account-security/set-up-single-sign-on-sso
Activity Log
HTTP Response Codes
- 409: duplicate; fix search logic
- 429: rate limit; set a large sleep interval
Certifications
Hubspot Forms
- https://trends.builtwith.com/websitelist/Hubspot-Forms
- https://community.hubspot.com/t5/forums/searchpage/tab/message?q=%22Hubspot%20forms%22
Webhooks
- https://knowledge.hubspot.com/workflows/how-do-i-use-webhooks-with-hubspot-workflows
- https://community.hubspot.com/t5/APIs-Integrations/How-to-implement-Webhooks-in-HubSpot-and-how-do-they-differ-from/m-p/356711
Error Codes
- urllib3.exceptions.MaxRetryError
- urllib3.exceptions.NewConnectionError
- socket.gaierror: [Errno -2] Name or service not known
Properties
- 'hs_object_source': 'IMPORT'
Imports
- https://developers.hubspot.com/docs/api/crm/imports#endpoint?spec=POST-/crm/v3/imports/
- https://community.hubspot.com/t5/APIs-Integrations/Bulk-Import-Date-Format-Problem/td-p/419793
- https://community.hubspot.com/t5/APIs-Integrations/Bulk-Import-CRM-Data-help/m-p/355354
- https://knowledge.hubspot.com/crm-setup/troubleshoot-import-errors
Duplicates
- https://blog.insycle.com/picking-master-record-crm-deduplication
- https://blog.hubspot.com/customers/data-duplication-and-hubspot-impact-your-business
Custom Objects
- https://www.hq-digital.com/blog/custom-associations-between-native-hubspot-objects
- https://developers.hubspot.com/beta-docs/guides/api/crm/objects/custom-objects?uuid=e74719b8-a4d7-4485-a9a2-2edd5025a077
- https://developers.hubspot.com/beta-docs/reference/api/crm/associations/association-details/v3
Custom Search API
- https://github.com/search?q=PublicObjectSearchRequest+filter+property+operator+%22not%22+language%3APython&type=code&l=Python
- https://github.com/HubSpot/hubspot-api-python/issues/49
HubDB CMS API
- https://developers.hubspot.com/docs/cms/data/hubdb
- https://developers.hubspot.com/beta-docs/guides/cms/storage/hubdb/overview
- https://developers.hubspot.com/beta-docs/guides/api/cms/hubdb
Hubspot Markup Language: HubL/JinJava
- https://developers.hubspot.com/docs/cms/hubl
- https://knowledge.hubspot.com/help-and-resources/hubspot-language-offerings
- https://community.hubspot.com/t5/Share-Your-Work/How-to-create-Hubspot-test-dummy-data/m-p/547034
- https://product.hubspot.com/blog/jinjava-a-jinja-for-your-java
- https://github.com/HubSpot/jinjava/blob/b0f8c994f6ccb5aa8b6997895fb2c867c9ee723b/README.md
Hubspot App Marketplace
- https://developers.hubspot.com/beta-docs/guides/apps/public-apps/overview
- https://www.hubspot.com/app-partner-case-studies/aircall
- https://www.hubspot.com/app-partner-case-studies/rollworks
- https://www.hubspot.com/app-partner-case-studies/quotapath
Hubspot Rate Limits and API Request Monitoring
- https://developers.hubspot.com/changelog/2018-11-06-rate-limit-information-headers-will-be-included-in-http-responses
- https://legacydocs.hubspot.com/docs/methods/get-account-details
- https://legacydocs.hubspot.com/docs/faq/working-within-the-hubspot-api-rate-limits
- https://developers.hubspot.com/docs/api/usage-details
- https://legacydocs.hubspot.com/docs/faq/api-request-monitoring
Blogs
- https://developers.hubspot.com/blog/coding-for-marketers-your-guide-to-coding-on-hubspots-cms-hub
- https://developers.hubspot.com/blog/when-to-use-crm-search-api-vs.-object-specific-apis
Idioms
IDS
- IDs go by the name
vid,id, andhs_object_id` in the legacy API, modern contacts API, and modern properties API respectively
Legacy Contacts API
- set both the formSubmissionMode=none and the showListMemberships=false URL params to minimize the signal/noise ratio in the API response
- set the propertyMode=value_only URL param to only return the current property value; unset it to return the history of the property over time
V3 Search API
- The token search filters only accept alphanumeric values, which is different from the Hubspot GUI, which accepts all characters
Custom Object Creation to deserialize JSON
Definition
from hubspot import HubSpot
from hubspot.crm.objects import SimplePublicObjectInput
from hubspot.crm.schemas import ObjectTypeDefinition, ObjectTypePropertyCreate
# Initialize the HubSpot client
client = HubSpot(api_key='your_hubspot_api_key')
# Define the custom object schema
object_type = ObjectTypeDefinition(
name='foo',
labels={'singular': 'Foo', 'plural': 'Foos'},
primaryDisplayProperty='bar'
)
# Define the property for the custom object
property_definition = ObjectTypePropertyCreate(
name='bar',
label='Bar',
type='string',
fieldType='text'
)
# Create the custom object schema
custom_object_response = client.crm.schemas.core_api.create(object_type)
property_response = client.crm.schemas.properties_api.create(
custom_object_response.object_type_id, property_definition
)
print(f"Custom Object Created: {custom_object_response}")
print(f"Property Created: {property_response}")
Instantiation
import json
# Example JSON data
json_data = '{"foo": [{"bar":"baz"}]}'
data = json.loads(json_data)
# Create custom object records
for item in data['foo']:
custom_object = SimplePublicObjectInput(properties={
'bar': item['bar']
})
record_response = client.crm.objects.basic_api.create(
object_type=custom_object_response.object_type_id, simple_public_object_input=custom_object
)
print(f"Custom Object Record Created: {record_response}")