The Tradehaus API, in beta.
Keep Tradehaus and the CRM or ERP you already run in step: read your pipeline, Directory, notes, quotes and activity, and write notes and deal stages.
This is the API as it will ship: keys are made by Tradehaus for customers, on request.
Quickstart
Every request goes to https://app.tradehaus.ai/api/v1 with your key as a bearer token.
Ask for a key
Tradehaus makes it for your company, read-only or read and write. It is shown once, so keep it as a secret.
Check it
curl https://app.tradehaus.ai/api/v1/key \ -H "Authorization: Bearer $TRADEHAUS_KEY"Pull the pipeline
Page through with next_cursor; next time, ask only for what changed.
curl "https://app.tradehaus.ai/api/v1/deals?limit=100&updated_since=2026-11-01" \ -H "Authorization: Bearer $TRADEHAUS_KEY"Write back
Move a deal when it moves in your CRM, or log a note.
curl -X PATCH https://app.tradehaus.ai/api/v1/deals/{project_id} \ -H "Authorization: Bearer $TRADEHAUS_KEY" \ -H "Content-Type: application/json" \ -d '{"stage": "won"}'
Two kinds of data
The Terms of Use (sections 5 to 7) separate two kinds of data, and the API follows them.
- Customer Data is what a company's team enters or creates in Tradehaus: deals, the Directory, notes, quotes, activity and the projects the company added itself. It belongs to the company. The API serves all of it, page by page.
- Tradehaus Data is the permit projects, parcels, licences and firms Tradehaus compiles. It is licensed for use inside Tradehaus and does not leave it in bulk. The API serves a permit project only once the company has acted on it in the app (given it a stage or a star, written a note, saved a quote or logged activity on it), one project at a time by id, inside the company's markets, with a daily ceiling. Every other project reads as not found. There is no endpoint that lists projects or firms, and the API's own writes do not count as acting on a project.
Each object below is marked Customer or Tradehaus. A field marked (T) inside a Customer object is Tradehaus Data shown for context.
Keys and access
- Tradehaus makes keys for a customer on request (staff, in Super admin, on the customer's API tab). Customers cannot make keys themselves.
- A key looks like
th_live_followed by 43 characters (th_test_outside production). It is shown once when it is made. Tradehaus keeps only its SHA-256 hash, so a lost key cannot be recovered; staff revoke it and make another. - Send it on every request:
Authorization: Bearer th_live_…. - A key belongs to one company and sees only that company's records. The company comes from the key, never from the request.
- Scopes:
read(every GET) andwrite(POST and PATCH). A write key can also read. A read key gets403 insufficient_scopeon a write. - Revoking a key stops it on its next request (
401 key_revoked). A suspended company's keys get403 company_unavailable. - Changes made through the API are recorded in the project's history as made through the API, with the key's id. They have no person as author, so the deal's
updated_byreadsnullafter one.
Limits
| Limit | Value | When reached |
|---|---|---|
| Requests a minute, per key | 60 | 429 rate_limited, Retry-After in seconds until the next minute |
| Requests a day (UTC), per key | 10,000 | 429 rate_limited, Retry-After until midnight UTC |
| Project reads a day, per key | 500 | 429 rate_limited on /projects/{id} only |
| Page size | 100, default 50 | A larger limit is read as 100 |
| Request body | 64 KB on POST /notes, 4 KB on PATCH /deals/{project_id} | 413 payload_too_large |
Every successful response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds until the minute restarts). Tradehaus can see each key's requests by day, its refusals and errors, and its latest 50 requests.
Requests and responses
- Lists return
{ "data": [...], "next_cursor": "..." }. Passnext_cursorback ascursorfor the next page; it isnullon the last page. A cursor works only for the list it came from, filters included (a cursor fromcontacts?account_id=ais refused oncontacts?account_id=b). A cursor that's changed or incomplete gets400 invalid_cursor, never an empty page. - Lists are oldest change first, so a sync can save the last cursor or the newest
updated_atand resume. updated_since(deals, accounts, contacts, firms, quotes) andoccurred_since(activity) take a date (YYYY-MM-DD, midnight UTC) or an ISO 8601 time, and keep items at or after it. A day that doesn't exist, such as2026-02-30, is refused.- One item returns
{ "data": {...} }. - A write body is a JSON object with only the fields its endpoint takes. Malformed JSON, or a field it doesn't take, gets
400 invalid_parameter. - Errors return
{ "error": { "code": "...", "message": "..." } }. The codes are listed under Errors. - Times are ISO 8601 in UTC. Days are
YYYY-MM-DD. - A person is shown as
{ "id", "name" }: a member of the company. It isnullfor a change made through the API or by Tradehaus. - Deleted records are not reported. A Directory company that is archived stays in the list with
archived: true; one deleted outright disappears.
Errors
Every error has the same shape: { "error": { "code", "message" } }. The code is stable and is for your program; the message is for a person and may change.
| Code | Status | When | Retry? |
|---|---|---|---|
unauthorized | 401 | No key, or a key Tradehaus doesn't recognise | No. Check the key |
key_revoked | 401 | The key was revoked | No. Ask for a new key |
insufficient_scope | 403 | A read-only key tried to write | No |
company_unavailable | 403 | The company's access is paused | No. Contact Tradehaus |
method_not_allowed | 405 | The endpoint doesn't take that method | No |
invalid_parameter | 400 | A parameter or body field is missing, out of range or not one the endpoint takes, or the body isn't valid JSON. The message names it | No. Fix the request |
invalid_cursor | 400 | A cursor from another list, or a changed or incomplete one | No. Start the list again without a cursor |
payload_too_large | 413 | The body is over 64 KB (notes) or 4 KB (deals) | No |
not_found | 404 | No such record in this company's view | No |
rate_limited | 429 | A limit was reached | Yes, after Retry-After seconds |
server_error | 500 | Something failed on Tradehaus's side | Yes, with backoff |
Retrying: on 429, wait the number of seconds in Retry-After before the next request; the daily limits reset at midnight UTC. On 500 or a network failure, retry with exponential backoff (for example 1, 2, 4, 8 seconds, then stop and alert). Reads are always safe to retry, and so is moving a deal to a stage, since sending the same stage twice leaves the deal as it was. A note sent twice is saved twice, so retry a note only when you know the first attempt failed.
Endpoints
GET /api/v1/key
The key making the request
GET /api/v1/keyNeeds a read key.
Responses
| Status | When |
|---|---|
200 | OK |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl https://app.tradehaus.ai/api/v1/key \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": {
"id": "key_80b42f8f54812408",
"prefix": "th_test_xxxxxxxx…",
"label": "Test",
"scopes": [
"read",
"write"
],
"created_at": "2026-11-21T18:41:26.000Z",
"company": {
"id": "biz_example",
"name": "Example Flooring Co."
},
"limits": {
"requests_per_minute": 60,
"requests_per_day": 10000,
"project_reads_per_day": 500,
"max_page_size": 100
}
}
}GET /api/v1/deals
Deals in the pipeline, oldest change first
GET /api/v1/dealsNeeds a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
limit | query | No | Items per page, 1 to 100. Default 50. A larger number is read as 100.. 1 to 100. Default 50 |
cursor | query | No | The next_cursor from the previous page. Opaque; only valid for the list it came from. |
updated_since | query | No | Only items changed at or after this time. A date (YYYY-MM-DD, midnight UTC) or an ISO 8601 time. |
stage | query | No | One of new, shortlist, connected, specified, quoted, won, delivered, lost, passed |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A parameter is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl "https://app.tradehaus.ai/api/v1/deals?limit=2" \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": [
{
"id": "a3071226a1",
"project_id": "a3071226a1",
"stage": "new",
"stage_label": "New",
"starred": false,
"lost_reason": null,
"lost_reason_label": null,
"expected_order": null,
"expected_delivery": null,
"category": null,
"tags": [],
"note_count": 3,
"last_note_at": "2026-09-30T22:03:53.078Z",
"added_by_company": false,
"archived": false,
"project": {
"id": "a3071226a1",
"name": null,
"address": "2150 Coastal Sage Ln",
"city": "Encinitas",
"state": "CA",
"zip": "92024",
"region": "sd",
"region_label": "San Diego County"
},
"updated_at": "2026-10-02T00:46:46.407Z",
"updated_by": {
"id": "rep_8k2m4q",
"name": "Sam Rivera"
}
},
{
"id": "c6b6afb962",
"project_id": "c6b6afb962",
"stage": "new",
"stage_label": "New",
"starred": false,
"lost_reason": null,
"lost_reason_label": null,
"expected_order": null,
"expected_delivery": null,
"category": null,
"tags": [],
"note_count": 0,
"last_note_at": null,
"added_by_company": false,
"archived": false,
"project": {
"id": "c6b6afb962",
"name": null,
"address": "845 Mariposa Avenue",
"city": "Los Angeles",
"state": "CA",
"zip": "90063",
"region": "la",
"region_label": "Los Angeles"
},
"updated_at": "2026-10-02T17:45:33.855Z",
"updated_by": {
"id": "rep_8k2m4q",
"name": "Sam Rivera"
}
}
],
"next_cursor": "eyJsIjoiZGVhbHMiLCJhIjoiMjAyNi0xMC0wMlQxNzo0NTozMy44NTVaIiwiaSI6ImM2YjZhZmI5NjIifQ"
}GET /api/v1/deals/{project_id}
One deal
GET /api/v1/deals/{project_id}Needs a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
project_id | path | Yes | The id of the project the deal is on. Up to 200 characters |
Responses
| Status | When |
|---|---|
200 | OK |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
404 | No deal on that project |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl https://app.tradehaus.ai/api/v1/deals/6c41738038 \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": {
"id": "6c41738038",
"project_id": "6c41738038",
"stage": "quoted",
"stage_label": "Quoted",
"starred": false,
"lost_reason": null,
"lost_reason_label": null,
"expected_order": null,
"expected_delivery": null,
"category": null,
"tags": [],
"note_count": 1,
"last_note_at": "2026-11-21T18:41:52.232Z",
"added_by_company": false,
"archived": false,
"project": {
"id": "6c41738038",
"name": null,
"address": "1180 NW Ridgeline Dr",
"city": "Bend",
"state": "OR",
"zip": "97703",
"region": "bnd",
"region_label": "Bend"
},
"updated_at": "2026-11-21T18:41:53.193Z",
"updated_by": null
}
}PATCH /api/v1/deals/{project_id}
Move a deal to a stage
PATCH /api/v1/deals/{project_id}Works only on a project the company has already acted on in the app, or added itself. The change is recorded in the project’s history as made through the API.
Needs a write key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
project_id | path | Yes | The id of the project the deal is on. Up to 200 characters |
Body
| Field | Required | Values |
|---|---|---|
stage | Yes | One of new, shortlist, connected, specified, quoted, won, delivered, lost, passed |
lost_reason | No | Only with stage lost. One of price, competitor, stalled, no_response, timing, other, |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A field is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
404 | No project with that id among the ones the company has acted on |
413 | The body is larger than 4 KB |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl -X PATCH https://app.tradehaus.ai/api/v1/deals/6c41738038 \
-H "Authorization: Bearer $TRADEHAUS_KEY" \
-H "Content-Type: application/json" \
-d '{"stage":"quoted"}'Example response · 200
{
"data": {
"id": "6c41738038",
"project_id": "6c41738038",
"stage": "quoted",
"stage_label": "Quoted",
"starred": false,
"lost_reason": null,
"lost_reason_label": null,
"expected_order": null,
"expected_delivery": null,
"category": null,
"tags": [],
"note_count": 1,
"last_note_at": "2026-11-21T18:41:52.232Z",
"added_by_company": false,
"archived": false,
"project": {
"id": "6c41738038",
"name": null,
"address": "1180 NW Ridgeline Dr",
"city": "Bend",
"state": "OR",
"zip": "97703",
"region": "bnd",
"region_label": "Bend"
},
"updated_at": "2026-11-21T18:41:53.193Z",
"updated_by": null
}
}GET /api/v1/accounts
Directory companies, oldest change first
GET /api/v1/accountsNeeds a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
limit | query | No | Items per page, 1 to 100. Default 50. A larger number is read as 100.. 1 to 100. Default 50 |
cursor | query | No | The next_cursor from the previous page. Opaque; only valid for the list it came from. |
updated_since | query | No | Only items changed at or after this time. A date (YYYY-MM-DD, midnight UTC) or an ISO 8601 time. |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A parameter is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl "https://app.tradehaus.ai/api/v1/accounts?limit=2" \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": [
{
"id": "7f5865cc-6872-41ca-99fc-30145018838d",
"name": "Northfield Architecture",
"dba": null,
"type": "other",
"type_label": "Other",
"roles": [],
"status": "prospect",
"status_label": "Prospect",
"tier": null,
"market": null,
"owner": {
"id": "member_d2cb721288a873b1bfd2338da169a7c7",
"name": "Alex (Admin)"
},
"source": "permit",
"source_note": null,
"phone": null,
"email": null,
"website": null,
"instagram": null,
"locations": [],
"commercial": {
"customer_number": null,
"default_discount_pct": null,
"payment_terms": null,
"credit_limit": null,
"resale_cert_number": null,
"resale_cert_expires": null,
"billing_email": null,
"tax_id": null,
"po_required": false,
"displays": null,
"brands_carried": [],
"annual_sf_potential": null
},
"firm_key": "firm|northfield architecture",
"project_ids": [
"a7d08005bf",
"1f3ee52594",
"d1c6bc1a03"
],
"notes": null,
"archived": false,
"created_at": "2026-11-05T21:37:39.844Z",
"updated_at": "2026-11-05T21:38:09.816Z",
"created_by": {
"id": "member_d2cb721288a873b1bfd2338da169a7c7",
"name": "Alex (Admin)"
}
}
],
"next_cursor": "eyJsIjoiYWNjb3VudHMiLCJhIjoiMjAyNi0xMS0wNVQyMTozODowOS44MTZaIiwiaSI6IjdmNTg2NWNjLTY4NzItNDFjYS05OWZjLTMwMTQ1MDE4ODM4ZCJ9"
}GET /api/v1/contacts
Directory people, oldest change first
GET /api/v1/contactsNeeds a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
limit | query | No | Items per page, 1 to 100. Default 50. A larger number is read as 100.. 1 to 100. Default 50 |
cursor | query | No | The next_cursor from the previous page. Opaque; only valid for the list it came from. |
updated_since | query | No | Only items changed at or after this time. A date (YYYY-MM-DD, midnight UTC) or an ISO 8601 time. |
account_id | query | No | Only people at this company |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A parameter is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl "https://app.tradehaus.ai/api/v1/contacts?limit=2" \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": [
{
"id": "c2f1a7e0-5b8d-4f2e-9a61-3d0c7b9e4a12",
"account_id": "7f5865cc-6872-41ca-99fc-30145018838d",
"first_name": "Dana",
"last_name": "Morrow",
"title": "Principal",
"buying_role": "specifier",
"buying_role_label": "Specifier",
"roles": [
"specifier"
],
"primary": true,
"email": "[email protected]",
"mobile": "555-0142",
"office": null,
"preferred_channel": "email",
"best_time": "Mornings",
"linkedin": null,
"instagram": null,
"location_id": null,
"status": "active",
"do_not_contact": false,
"notes": null,
"created_at": "2026-11-05T21:40:12.511Z",
"updated_at": "2026-11-05T21:40:12.511Z",
"created_by": {
"id": "member_d2cb721288a873b1bfd2338da169a7c7",
"name": "Alex (Admin)"
}
}
],
"next_cursor": null
}GET /api/v1/firms
Firms the company has a relationship with, oldest change first
GET /api/v1/firmsNeeds a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
limit | query | No | Items per page, 1 to 100. Default 50. A larger number is read as 100.. 1 to 100. Default 50 |
cursor | query | No | The next_cursor from the previous page. Opaque; only valid for the list it came from. |
updated_since | query | No | Only items changed at or after this time. A date (YYYY-MM-DD, midnight UTC) or an ISO 8601 time. |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A parameter is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl "https://app.tradehaus.ai/api/v1/firms?limit=2" \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": [
{
"key": "firm|harbor line builders",
"name": "harbor line builders",
"relationship": "intro",
"relationship_label": "Intro",
"relationship_set_by": null,
"relationship_at": null,
"follow": false,
"labels": [],
"account_id": null,
"updated_at": "2026-10-07T02:50:49.338Z"
},
{
"key": "firm|oak and stone studio",
"name": "oak and stone studio",
"relationship": "active",
"relationship_label": "Active",
"relationship_set_by": null,
"relationship_at": null,
"follow": false,
"labels": [],
"account_id": null,
"updated_at": "2026-10-21T14:58:58.300Z"
}
],
"next_cursor": "eyJsIjoiZmlybXMiLCJhIjoiMjAyNi0xMC0yMVQxNDo1ODo1OC4zMDBaIiwiaSI6ImZpcm18b2FrIGFuZCBzdG9uZSBzdHVkaW8ifQ"
}GET /api/v1/notes
A project’s notes, oldest first
GET /api/v1/notesNeeds a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
project_id | query | Yes | Up to 200 characters |
limit | query | No | Items per page, 1 to 100. Default 50. A larger number is read as 100.. 1 to 100. Default 50 |
cursor | query | No | The next_cursor from the previous page. Opaque; only valid for the list it came from. |
Responses
| Status | When |
|---|---|
200 | OK |
400 | project_id is missing |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl "https://app.tradehaus.ai/api/v1/notes?project_id=6c41738038" \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": [
{
"id": "2026-11-21T18:41:52.232Z",
"project_id": "6c41738038",
"kind": "text",
"body": "Measured the great room; revised quote goes out Friday.",
"transcript": null,
"has_media": false,
"duration_ms": null,
"via": "api",
"created_at": "2026-11-21T18:41:52.232Z",
"created_by": null
}
],
"next_cursor": null
}POST /api/v1/notes
Add a text note to a project
POST /api/v1/notesNeeds a write key.
Body
| Field | Required | Values |
|---|---|---|
project_id | Yes | Up to 200 characters |
body | Yes | Up to 8,000 characters, counted as characters, not bytes. Longer text is refused with 400, never cut short.. Up to 8,000 characters |
Responses
| Status | When |
|---|---|
201 | Created |
400 | A field is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
404 | No project with that id among the ones the company has acted on |
413 | The body is larger than 64 KB |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl -X POST https://app.tradehaus.ai/api/v1/notes \
-H "Authorization: Bearer $TRADEHAUS_KEY" \
-H "Content-Type: application/json" \
-d '{"project_id":"6c41738038","body":"Measured the great room; revised quote goes out Friday."}'Example response · 201
{
"data": {
"id": "2026-11-21T18:41:52.232Z",
"project_id": "6c41738038",
"kind": "text",
"body": "Measured the great room; revised quote goes out Friday.",
"transcript": null,
"has_media": false,
"duration_ms": null,
"via": "api",
"created_at": "2026-11-21T18:41:52.232Z",
"created_by": null
}
}GET /api/v1/quotes
Saved quotes, oldest first
GET /api/v1/quotesNeeds a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
limit | query | No | Items per page, 1 to 100. Default 50. A larger number is read as 100.. 1 to 100. Default 50 |
cursor | query | No | The next_cursor from the previous page. Opaque; only valid for the list it came from. |
updated_since | query | No | Only quotes saved at or after this time. Quotes never change once saved. |
project_id | query | No | Only this project’s quotes (its latest 100) |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A parameter is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl "https://app.tradehaus.ai/api/v1/quotes?limit=2" \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": [
{
"id": "77106a391d~2026-10-02T02:02:26.351Z",
"project_id": "77106a391d",
"number": null,
"created_at": "2026-10-02T02:02:26.351Z",
"created_by": {
"id": "rep_8k2m4q",
"name": "Sam Rivera"
},
"brand_id": "example",
"product_id": "oak-natural",
"product_name": "Oak · Natural",
"format": "plank",
"thickness_in": null,
"width_in": null,
"length": "3'6 1/2\"-9'10\"",
"grade": "Select",
"list_usd_per_sf": 38.59,
"discount_pct": 43,
"area_mode": "exact",
"home_sf": 2974,
"exact_area_sf": 1800,
"coverage": 1,
"value_low": 43553,
"value_high": 43553,
"currency": "USD",
"note": null
}
],
"next_cursor": "eyJsIjoicXVvdGVzIiwiayI6eyJjcmVhdGVkQXQiOiIyMDI2LTEwLTAyVDAyOjAyOjI2LjM1MVoiLCJidXNpbmVzc0lkIjoiYml6X2V4YW1wbGUiLCJidXNpbmVzc1Byb2plY3QiOiJiaXpfZXhhbXBsZSM3NzEwNmEzOTFkIn19"
}GET /api/v1/activity
Logged activity, oldest first
GET /api/v1/activityNeeds a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
limit | query | No | Items per page, 1 to 100. Default 50. A larger number is read as 100.. 1 to 100. Default 50 |
cursor | query | No | The next_cursor from the previous page. Opaque; only valid for the list it came from. |
occurred_since | query | No | Only activity that happened at or after this time (the at field). A date or an ISO 8601 time. |
project_id | query | No | One project’s timeline (its latest 500) |
account_id | query | No | One Directory company’s timeline (its latest 500) |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A parameter is not valid |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl "https://app.tradehaus.ai/api/v1/activity?limit=2" \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": [
{
"id": "085c475a-1267-6114-becf-9bb63fa217dc",
"kind": "visit",
"kind_label": "Visit",
"at": "2026-10-08T15:21:26.528Z",
"body": null,
"duration_min": null,
"project_id": "d3911e484d",
"project_label": "410 Harbor View",
"account_id": null,
"account_label": null,
"contact_id": null,
"contact_label": null,
"linked_account_ids": [],
"samples": null,
"visit": {
"auto": false,
"stopIndex": 0,
"routeDay": "2026-10-08",
"arrivedAt": "2026-10-08T15:21:26.528Z",
"leftAt": "2026-10-08T15:38:02.033Z"
},
"via": "field",
"created_by": {
"id": "rep_8k2m4q",
"name": "Sam Rivera"
},
"created_at": "2026-10-08T15:21:26.637Z",
"updated_at": "2026-10-08T15:38:02.147Z"
}
],
"next_cursor": "eyJsIjoiYWN0aXZpdHkiLCJrIjp7ImJ1c2luZXNzSWQiOiJiaXpfZXhhbXBsZSIsInNrIjoiMjAyNi0xMC0wOFQxNToyMToyNi41MjhaIzA4NWM0NzVhLTEyNjctNjExNC1iZWNmLTliYjYzZmEyMTdkYyJ9fQ"
}GET /api/v1/projects/{id}
One project the company has acted on
GET /api/v1/projects/{id}Counts against the key’s daily project reads. There is no list of projects.
Needs a read key.
Parameters
| Parameter | In | Required | What it does |
|---|---|---|---|
id | path | Yes | Up to 200 characters |
Responses
| Status | When |
|---|---|
200 | OK |
401 | Missing, unknown or revoked key |
403 | The key lacks the scope, or the company is paused |
404 | No project with that id among the ones the company has acted on |
429 | Rate limited. Retry-After says how many seconds to wait. |
500 | Server error |
Example request
curl https://app.tradehaus.ai/api/v1/projects/6c41738038 \
-H "Authorization: Bearer $TRADEHAUS_KEY"Example response · 200
{
"data": {
"id": "6c41738038",
"source": "tradehaus",
"name": null,
"address": "1180 NW Ridgeline Dr",
"city": "Bend",
"state": "OR",
"zip": "97703",
"region": "bnd",
"region_label": "Bend",
"kind": "new_build",
"kind_label": "New build",
"phase": "plan_check",
"phase_label": "Plan check",
"valuation": 273000,
"sqft": 3102,
"units": 1,
"description": "New single-family home, two stories with attached garage",
"first_filed": "2026-10-01",
"last_activity": "2026-10-01",
"permit_count": 1,
"parties": [
{
"name": "Northfield Architecture",
"role": "architect"
}
],
"deal": {
"stage": "quoted",
"starred": false,
"updated_at": "2026-11-21T18:41:53.193Z"
}
}
}Objects
Deal (Customer)
A project in the company's pipeline. Its id is the id of the project it is on. A project the company added is always listed; a permit project is listed once someone gives it a stage or a star. A deal taken out of the pipeline stays in the list with stage new, so a sync sees it leave.
| Field | Meaning |
|---|---|
id, project_id | The project the deal is on |
stage | new, shortlist, connected, specified, quoted, won, delivered, lost or passed (Not a fit). The app calls this the status |
stage_label | The stage as the app shows it |
starred | Starred in the app |
lost_reason, lost_reason_label | Why it was lost: price, competitor, stalled, no_response, timing, other |
expected_order, expected_delivery | The days the company expects the order and the delivery |
category | The company's own category for the project, when it changed the one from the permit |
tags | The company's tags |
note_count, last_note_at | How many notes it has and when the newest was written. Use them to know which projects' notes to fetch |
added_by_company | The company entered this project itself |
archived | An added project that was archived |
project | Where it is: name, address, city, state, ZIP and market. (T) for a permit project. null when the project is outside the company's current markets |
updated_at, updated_by | The last change to the deal and who made it |
To change a deal: PATCH /api/v1/deals/{project_id} with { "stage": "quoted" }, or { "stage": "lost", "lost_reason": "price" }. A stage can be set only on a project the company has already acted on in the app, or added itself. Moving a deal to a working stage adds the project's firms to the Directory, as it does in the app. It does not start paid research. A new lost_reason on a deal already lost is recorded in its history too. lost_reason is allowed only with stage lost.
Account (Customer)
A company in the Directory.
| Field | Meaning |
|---|---|
id | The account's id |
name, dba | Its name and trading name |
type, type_label | dealer, flooring_contractor, builder, developer, architect, designer, homeowner or other |
roles | buyer, specifier or both |
status, status_label | prospect, active, dormant, do_not_sell |
tier | A, B or C |
market | The market it belongs to |
owner | The member who owns the account |
source, source_note | How it came to the company: permit, referral, trade_show, showroom, website, campaign, existing, other |
phone, email, website, instagram | How to reach it |
locations | Its places: office, showroom, warehouse, studio, billing, ship-to or site, with address, hours and which is primary |
commercial | Terms when entered: customer number, default discount, payment terms, credit limit, resale certificate, billing email, tax id, whether a PO is required, displays, brands carried, yearly square-foot potential |
firm_key | The Tradehaus firm this account lies over, when it was made from one (see Firm) |
project_ids | Projects linked to it |
notes | Free text |
archived | Taken out of the Directory but kept |
created_at, updated_at, created_by | When it was added and last changed, and who added it |
Contact (Customer)
A person in the Directory. Filter by company with account_id.
| Field | Meaning |
|---|---|
id, account_id | The person and their company |
first_name, last_name, title | Who they are |
buying_role, buying_role_label | decision_maker, specifier, purchaser, accounts_payable, project_manager, site_lead, front_desk, other |
primary | The main contact at their company |
email, mobile, office, preferred_channel, best_time | How and when to reach them. Channel: call, text, email |
linkedin, instagram | Profiles |
location_id | Which of the company's locations they work from |
status | active, or left when they left the company |
do_not_contact | Not to be contacted |
notes | Free text |
created_at, updated_at, created_by | As for accounts |
Firm (Customer, with (T) name)
A firm the company has a relationship with: a stage other than None, followed, or given a lead label. Firms with no relationship are not listed.
| Field | Meaning |
|---|---|
key | The firm key, firm| and the firm's normalised name. The same key an account's firm_key holds |
name | The linked Directory account's name, or else the firm's name from the key (T) |
relationship, relationship_label | none, intro, active, partner |
relationship_set_by | person when someone set it, first_contact when the first logged contact set it to Intro |
relationship_at | When it was set |
follow | New filings from the firm go to the Digest |
labels | The company's lead categories for it |
account_id | The Directory account over this firm, if any |
updated_at | Last change |
Note (Customer)
A note on a project. Listed one project at a time, oldest first: GET /api/v1/notes?project_id=….
| Field | Meaning |
|---|---|
id | Unique within the project |
project_id | The project |
kind | text, or photo, voice or video for a note with media |
body | The text |
transcript | What was said, for a voice or video note |
has_media | It has a photo or recording. Media stays in Tradehaus and is not served |
duration_ms | Length of a recording |
via | api for a note written through the API |
created_at, created_by | When and by whom. created_by is null for a note written through the API |
To add one: POST /api/v1/notes with { "project_id": "…", "body": "…" }, up to 8,000 characters (longer text is refused with 400, never cut short), on a project the company has already acted on in the app, or added itself. Returns 201. In the app, a note from the API can be deleted by a manager or an Admin, and edited by no one.
Quote (Customer)
A saved quote. Quotes never change once saved: a changed quote is saved again as a new one, and a project's newest quote is its current one. updated_since therefore means saved since.
| Field | Meaning |
|---|---|
id | project_id~created_at |
project_id, number | The project, and the company's running quote number |
created_at, created_by | When it was saved and by whom |
brand_id, product_id, product_name | What is being quoted |
format, thickness_in, width_in, length, grade | The product's format and size |
list_usd_per_sf, discount_pct | List price per square foot and the discount off it |
area_mode, home_sf, exact_area_sf, coverage | How the area was worked out |
value_low, value_high | The quote's net value range |
currency | USD unless stated |
note | Free text |
Activity (Customer)
Visits, calls, emails, meetings, samples left and notes logged on projects and companies. Listed oldest first by when it happened (at). occurred_since filters on at; an activity logged today for last week has last week's at, so allow some overlap when syncing. With project_id or account_id, one timeline's latest 500.
| Field | Meaning |
|---|---|
id | The activity |
kind, kind_label | visit, call, email, meeting, sample (samples left), note |
at | When it happened |
body, duration_min | What was said or done, and for how long |
project_id, project_label | The project it was on, and its label as the company saw it |
account_id, account_label, contact_id, contact_label | The company and person it was with |
linked_account_ids | Other Directory companies it also shows on (a visit to a project shows on every company linked to it) |
samples | For samples left: the items and the follow-up in days |
visit | Arrival and departure, for a visit |
via | How it was logged, such as voice or a Drive mode arrival |
created_by, created_at, updated_at | Who logged it, and when it was logged and last changed |
Project (Tradehaus, or Customer when the company added it)
One project by id: GET /api/v1/projects/{id}. A permit project is returned only when it is in the company's markets and history window, the same rule the app uses, and the company has acted on it in the app: given it a stage or a star, written a note, saved a quote or logged activity on it. Any other project reads as not found. A project the company added is its own and is always returned to it. Each call counts against the key's 500 project reads a day. There is no list of projects; reach them through deals.
| Field | Meaning |
|---|---|
id | The project |
source | tradehaus for a permit project, company for one the company added |
name, address, city, state, zip | Where it is |
region, region_label | The market |
kind, kind_label | New build, remodel, addition, ADU and so on |
phase, phase_label | Where the permit stands: design review, planning, plan check, permit issued, closed or inactive |
valuation | The permit valuation in USD. It is the value of the work on the permit, not the company's revenue |
sqft, units | Size |
description | The permit's description of the work |
first_filed, last_activity | First filing and latest activity, as days |
permit_count | Permits on the project |
parties | Firms named on the work, with their role |
deal | The company's deal on it, if there is one: stage, starred, last change |
Changes and versioning
The version is in the path: /api/v1. Within v1, Tradehaus may add endpoints, add fields to responses and add values to lists such as stages and activity kinds, without notice. Build your integration to ignore fields it doesn't know and to accept new values.
A change that could break an integration, such as removing or renaming a field or changing what a field means, comes only in a new version, with v1 kept running while you move. Every company with a key is told by email before a new version ships. Changes are listed on What's new.
Help and terms
For a key, a question or a problem with an integration, get in touch or write to [email protected]. Say which company the key is for, and include the request and the error’s code; never send the key itself.
Using the API is covered by the Terms, the same as the app: Your data (what the API serves in full is yours), Our data (why Tradehaus Data doesn’t leave in bulk) and Acceptable use.
Whether the app, and with it the API, is up is shown on the status page.