Ids
Every record id is a prefix that names its Noun and a 10-character opaque body that nothing ever parses.
A record's id is a prefix, an underscore and a 10-character body. cus_K1BROJhqzZ is Riverside Property, a Customer of Leaseline.
Prefix, then body
| Part | In cus_K1BROJhqzZ | Rule |
|---|---|---|
| Prefix | cus | Names the Noun. One prefix per Noun, in lowercase letters and digits. |
| Separator | _ | Splits the prefix from the body. |
| Body | K1BROJhqzZ | 10 characters from A to Z, a to z and 0 to 9. Opaque. |
Prefixes are short where Stripe set the pattern: cus for a Customer, sub for a Subscription, inv for an Invoice and evt for an Event. Every other Noun uses its own name, such as offer and startup.
A Noun a Startup adds takes its own name as its prefix. Leaseline's Lease records are ids such as lease_4loEed1JG4.
Never parse the body
The body holds no date, no counter and no type, and its length never changes. Store an id whole, compare it whole, and pass it back unchanged.
- To learn the Noun, read the prefix or the record's
$type. - To order records, sort by
createdAtor by an Event'sseq, never by id. - To learn whether a record exists,
getit: a well-formed id can name nothing.
Where an id goes
An id is the last segment of the record's $id. Every input that names a record takes either form:
import { $ } from 'startup-builder'
await $.Invoice.collect({ invoice: 'inv_FXANyzQojc' })
await $.Invoice.collect({ invoice: 'https: //api.sb/ leaseline.app/ invoices/ inv_FXANyzQojc' })The namespace in $id names the Startup that holds the record, and an id is unique within its namespace.
Keys are not ids
A key is a credential, never a record id. leaseline_sk_live_ begins every live secret key Leaseline's Customers hold: the Brand, the kind and the environment.
The API Key record behind a key has an id of its own, key_KpTRSdhqzZ, and no $id ever holds the secret. Keys lists every kind.
Every prefix
| Noun | Prefix | Example | In |
|---|---|---|---|
| Access Level | access_ | access_j5KyKnerKB | leaseline.app |
| Account | acct_ | acct_nV4f0K7dTw | leaseline.app |
| Acquisition | acquisition_ | acquisition_cWFeSd4Drs | leaseline.app |
| Action | act_ | act_br07HsG8MG | leaseline.app |
| Ad | ad_ | ad_yVW4IAmeOW | leaseline.app |
| Agent | agent_ | agent_tCzKDMorKn | leaseline.app |
| Agreement | agreement_ | agreement_zHIUnX8LwY | leaseline.app |
| API Key | key_ | key_BG13nfhe26 | ratebook.dev |
| App | app_ | app_sAebuEW683 | leaseline.app |
| Approval | approval_ | approval_TlxQeWh9uX | leaseline.app |
| Attestation | attestation_ | attestation_reixEU2HGB | tutorloop.com |
| Audience | audience_ | audience_vmVkEYrXCN | leaseline.app |
| Audit | audit_ | audit_fc7p71vG8s | leaseline.app |
| Availability | availability_ | availability_8Zj0a7vvRl | leaseline.app |
| Bill | bill_ | bill_Zorj7Zkbtc | leaseline.app |
| Brand | brand_ | brand_PluVQrB1HF | leaseline.app |
| Budget | budget_ | budget_qnCdsFGLVN | leaseline.app |
| Builder | builder_ | builder_rD7xw2HGBD | leaseline.app |
| Campaign | campaign_ | campaign_NYwCp4DcII | leaseline.app |
| Candidate | candidate_ | candidate_CR5hpwMwhW | leaseline.app |
| Capability | capability_ | capability_h9zWCOrAyZ | leaseline.app |
| Capital Call | capcall_ | capcall_ecGmvb6QGO | leaseline.app |
| Capital Commitment | capcommit_ | capcommit_AIP9OFatRR | leaseline.app |
| Card | card_ | card_YkjOnjSexq | leaseline.app |
| Change | change_ | change_3Ex8uVSOyQ | leaseline.app |
| Channel | channel_ | channel_EQ8se34AOW | leaseline.app |
| Cohort | cohort_ | cohort_YxPOKnSexq | leaseline.app |
| Collection | collection_ | collection_txTK8QorKn | leaseline.app |
| Comment | comment_ | comment_MUIgpgdysq | leaseline.app |
| Commission | commission_ | commission_oYhMioUeCH | leaseline.app |
| Company | company_ | company_28zYNZEno0 | leaseline.app |
| Component | component_ | component_1qALyfTlfx | leaseline.app |
| Consent | consent_ | consent_lMkrg7nUGY | leaseline.app |
| Contact | contact_ | contact_WsrosCQi6J | leaseline.app |
| Content | content_ | content_HYlnoorBdP | leaseline.app |
| Control | control_ | control_o4pMmXUeCH | leaseline.app |
| Conversation | conversation_ | conversation_0vg6SDjB6k | leaseline.app |
| Cost | cost_ | cost_2SqYsIEno0 | leaseline.app |
| Coupon | coupon_ | coupon_rAfxMa2HGB | leaseline.app |
| Credential | credential_ | credential_Abb9zatRR1 | leaseline.app |
| Credit Grant | credgr_ | credgr_PduV9IB1HF | leaseline.app |
| Criterion | criterion_ | criterion_GWSHmCK100 | leaseline.app |
| Customer | cus_ | cus_K1BROJhqzZ | leaseline.app |
| Dashboard | dashboard_ | dashboard_QL9I0ALqO4 | leaseline.app |
| Dataset | dataset_ | dataset_UDQXk0KsJB | ratebook.dev |
| Deal | deal_ | deal_NgACZ6DcII | leaseline.app |
| Decision | decision_ | decision_ipoch3tTJh | leaseline.app |
| Demand Budget | demand_ | demand_zQZUG08LwY | leaseline.app |
| Dispute | dp_ | dp_gywlshZJ7A | leaseline.app |
| DNS Record | dns_ | dns_66ja94YImd | leaseline.app |
| Document | document_ | document_af2wijcmRy | leaseline.app |
| Domain | domain_ | domain_VbYut4CTsH | kilnbakery.com |
| Enrollment | enrollment_ | enrollment_t2LKaLorKn | leaseline.app |
| Entitlement | ent_ | ent_7MQACmrzGj | leaseline.app |
| Entry | entry_ | entry_syZbJCW683 | leaseline.app |
| Evaluator | evaluator_ | evaluator_cYmeRK4Drs | clausecheck.ai |
| Event | evt_ | evt_9wPvd8R17L | leaseline.app |
| Evidence | evidence_ | evidence_6xsa6iYImd | leaseline.app |
| Experiment | experiment_ | experiment_IyIJJPngKt | leaseline.app |
| Exposure | exposure_ | exposure_Ua2Xw4KsJB | leaseline.app |
| File | file_ | file_V1AuhyCTsH | leaseline.app |
| Flag | flag_ | flag_1YJLhjTlfx | leaseline.app |
| Flow | flow_ | flow_uuJzIzjvrp | leaseline.app |
| Forecast | forecast_ | forecast_a2kwkwcmRy | leaseline.app |
| Form | form_ | form_lG4rManUGY | leaseline.app |
| Function | function_ | function_6nvaxFYImd | leaseline.app |
| Fund | fund_ | fund_DdBhuF6mF5 | leaseline.app |
| Fund Distribution | dist_ | dist_7RVAPzrzGj | leaseline.app |
| Funnel | funnel_ | funnel_nXbfyw7dTw | leaseline.app |
| Gathering | gathering_ | gathering_ACB9Q1atRR | leaseline.app |
| Goal | goal_ | goal_L9PBQQhfuF | leaseline.app |
| Guard | guard_ | guard_WtKo3jQi6J | leaseline.app |
| Handle | handle_ | handle_FcnNwYQujc | leaseline.app |
| Holder | holder_ | holder_e2Dm5Y6QGO | leaseline.app |
| Human | human_ | human_EeCsrv4AOW | leaseline.app |
| Hypothesis | hypothesis_ | hypothesis_Z1gjx1kbtc | leaseline.app |
| ICP | icp_ | icp_EwhsJU4AOW | leaseline.app |
| Idea | idea_ | idea_912vmxR17L | leaseline.app |
| Implementation | implementation_ | implementation_gnulUgZJ7A | leaseline.app |
| Incident | incident_ | incident_2XOYkIEno0 | leaseline.app |
| Instrument | instrument_ | instrument_yZz4i2meOW | leaseline.app |
| Integration | integration_ | integration_alVwjQcmRy | leaseline.app |
| Interface | interface_ | interface_TMyQ3kh9uX | leaseline.app |
| Interview | interview_ | interview_DZxhK36mF5 | leaseline.app |
| Invoice | inv_ | inv_9sfvgeRT7L | leaseline.app |
| Issue | issue_ | issue_vWekeqrXCN | leaseline.app |
| Key Result | kr_ | kr_fN3pcvG8sq | leaseline.app |
| Keyword | keyword_ | keyword_cEoeFM4Drs | leaseline.app |
| Lead | lead_ | lead_Kz1R9fhqzZ | leaseline.app |
| Lifecycle | lifecycle_ | lifecycle_DfihmW6mF5 | leaseline.app |
| Limit | limit_ | limit_UWHXYVKsJB | leaseline.app |
| Mailbox | mailbox_ | mailbox_93HvOnR17L | leaseline.app |
| Mandate | mandate_ | mandate_mKKPrmFQYD | leaseline.app |
| Mapping | mapping_ | mapping_WOromrQi6J | ratebook.dev |
| Market | market_ | market_4uFEzN14G4 | leaseline.app |
| Meeting | meeting_ | meeting_TyEQGjh9uX | leaseline.app |
| Meeting Type | mtgtype_ | mtgtype_qw2d5yGLVN | leaseline.app |
| Member Directory | directory_ | directory_qZldlwGLVN | leaseline.app |
| Memory | memory_ | memory_Y52OcaSexq | leaseline.app |
| Message | message_ | message_3Dg8ysSOyQ | leaseline.app |
| Meter | mtr_ | mtr_z08Ufi8LwY | ratebook.dev |
| Metric | metric_ | metric_GXFHAlK100 | leaseline.app |
| Minimum Success Criteria | msc_ | msc_3UF8zdSOyQ | leaseline.app |
| Mode | mode_ | mode_oiFMqiUeCH | leaseline.app |
| Monitor | monitor_ | monitor_8Ed0ESvvRl | leaseline.app |
| Motion | motion_ | motion_NK8CerDcII | leaseline.app |
| Newsletter | newsletter_ | newsletter_FLjN3aQujc | leaseline.app |
| Noun | noun_ | noun_v0akLUrXCN | leaseline.app |
| Offer | offer_ | offer_2hzYe1ERo0 | leaseline.app |
| Opening | opening_ | opening_3rD8qFSOyQ | leaseline.app |
| Order | order_ | order_dswDnxf2vt | leaseline.app |
| Organization | organization_ | organization_v0SkRLrXCN | leaseline.app |
| Outcome Contract | outcome_ | outcome_goNlouZJ7A | catalogmend.com |
| Page | page_ | page_A8w9CXatRR | kilnbakery.com |
| Partner | partner_ | partner_YcEOEgSexq | leaseline.app |
| Party | party_ | party_hmQWaPrAyZ | leaseline.app |
| Pay Run | payrun_ | payrun_hqqWu5rAyZ | leaseline.app |
| Payment Source | pm_ | pm_puFT0MuuUM | leaseline.app |
| Period | period_ | period_VEVuYACTsH | leaseline.app |
| Permission | permission_ | permission_1IFL54Tlfx | leaseline.app |
| Person | person_ | person_sLqbXbW683 | leaseline.app |
| Persona | persona_ | persona_YdpO6wSexq | leaseline.app |
| Play | play_ | play_hr4WTcrAyZ | leaseline.app |
| Play Mix | mix_ | mix_TTNQqOh9uX | leaseline.app |
| Policy | policy_ | policy_rTYxr62HGB | leaseline.app |
| Portal | portal_ | portal_DDBhWh6mF5 | kilnbakery.com |
| Portfolio | portfolio_ | portfolio_zkvUnP8LwY | leaseline.app |
| Post | post_ | post_HiXn57rBdP | leaseline.app |
| Price | price_ | price_H8MnXDrBdP | leaseline.app |
| Problem | problem_ | problem_UzvXXfKsJB | leaseline.app |
| Process | process_ | process_X2zteZ3CQI | leaseline.app |
| Product | prod_ | prod_MJmgS5dysq | leaseline.app |
| Product Template | ptpl_ | ptpl_mLTPhHFQYD | leaseline.app |
| Project | project_ | project_pUWTSQuuUM | leaseline.app |
| Proof | proof_ | proof_8mV0dnvvRl | leaseline.app |
| Prospect | prospect_ | prospect_S8bqJCxC9R | leaseline.app |
| Publication | publication_ | publication_7HeATsrzGj | leaseline.app |
| Purpose | purpose_ | purpose_Aoz9nBatRR | leaseline.app |
| Question | question_ | question_zuqUHd8LwY | leaseline.app |
| Quote | qt_ | qt_GZnH5OK100 | leaseline.app |
| Readout | readout_ | readout_dlRDxjf2vt | leaseline.app |
| Recording | recording_ | recording_yPU4aemeOW | leaseline.app |
| Recovery Objective | recovery_ | recovery_MSAgl5dysq | leaseline.app |
| Referral | referral_ | referral_I89J7wngKt | leaseline.app |
| Registration | registration_ | registration_95lvb7R17L | leaseline.app |
| Relationship | relationship_ | relationship_iUVcHztTJh | leaseline.app |
| Renewal | renewal_ | renewal_NrJC9bDcII | leaseline.app |
| Reserved Act | reserved_ | reserved_PKPVsB1HFf | tutorloop.com |
| Resource | resource_ | resource_hIVWDprAyZ | ratebook.dev |
| Review | review_ | review_1XPL2xTlfx | leaseline.app |
| Risk | risk_ | risk_a3Rw0qcmRy | leaseline.app |
| Role | role_ | role_oloMFMUeCH | leaseline.app |
| Role Review | rolereview_ | rolereview_Eflst84AOW | leaseline.app |
| Screening | screening_ | screening_oSWMvQUeCH | leaseline.app |
| Secret | secret_ | secret_UaNXUkKsJB | leaseline.app |
| Sequence | sequence_ | sequence_H7knHGrBdP | leaseline.app |
| Service | service_ | service_Eq1ssq4AOW | catalogmend.com |
| Setting | setting_ | setting_mfZPXxFQYD | leaseline.app |
| Share | share_ | share_yiQ4iEmeOW | leaseline.app |
| Site | site_ | site_kqt1HxwFab | kilnbakery.com |
| Skill | skill_ | skill_xBqG4zTxBA | leaseline.app |
| Software | software_ | software_D5qhJn6mF5 | leaseline.app |
| Source | source_ | source_DIdhfB6mF5 | ratebook.dev |
| SSO Connection | sso_ | sso_gFlPhZJ7A7 | leaseline.app |
| Standard | standard_ | standard_F9HNNHQujc | ratebook.dev |
| Startup | startup_ | startup_l3hr1EnUGY | leaseline.app |
| Startup Template | stpl_ | stpl_9OivLWR17L | leaseline.app |
| Statement | statement_ | statement_q6edL5GLVN | leaseline.app |
| Story | story_ | story_ujkz1xjvrp | leaseline.app |
| Studio | studio_ | studio_JCwiflZmXb | leaseline.app |
| Subscription | sub_ | sub_whVFaHKWIV | leaseline.app |
| Supplier | supplier_ | supplier_QTsIMiLqO4 | tutorloop.com |
| Suppression | suppression_ | suppression_Ssbq90xC9R | leaseline.app |
| Survey | survey_ | survey_NLUCLYDcII | leaseline.app |
| System | system_ | system_uGWze2jvrp | leaseline.app |
| Task | task_ | task_tVPKjporKn | leaseline.app |
| Team | team_ | team_v8KkFBrXCN | leaseline.app |
| Template | template_ | template_THRQF1h9uX | leaseline.app |
| Tenant | ten_ | ten_Bu63f0he26 | leaseline.app |
| Theme | theme_ | theme_sZHbu0W683 | kilnbakery.com |
| Thing | thing_ | thing_8ds0r9vvRl | leaseline.app |
| Thread | thread_ | thread_GzIHRhK100 | leaseline.app |
| Tool | tool_ | tool_aTLwY2cmRy | leaseline.app |
| Transaction | txn_ | txn_XoxtZe3CQI | leaseline.app |
| Trigger | trigger_ | trigger_Hg9n0lrBdP | leaseline.app |
| Variant | variant_ | variant_nvdfmt7dTw | leaseline.app |
| Verb | verb_ | verb_hlkWBvrAyZ | leaseline.app |
| Version | version_ | version_4HTEMs14G4 | leaseline.app |
| Video | video_ | video_xVlGG2TxBA | leaseline.app |
| Visit | visit_ | visit_7qNAATrzGj | leaseline.app |
| Visitor | visitor_ | visitor_M5gHadysq9 | leaseline.app |
| Voice | voice_ | voice_s6Qb8KW683 | leaseline.app |
| Waitlist | waitlist_ | waitlist_rBixb72HGB | leaseline.app |
| Watch | watch_ | watch_9o4vCuR17L | leaseline.app |
| Worker | worker_ | worker_whZFpOKWIV | leaseline.app |
| Workflow | workflow_ | workflow_2dhYBlEno0 | leaseline.app |