@model-match/api 3.17.0 → 3.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-CEo1apoH.d.mts → index-Jxa7eF3K.d.mts} +5200 -6959
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/slim/index.d.mts +64 -253
- package/dist/slim/index.mjs +64 -917
- package/dist/{src-_-RWzjQf.mjs → src-CjmGJZ9U.mjs} +1516 -2369
- package/openapi.json +906 -4252
- package/package.json +2 -2
package/dist/slim/index.mjs
CHANGED
|
@@ -1,871 +1,6 @@
|
|
|
1
|
-
import { n as createClient, w as client } from "../src-
|
|
1
|
+
import { n as createClient, w as client } from "../src-CjmGJZ9U.mjs";
|
|
2
2
|
//#region src/slim/sdk.gen.ts
|
|
3
3
|
/**
|
|
4
|
-
* Search agents with filters
|
|
5
|
-
* Search and list individual real-estate agents with filters — one row per agent. Filter by name, location (state, city, zip), brokerage/office, and production metrics (sales volume, transaction units, price range), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city/zip filters match ANY of an agent's location signals — their listed city/state, their office address(es), AND the markets where they actually closed transactions (production) — combined with OR. So an agent matches a searched location if their office OR their production is there. A search for city "Long Beach" can therefore return agents whose office or displayed primary market is in a different city/state, because they transacted in Long Beach. The `state`/`city` returned on each row reflect the agent's primary market and may differ from the searched location. (Use the `office` filter to match by brokerage/office name, and the per-agent city/county/state breakdown endpoints to rank an agent's volume within a specific market.) RANKING BY DEAL SIDE: combine a location filter with `sort` on `buyerVolume`/`buyerUnits` (or `sellerVolume`/`sellerUnits`, `dualVolume`/`dualUnits`) to rank agents by how active they are representing buyers vs. sellers in that market — e.g. sort `buyerVolume` descending for the most active buyer-side agents in a state or city. This is the per-agent record search: use it to find specific real-estate agents or build a filtered agent list. (For a single agent by ID use the agent detail endpoint.) If you only need how many agents match and not the records themselves, send the same request body to `countAgents`.
|
|
6
|
-
*/
|
|
7
|
-
const listAgents = (options) => {
|
|
8
|
-
return (options?.client ?? client).post({
|
|
9
|
-
security: [{
|
|
10
|
-
name: "x-api-key",
|
|
11
|
-
type: "apiKey"
|
|
12
|
-
}, {
|
|
13
|
-
scheme: "bearer",
|
|
14
|
-
type: "http"
|
|
15
|
-
}],
|
|
16
|
-
url: "/agents",
|
|
17
|
-
...options,
|
|
18
|
-
headers: {
|
|
19
|
-
"Content-Type": "application/json",
|
|
20
|
-
...options?.headers
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Configurable chart (measure × slice) over the agent's sales
|
|
26
|
-
*/
|
|
27
|
-
const agentAnalyticsChart = (options) => {
|
|
28
|
-
return (options?.client ?? client).post({
|
|
29
|
-
security: [{
|
|
30
|
-
name: "x-api-key",
|
|
31
|
-
type: "apiKey"
|
|
32
|
-
}, {
|
|
33
|
-
scheme: "bearer",
|
|
34
|
-
type: "http"
|
|
35
|
-
}],
|
|
36
|
-
url: "/agents/analytics/chart",
|
|
37
|
-
...options,
|
|
38
|
-
headers: {
|
|
39
|
-
"Content-Type": "application/json",
|
|
40
|
-
...options?.headers
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Production summary with buyer/seller/dual split + previous period
|
|
46
|
-
*/
|
|
47
|
-
const agentAnalyticsSummary = (options) => {
|
|
48
|
-
return (options?.client ?? client).post({
|
|
49
|
-
security: [{
|
|
50
|
-
name: "x-api-key",
|
|
51
|
-
type: "apiKey"
|
|
52
|
-
}, {
|
|
53
|
-
scheme: "bearer",
|
|
54
|
-
type: "http"
|
|
55
|
-
}],
|
|
56
|
-
url: "/agents/analytics/summary",
|
|
57
|
-
...options,
|
|
58
|
-
headers: {
|
|
59
|
-
"Content-Type": "application/json",
|
|
60
|
-
...options?.headers
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Agent volume/units over time with buyer/seller/dual split
|
|
66
|
-
*/
|
|
67
|
-
const agentAnalyticsTimeSeries = (options) => {
|
|
68
|
-
return (options?.client ?? client).post({
|
|
69
|
-
security: [{
|
|
70
|
-
name: "x-api-key",
|
|
71
|
-
type: "apiKey"
|
|
72
|
-
}, {
|
|
73
|
-
scheme: "bearer",
|
|
74
|
-
type: "http"
|
|
75
|
-
}],
|
|
76
|
-
url: "/agents/analytics/time-series",
|
|
77
|
-
...options,
|
|
78
|
-
headers: {
|
|
79
|
-
"Content-Type": "application/json",
|
|
80
|
-
...options?.headers
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Submit a bulk-delivery job for agents
|
|
86
|
-
* Queues an ECS task that dumps every matching agents document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/agents/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
87
|
-
*
|
|
88
|
-
* **Row limit.** Deliveries of up to 1,000 rows need no entitlement. Above that, the org's `bulk-delivery.agents` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
89
|
-
*
|
|
90
|
-
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
91
|
-
*/
|
|
92
|
-
const submitAgentsBulkDelivery = (options) => {
|
|
93
|
-
return (options?.client ?? client).post({
|
|
94
|
-
security: [{
|
|
95
|
-
name: "x-api-key",
|
|
96
|
-
type: "apiKey"
|
|
97
|
-
}, {
|
|
98
|
-
scheme: "bearer",
|
|
99
|
-
type: "http"
|
|
100
|
-
}],
|
|
101
|
-
url: "/agents/bulk-delivery",
|
|
102
|
-
...options,
|
|
103
|
-
headers: {
|
|
104
|
-
"Content-Type": "application/json",
|
|
105
|
-
...options?.headers
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Cancel a bulk-delivery job for agents
|
|
111
|
-
* Cancels a queued or running agents delivery job.
|
|
112
|
-
*
|
|
113
|
-
* The job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.
|
|
114
|
-
*
|
|
115
|
-
* Idempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/agents/bulk-delivery/{jobId}` for the settled state.
|
|
116
|
-
*/
|
|
117
|
-
const cancelAgentsBulkDeliveryJob = (options) => {
|
|
118
|
-
return (options.client ?? client).delete({
|
|
119
|
-
security: [{
|
|
120
|
-
name: "x-api-key",
|
|
121
|
-
type: "apiKey"
|
|
122
|
-
}, {
|
|
123
|
-
scheme: "bearer",
|
|
124
|
-
type: "http"
|
|
125
|
-
}],
|
|
126
|
-
url: "/agents/bulk-delivery/{jobId}",
|
|
127
|
-
...options
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* Get bulk-delivery job status for agents
|
|
132
|
-
*/
|
|
133
|
-
const getAgentsBulkDeliveryJob = (options) => {
|
|
134
|
-
return (options.client ?? client).get({
|
|
135
|
-
security: [{
|
|
136
|
-
name: "x-api-key",
|
|
137
|
-
type: "apiKey"
|
|
138
|
-
}, {
|
|
139
|
-
scheme: "bearer",
|
|
140
|
-
type: "http"
|
|
141
|
-
}],
|
|
142
|
-
url: "/agents/bulk-delivery/{jobId}",
|
|
143
|
-
...options
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* Count agents matching filters
|
|
148
|
-
* Return the exact number of agents matching the given filters. Accepts the same request body as `listAgents` (pagination and sort are ignored). Use this when you only need a total; to get the matching agents themselves, send the same request body to `listAgents`.
|
|
149
|
-
*/
|
|
150
|
-
const countAgents = (options) => {
|
|
151
|
-
return (options?.client ?? client).post({
|
|
152
|
-
security: [{
|
|
153
|
-
name: "x-api-key",
|
|
154
|
-
type: "apiKey"
|
|
155
|
-
}, {
|
|
156
|
-
scheme: "bearer",
|
|
157
|
-
type: "http"
|
|
158
|
-
}],
|
|
159
|
-
url: "/agents/count",
|
|
160
|
-
...options,
|
|
161
|
-
headers: {
|
|
162
|
-
"Content-Type": "application/json",
|
|
163
|
-
...options?.headers
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Get agent by ID
|
|
169
|
-
*/
|
|
170
|
-
const getAgent = (options) => {
|
|
171
|
-
return (options.client ?? client).get({
|
|
172
|
-
security: [{
|
|
173
|
-
name: "x-api-key",
|
|
174
|
-
type: "apiKey"
|
|
175
|
-
}, {
|
|
176
|
-
scheme: "bearer",
|
|
177
|
-
type: "http"
|
|
178
|
-
}],
|
|
179
|
-
url: "/agents/{id}",
|
|
180
|
-
...options
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* City volume breakdown across the agent's sales
|
|
185
|
-
*/
|
|
186
|
-
const agentCities = (options) => {
|
|
187
|
-
return (options.client ?? client).post({
|
|
188
|
-
security: [{
|
|
189
|
-
name: "x-api-key",
|
|
190
|
-
type: "apiKey"
|
|
191
|
-
}, {
|
|
192
|
-
scheme: "bearer",
|
|
193
|
-
type: "http"
|
|
194
|
-
}],
|
|
195
|
-
url: "/agents/{id}/breakdowns/cities",
|
|
196
|
-
...options,
|
|
197
|
-
headers: {
|
|
198
|
-
"Content-Type": "application/json",
|
|
199
|
-
...options?.headers
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* Mortgage companies the agent dealt with (pre-aggregated)
|
|
205
|
-
*/
|
|
206
|
-
const agentCompanies = (options) => {
|
|
207
|
-
return (options.client ?? client).post({
|
|
208
|
-
security: [{
|
|
209
|
-
name: "x-api-key",
|
|
210
|
-
type: "apiKey"
|
|
211
|
-
}, {
|
|
212
|
-
scheme: "bearer",
|
|
213
|
-
type: "http"
|
|
214
|
-
}],
|
|
215
|
-
url: "/agents/{id}/breakdowns/companies",
|
|
216
|
-
...options,
|
|
217
|
-
headers: {
|
|
218
|
-
"Content-Type": "application/json",
|
|
219
|
-
...options?.headers
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
};
|
|
223
|
-
/**
|
|
224
|
-
* County (FIPS) volume breakdown
|
|
225
|
-
*/
|
|
226
|
-
const agentCounties = (options) => {
|
|
227
|
-
return (options.client ?? client).post({
|
|
228
|
-
security: [{
|
|
229
|
-
name: "x-api-key",
|
|
230
|
-
type: "apiKey"
|
|
231
|
-
}, {
|
|
232
|
-
scheme: "bearer",
|
|
233
|
-
type: "http"
|
|
234
|
-
}],
|
|
235
|
-
url: "/agents/{id}/breakdowns/counties",
|
|
236
|
-
...options,
|
|
237
|
-
headers: {
|
|
238
|
-
"Content-Type": "application/json",
|
|
239
|
-
...options?.headers
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
};
|
|
243
|
-
/**
|
|
244
|
-
* Raw-name lenders encountered (pre-aggregated)
|
|
245
|
-
*/
|
|
246
|
-
const agentLenders = (options) => {
|
|
247
|
-
return (options.client ?? client).post({
|
|
248
|
-
security: [{
|
|
249
|
-
name: "x-api-key",
|
|
250
|
-
type: "apiKey"
|
|
251
|
-
}, {
|
|
252
|
-
scheme: "bearer",
|
|
253
|
-
type: "http"
|
|
254
|
-
}],
|
|
255
|
-
url: "/agents/{id}/breakdowns/lenders",
|
|
256
|
-
...options,
|
|
257
|
-
headers: {
|
|
258
|
-
"Content-Type": "application/json",
|
|
259
|
-
...options?.headers
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
};
|
|
263
|
-
/**
|
|
264
|
-
* Listing offices the agent has closed through
|
|
265
|
-
*/
|
|
266
|
-
const agentOffices = (options) => {
|
|
267
|
-
return (options.client ?? client).post({
|
|
268
|
-
security: [{
|
|
269
|
-
name: "x-api-key",
|
|
270
|
-
type: "apiKey"
|
|
271
|
-
}, {
|
|
272
|
-
scheme: "bearer",
|
|
273
|
-
type: "http"
|
|
274
|
-
}],
|
|
275
|
-
url: "/agents/{id}/breakdowns/offices",
|
|
276
|
-
...options,
|
|
277
|
-
headers: {
|
|
278
|
-
"Content-Type": "application/json",
|
|
279
|
-
...options?.headers
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* Loan officers the agent worked with (pre-aggregated)
|
|
285
|
-
*/
|
|
286
|
-
const agentOriginators = (options) => {
|
|
287
|
-
return (options.client ?? client).post({
|
|
288
|
-
security: [{
|
|
289
|
-
name: "x-api-key",
|
|
290
|
-
type: "apiKey"
|
|
291
|
-
}, {
|
|
292
|
-
scheme: "bearer",
|
|
293
|
-
type: "http"
|
|
294
|
-
}],
|
|
295
|
-
url: "/agents/{id}/breakdowns/originators",
|
|
296
|
-
...options,
|
|
297
|
-
headers: {
|
|
298
|
-
"Content-Type": "application/json",
|
|
299
|
-
...options?.headers
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* State volume breakdown
|
|
305
|
-
*/
|
|
306
|
-
const agentStates = (options) => {
|
|
307
|
-
return (options.client ?? client).post({
|
|
308
|
-
security: [{
|
|
309
|
-
name: "x-api-key",
|
|
310
|
-
type: "apiKey"
|
|
311
|
-
}, {
|
|
312
|
-
scheme: "bearer",
|
|
313
|
-
type: "http"
|
|
314
|
-
}],
|
|
315
|
-
url: "/agents/{id}/breakdowns/states",
|
|
316
|
-
...options,
|
|
317
|
-
headers: {
|
|
318
|
-
"Content-Type": "application/json",
|
|
319
|
-
...options?.headers
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
};
|
|
323
|
-
/**
|
|
324
|
-
* Zip-code volume breakdown
|
|
325
|
-
*/
|
|
326
|
-
const agentZipCodes = (options) => {
|
|
327
|
-
return (options.client ?? client).post({
|
|
328
|
-
security: [{
|
|
329
|
-
name: "x-api-key",
|
|
330
|
-
type: "apiKey"
|
|
331
|
-
}, {
|
|
332
|
-
scheme: "bearer",
|
|
333
|
-
type: "http"
|
|
334
|
-
}],
|
|
335
|
-
url: "/agents/{id}/breakdowns/zip-codes",
|
|
336
|
-
...options,
|
|
337
|
-
headers: {
|
|
338
|
-
"Content-Type": "application/json",
|
|
339
|
-
...options?.headers
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
};
|
|
343
|
-
/**
|
|
344
|
-
* The ZIP markets this agent works, blended
|
|
345
|
-
* Rank the ZIP markets one real-estate agent works, with volume, transaction counts and mean sale price per market, plus a weighted summary across the whole footprint. Optionally narrow to a ZIP list or a date window. REACH, NOT MARKET SHARE: an agent belongs to every market they touch — where their office is AND everywhere they have transacted — so one agent is counted in several markets at once. Per-market agent counts therefore over-sum: they cannot be added together, and dividing one into a total does not produce a market share. The only percentage returned, `shareOfScope`, is each market's share of this agent's volume across the scope requested and sums to 100 over that scope; there is no share-of-whole-book figure, because the transaction records carry no per-agent total to divide by. TWO COUNTS, ON PURPOSE: `transactions` counts transaction records; `units` counts the ones carrying a price, which are the records behind `volume` and `avgSalePrice`. Roughly half of an agent's records are priced, so dividing volume by `transactions` understates the average by about 2×. Figures are computed live from the agent's transaction records — an agent record carries no stored market rollup — and are ranked across their busiest ZIP markets. When a ZIP scope returns no markets, `reach.presentInScope` distinguishes 'works there, nothing closed in the window' from 'not present at all'. The summary also carries a Community Lending mix: what kind of neighborhood these markets are, weighted by the agent's activity in each. These are U.S. Census tract-level aggregates describing whole neighborhoods — never an individual, household or client attribute — and on this surface the basis is always the markets in scope, since an agent record carries no stored neighborhood rollup.
|
|
346
|
-
*/
|
|
347
|
-
const agentMarkets = (options) => {
|
|
348
|
-
return (options.client ?? client).post({
|
|
349
|
-
security: [{
|
|
350
|
-
name: "x-api-key",
|
|
351
|
-
type: "apiKey"
|
|
352
|
-
}, {
|
|
353
|
-
scheme: "bearer",
|
|
354
|
-
type: "http"
|
|
355
|
-
}],
|
|
356
|
-
url: "/agents/{id}/markets",
|
|
357
|
-
...options,
|
|
358
|
-
headers: {
|
|
359
|
-
"Content-Type": "application/json",
|
|
360
|
-
...options?.headers
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* Properties this agent has transacted on
|
|
366
|
-
*/
|
|
367
|
-
const agentProperties = (options) => {
|
|
368
|
-
return (options.client ?? client).post({
|
|
369
|
-
security: [{
|
|
370
|
-
name: "x-api-key",
|
|
371
|
-
type: "apiKey"
|
|
372
|
-
}, {
|
|
373
|
-
scheme: "bearer",
|
|
374
|
-
type: "http"
|
|
375
|
-
}],
|
|
376
|
-
url: "/agents/{id}/properties",
|
|
377
|
-
...options,
|
|
378
|
-
headers: {
|
|
379
|
-
"Content-Type": "application/json",
|
|
380
|
-
...options?.headers
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
};
|
|
384
|
-
/**
|
|
385
|
-
* Sales transactions where this agent was listing or selling side
|
|
386
|
-
*/
|
|
387
|
-
const agentSales = (options) => {
|
|
388
|
-
return (options.client ?? client).post({
|
|
389
|
-
security: [{
|
|
390
|
-
name: "x-api-key",
|
|
391
|
-
type: "apiKey"
|
|
392
|
-
}, {
|
|
393
|
-
scheme: "bearer",
|
|
394
|
-
type: "http"
|
|
395
|
-
}],
|
|
396
|
-
url: "/agents/{id}/sales",
|
|
397
|
-
...options,
|
|
398
|
-
headers: {
|
|
399
|
-
"Content-Type": "application/json",
|
|
400
|
-
...options?.headers
|
|
401
|
-
}
|
|
402
|
-
});
|
|
403
|
-
};
|
|
404
|
-
/**
|
|
405
|
-
* Search originators with filters
|
|
406
|
-
* Search and list individual loan originators (LOs — NMLS-registered mortgage loan officers) with filters — one row per originator. Filter by name, NMLS ID, location (state, city), employer/company, and production metrics (loan volume, units, product mix), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city filters match an originator's PRODUCTION GEOGRAPHY — the markets where they actually originated loans in the selected period — not where their office or employer sits. An LO who lends across several markets matches a filter for ANY of those markets, while the `state`/`city` returned on each row reflect only their PRIMARY (highest-volume) market. So a search for city "Long Beach" can return an LO whose displayed location is a different city/state (e.g. their top market is in Arizona) — they still originated loans in Long Beach, it just isn't their #1 market. To rank originators by their volume within a specific market, sort by volume after filtering, or use the per-originator city/county/state breakdown endpoints. This is the per-originator record search: use it to find specific loan officers or build a filtered LO list. (For a single originator by NMLS ID use the originator detail endpoint.) If you only need how many originators match and not the records themselves, send the same request body to `countOriginators`.
|
|
407
|
-
*/
|
|
408
|
-
const listOriginators = (options) => {
|
|
409
|
-
return (options?.client ?? client).post({
|
|
410
|
-
security: [{
|
|
411
|
-
name: "x-api-key",
|
|
412
|
-
type: "apiKey"
|
|
413
|
-
}, {
|
|
414
|
-
scheme: "bearer",
|
|
415
|
-
type: "http"
|
|
416
|
-
}],
|
|
417
|
-
url: "/originators",
|
|
418
|
-
...options,
|
|
419
|
-
headers: {
|
|
420
|
-
"Content-Type": "application/json",
|
|
421
|
-
...options?.headers
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
};
|
|
425
|
-
/**
|
|
426
|
-
* Configurable chart (measure × slice) over one LO's loans
|
|
427
|
-
*/
|
|
428
|
-
const originatorAnalyticsChart = (options) => {
|
|
429
|
-
return (options?.client ?? client).post({
|
|
430
|
-
security: [{
|
|
431
|
-
name: "x-api-key",
|
|
432
|
-
type: "apiKey"
|
|
433
|
-
}, {
|
|
434
|
-
scheme: "bearer",
|
|
435
|
-
type: "http"
|
|
436
|
-
}],
|
|
437
|
-
url: "/originators/analytics/chart",
|
|
438
|
-
...options,
|
|
439
|
-
headers: {
|
|
440
|
-
"Content-Type": "application/json",
|
|
441
|
-
...options?.headers
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
};
|
|
445
|
-
/**
|
|
446
|
-
* Production summary with previous-period comparison
|
|
447
|
-
*/
|
|
448
|
-
const originatorAnalyticsSummary = (options) => {
|
|
449
|
-
return (options?.client ?? client).post({
|
|
450
|
-
security: [{
|
|
451
|
-
name: "x-api-key",
|
|
452
|
-
type: "apiKey"
|
|
453
|
-
}, {
|
|
454
|
-
scheme: "bearer",
|
|
455
|
-
type: "http"
|
|
456
|
-
}],
|
|
457
|
-
url: "/originators/analytics/summary",
|
|
458
|
-
...options,
|
|
459
|
-
headers: {
|
|
460
|
-
"Content-Type": "application/json",
|
|
461
|
-
...options?.headers
|
|
462
|
-
}
|
|
463
|
-
});
|
|
464
|
-
};
|
|
465
|
-
/**
|
|
466
|
-
* Originator volume / units over time
|
|
467
|
-
*/
|
|
468
|
-
const originatorAnalyticsTimeSeries = (options) => {
|
|
469
|
-
return (options?.client ?? client).post({
|
|
470
|
-
security: [{
|
|
471
|
-
name: "x-api-key",
|
|
472
|
-
type: "apiKey"
|
|
473
|
-
}, {
|
|
474
|
-
scheme: "bearer",
|
|
475
|
-
type: "http"
|
|
476
|
-
}],
|
|
477
|
-
url: "/originators/analytics/time-series",
|
|
478
|
-
...options,
|
|
479
|
-
headers: {
|
|
480
|
-
"Content-Type": "application/json",
|
|
481
|
-
...options?.headers
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
};
|
|
485
|
-
/**
|
|
486
|
-
* Submit a bulk-delivery job for originators
|
|
487
|
-
* Queues an ECS task that dumps every matching originators document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/originators/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
488
|
-
*
|
|
489
|
-
* **Row limit.** Deliveries of up to 1,000 rows need no entitlement. Above that, the org's `bulk-delivery.originators` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
490
|
-
*
|
|
491
|
-
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
492
|
-
*/
|
|
493
|
-
const submitOriginatorsBulkDelivery = (options) => {
|
|
494
|
-
return (options?.client ?? client).post({
|
|
495
|
-
security: [{
|
|
496
|
-
name: "x-api-key",
|
|
497
|
-
type: "apiKey"
|
|
498
|
-
}, {
|
|
499
|
-
scheme: "bearer",
|
|
500
|
-
type: "http"
|
|
501
|
-
}],
|
|
502
|
-
url: "/originators/bulk-delivery",
|
|
503
|
-
...options,
|
|
504
|
-
headers: {
|
|
505
|
-
"Content-Type": "application/json",
|
|
506
|
-
...options?.headers
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
};
|
|
510
|
-
/**
|
|
511
|
-
* Cancel a bulk-delivery job for originators
|
|
512
|
-
* Cancels a queued or running originators delivery job.
|
|
513
|
-
*
|
|
514
|
-
* The job is marked `cancelled` immediately; the container running it notices on its next page boundary and stops. Because a delivery is billed once, at the end, **a cancelled job is never charged** — no credits are debited and there is nothing to refund. No partial file is written.
|
|
515
|
-
*
|
|
516
|
-
* Idempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/originators/bulk-delivery/{jobId}` for the settled state.
|
|
517
|
-
*/
|
|
518
|
-
const cancelOriginatorsBulkDeliveryJob = (options) => {
|
|
519
|
-
return (options.client ?? client).delete({
|
|
520
|
-
security: [{
|
|
521
|
-
name: "x-api-key",
|
|
522
|
-
type: "apiKey"
|
|
523
|
-
}, {
|
|
524
|
-
scheme: "bearer",
|
|
525
|
-
type: "http"
|
|
526
|
-
}],
|
|
527
|
-
url: "/originators/bulk-delivery/{jobId}",
|
|
528
|
-
...options
|
|
529
|
-
});
|
|
530
|
-
};
|
|
531
|
-
/**
|
|
532
|
-
* Get bulk-delivery job status for originators
|
|
533
|
-
*/
|
|
534
|
-
const getOriginatorsBulkDeliveryJob = (options) => {
|
|
535
|
-
return (options.client ?? client).get({
|
|
536
|
-
security: [{
|
|
537
|
-
name: "x-api-key",
|
|
538
|
-
type: "apiKey"
|
|
539
|
-
}, {
|
|
540
|
-
scheme: "bearer",
|
|
541
|
-
type: "http"
|
|
542
|
-
}],
|
|
543
|
-
url: "/originators/bulk-delivery/{jobId}",
|
|
544
|
-
...options
|
|
545
|
-
});
|
|
546
|
-
};
|
|
547
|
-
/**
|
|
548
|
-
* Count originators matching filters
|
|
549
|
-
* Return the exact number of originators matching the given filters. Accepts the same request body as `listOriginators` (pagination and sort are ignored). Use this when you only need a total; to get the matching originators themselves, send the same request body to `listOriginators`.
|
|
550
|
-
*/
|
|
551
|
-
const countOriginators = (options) => {
|
|
552
|
-
return (options?.client ?? client).post({
|
|
553
|
-
security: [{
|
|
554
|
-
name: "x-api-key",
|
|
555
|
-
type: "apiKey"
|
|
556
|
-
}, {
|
|
557
|
-
scheme: "bearer",
|
|
558
|
-
type: "http"
|
|
559
|
-
}],
|
|
560
|
-
url: "/originators/count",
|
|
561
|
-
...options,
|
|
562
|
-
headers: {
|
|
563
|
-
"Content-Type": "application/json",
|
|
564
|
-
...options?.headers
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
};
|
|
568
|
-
/**
|
|
569
|
-
* Get originator by NMLS ID
|
|
570
|
-
*/
|
|
571
|
-
const getOriginator = (options) => {
|
|
572
|
-
return (options.client ?? client).get({
|
|
573
|
-
security: [{
|
|
574
|
-
name: "x-api-key",
|
|
575
|
-
type: "apiKey"
|
|
576
|
-
}, {
|
|
577
|
-
scheme: "bearer",
|
|
578
|
-
type: "http"
|
|
579
|
-
}],
|
|
580
|
-
url: "/originators/{nmlsId}",
|
|
581
|
-
...options
|
|
582
|
-
});
|
|
583
|
-
};
|
|
584
|
-
/**
|
|
585
|
-
* Real-estate agents this LO co-closed with
|
|
586
|
-
* Ranks the real-estate agents on the selling side of this LO's loans, by volume. Buckets whose name is an MLS placeholder for "no selling agent recorded" (`non member`, `non listed agent`, and ~140 board-specific spellings) are excluded rather than ranked as agents — they are not people and cannot be resolved with `GET /v1/agents/{id}`. Percentages are shares of the LO's whole loan population, so they do not sum to 100 across the page.
|
|
587
|
-
*/
|
|
588
|
-
const originatorAgents = (options) => {
|
|
589
|
-
return (options.client ?? client).post({
|
|
590
|
-
security: [{
|
|
591
|
-
name: "x-api-key",
|
|
592
|
-
type: "apiKey"
|
|
593
|
-
}, {
|
|
594
|
-
scheme: "bearer",
|
|
595
|
-
type: "http"
|
|
596
|
-
}],
|
|
597
|
-
url: "/originators/{nmlsId}/breakdowns/agents",
|
|
598
|
-
...options,
|
|
599
|
-
headers: {
|
|
600
|
-
"Content-Type": "application/json",
|
|
601
|
-
...options?.headers
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
};
|
|
605
|
-
/**
|
|
606
|
-
* Branch (broker) history for this LO
|
|
607
|
-
*/
|
|
608
|
-
const originatorBranches = (options) => {
|
|
609
|
-
return (options.client ?? client).post({
|
|
610
|
-
security: [{
|
|
611
|
-
name: "x-api-key",
|
|
612
|
-
type: "apiKey"
|
|
613
|
-
}, {
|
|
614
|
-
scheme: "bearer",
|
|
615
|
-
type: "http"
|
|
616
|
-
}],
|
|
617
|
-
url: "/originators/{nmlsId}/breakdowns/branches",
|
|
618
|
-
...options,
|
|
619
|
-
headers: {
|
|
620
|
-
"Content-Type": "application/json",
|
|
621
|
-
...options?.headers
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
};
|
|
625
|
-
/**
|
|
626
|
-
* Broker shops this LO originated loans through (name-resolved)
|
|
627
|
-
*/
|
|
628
|
-
const originatorBrokers = (options) => {
|
|
629
|
-
return (options.client ?? client).post({
|
|
630
|
-
security: [{
|
|
631
|
-
name: "x-api-key",
|
|
632
|
-
type: "apiKey"
|
|
633
|
-
}, {
|
|
634
|
-
scheme: "bearer",
|
|
635
|
-
type: "http"
|
|
636
|
-
}],
|
|
637
|
-
url: "/originators/{nmlsId}/breakdowns/brokers",
|
|
638
|
-
...options,
|
|
639
|
-
headers: {
|
|
640
|
-
"Content-Type": "application/json",
|
|
641
|
-
...options?.headers
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
};
|
|
645
|
-
/**
|
|
646
|
-
* City volume breakdown across this LO's loans
|
|
647
|
-
*/
|
|
648
|
-
const originatorCitiesBreakdown = (options) => {
|
|
649
|
-
return (options.client ?? client).post({
|
|
650
|
-
security: [{
|
|
651
|
-
name: "x-api-key",
|
|
652
|
-
type: "apiKey"
|
|
653
|
-
}, {
|
|
654
|
-
scheme: "bearer",
|
|
655
|
-
type: "http"
|
|
656
|
-
}],
|
|
657
|
-
url: "/originators/{nmlsId}/breakdowns/cities",
|
|
658
|
-
...options,
|
|
659
|
-
headers: {
|
|
660
|
-
"Content-Type": "application/json",
|
|
661
|
-
...options?.headers
|
|
662
|
-
}
|
|
663
|
-
});
|
|
664
|
-
};
|
|
665
|
-
/**
|
|
666
|
-
* Funding companies (employer history) for this LO
|
|
667
|
-
*/
|
|
668
|
-
const originatorCompanies = (options) => {
|
|
669
|
-
return (options.client ?? client).post({
|
|
670
|
-
security: [{
|
|
671
|
-
name: "x-api-key",
|
|
672
|
-
type: "apiKey"
|
|
673
|
-
}, {
|
|
674
|
-
scheme: "bearer",
|
|
675
|
-
type: "http"
|
|
676
|
-
}],
|
|
677
|
-
url: "/originators/{nmlsId}/breakdowns/companies",
|
|
678
|
-
...options,
|
|
679
|
-
headers: {
|
|
680
|
-
"Content-Type": "application/json",
|
|
681
|
-
...options?.headers
|
|
682
|
-
}
|
|
683
|
-
});
|
|
684
|
-
};
|
|
685
|
-
/**
|
|
686
|
-
* County (FIPS) volume breakdown across this LO's loans
|
|
687
|
-
*/
|
|
688
|
-
const originatorCountiesBreakdown = (options) => {
|
|
689
|
-
return (options.client ?? client).post({
|
|
690
|
-
security: [{
|
|
691
|
-
name: "x-api-key",
|
|
692
|
-
type: "apiKey"
|
|
693
|
-
}, {
|
|
694
|
-
scheme: "bearer",
|
|
695
|
-
type: "http"
|
|
696
|
-
}],
|
|
697
|
-
url: "/originators/{nmlsId}/breakdowns/counties",
|
|
698
|
-
...options,
|
|
699
|
-
headers: {
|
|
700
|
-
"Content-Type": "application/json",
|
|
701
|
-
...options?.headers
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
};
|
|
705
|
-
/**
|
|
706
|
-
* Lenders this LO has originated through
|
|
707
|
-
*/
|
|
708
|
-
const originatorLenders = (options) => {
|
|
709
|
-
return (options.client ?? client).post({
|
|
710
|
-
security: [{
|
|
711
|
-
name: "x-api-key",
|
|
712
|
-
type: "apiKey"
|
|
713
|
-
}, {
|
|
714
|
-
scheme: "bearer",
|
|
715
|
-
type: "http"
|
|
716
|
-
}],
|
|
717
|
-
url: "/originators/{nmlsId}/breakdowns/lenders",
|
|
718
|
-
...options,
|
|
719
|
-
headers: {
|
|
720
|
-
"Content-Type": "application/json",
|
|
721
|
-
...options?.headers
|
|
722
|
-
}
|
|
723
|
-
});
|
|
724
|
-
};
|
|
725
|
-
/**
|
|
726
|
-
* Real-estate offices this LO closed through (with sponsoring company)
|
|
727
|
-
*/
|
|
728
|
-
const originatorOffices = (options) => {
|
|
729
|
-
return (options.client ?? client).post({
|
|
730
|
-
security: [{
|
|
731
|
-
name: "x-api-key",
|
|
732
|
-
type: "apiKey"
|
|
733
|
-
}, {
|
|
734
|
-
scheme: "bearer",
|
|
735
|
-
type: "http"
|
|
736
|
-
}],
|
|
737
|
-
url: "/originators/{nmlsId}/breakdowns/offices",
|
|
738
|
-
...options,
|
|
739
|
-
headers: {
|
|
740
|
-
"Content-Type": "application/json",
|
|
741
|
-
...options?.headers
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
};
|
|
745
|
-
/**
|
|
746
|
-
* State volume breakdown across this LO's loans
|
|
747
|
-
*/
|
|
748
|
-
const originatorStatesBreakdown = (options) => {
|
|
749
|
-
return (options.client ?? client).post({
|
|
750
|
-
security: [{
|
|
751
|
-
name: "x-api-key",
|
|
752
|
-
type: "apiKey"
|
|
753
|
-
}, {
|
|
754
|
-
scheme: "bearer",
|
|
755
|
-
type: "http"
|
|
756
|
-
}],
|
|
757
|
-
url: "/originators/{nmlsId}/breakdowns/states",
|
|
758
|
-
...options,
|
|
759
|
-
headers: {
|
|
760
|
-
"Content-Type": "application/json",
|
|
761
|
-
...options?.headers
|
|
762
|
-
}
|
|
763
|
-
});
|
|
764
|
-
};
|
|
765
|
-
/**
|
|
766
|
-
* Title companies on this LO's loans (spellings merged)
|
|
767
|
-
* Ranks the title companies on this entity's loans (recorded deeds, `recording_date` window — the same population and period axis as every other loans breakdown). Spellings of one company are MERGED: `label` is its most-used spelling, `id` the normalized name every spelling was grouped under (legal-form and filler words such as `inc`, `llc`, `co`, `company`, `title`, `escrow` removed; `natl` → `national`). Placeholder entries meaning "no title company recorded" (`none available` and its misspellings, `unknown`, `n/a`, …) and names shorter than 3 characters are excluded rather than ranked. `attorney` and `accommodation` are kept: they say who closed. `pctUnits` / `pctVolume` are shares of the entity's WHOLE loan population in the window, including loans with no title company, so they do not sum to 100 across the page. Pages of up to 100 via `pagination`.
|
|
768
|
-
*/
|
|
769
|
-
const originatorTitleCompanies = (options) => {
|
|
770
|
-
return (options.client ?? client).post({
|
|
771
|
-
security: [{
|
|
772
|
-
name: "x-api-key",
|
|
773
|
-
type: "apiKey"
|
|
774
|
-
}, {
|
|
775
|
-
scheme: "bearer",
|
|
776
|
-
type: "http"
|
|
777
|
-
}],
|
|
778
|
-
url: "/originators/{nmlsId}/breakdowns/title-companies",
|
|
779
|
-
...options,
|
|
780
|
-
headers: {
|
|
781
|
-
"Content-Type": "application/json",
|
|
782
|
-
...options?.headers
|
|
783
|
-
}
|
|
784
|
-
});
|
|
785
|
-
};
|
|
786
|
-
/**
|
|
787
|
-
* Zip-code volume breakdown
|
|
788
|
-
*/
|
|
789
|
-
const originatorZipCodes = (options) => {
|
|
790
|
-
return (options.client ?? client).post({
|
|
791
|
-
security: [{
|
|
792
|
-
name: "x-api-key",
|
|
793
|
-
type: "apiKey"
|
|
794
|
-
}, {
|
|
795
|
-
scheme: "bearer",
|
|
796
|
-
type: "http"
|
|
797
|
-
}],
|
|
798
|
-
url: "/originators/{nmlsId}/breakdowns/zip-codes",
|
|
799
|
-
...options,
|
|
800
|
-
headers: {
|
|
801
|
-
"Content-Type": "application/json",
|
|
802
|
-
...options?.headers
|
|
803
|
-
}
|
|
804
|
-
});
|
|
805
|
-
};
|
|
806
|
-
/**
|
|
807
|
-
* Loans originated by this LO
|
|
808
|
-
*/
|
|
809
|
-
const originatorLoans = (options) => {
|
|
810
|
-
return (options.client ?? client).post({
|
|
811
|
-
security: [{
|
|
812
|
-
name: "x-api-key",
|
|
813
|
-
type: "apiKey"
|
|
814
|
-
}, {
|
|
815
|
-
scheme: "bearer",
|
|
816
|
-
type: "http"
|
|
817
|
-
}],
|
|
818
|
-
url: "/originators/{nmlsId}/loans",
|
|
819
|
-
...options,
|
|
820
|
-
headers: {
|
|
821
|
-
"Content-Type": "application/json",
|
|
822
|
-
...options?.headers
|
|
823
|
-
}
|
|
824
|
-
});
|
|
825
|
-
};
|
|
826
|
-
/**
|
|
827
|
-
* The markets this LO lends in
|
|
828
|
-
* One blended view of a loan officer's lending footprint: the ZIP codes they originated in, city / county / state rollups of the same scope, and the period totals those markets are a share of. AVERAGES ARE VOLUME-WEIGHTED: the summary loan size is Σ volume ÷ Σ units, not an unweighted mean of the per-market averages (on a real footprint the two differ by thousands of dollars). Sending `zipCodes` narrows every grain to those ZIPs; sending a `dateRange` re-cuts the window. Either switches the response from the LO's pre-aggregated footprint to a live aggregation of their loans — `source` and `sourceReasons` say which was used, and bucket `key` forms differ between them (use `name` for display). All shares on this response are 0–100 percentages. A summary can cover less than the whole book: production that could not be attributed to a place is held out and reported in `summary.unresolved` rather than being folded in or silently dropped. The summary also carries a Community Lending mix — what kind of neighborhood this book lands in. These are U.S. Census tract-level aggregates describing whole neighborhoods, never individual, household or applicant attributes. Unscoped it is the LO's own whole-period mix; a ZIP or date scope recomputes it over the markets in scope, and `summary.communityLending.basis` says which you got.
|
|
829
|
-
*/
|
|
830
|
-
const originatorMarkets = (options) => {
|
|
831
|
-
return (options.client ?? client).post({
|
|
832
|
-
security: [{
|
|
833
|
-
name: "x-api-key",
|
|
834
|
-
type: "apiKey"
|
|
835
|
-
}, {
|
|
836
|
-
scheme: "bearer",
|
|
837
|
-
type: "http"
|
|
838
|
-
}],
|
|
839
|
-
url: "/originators/{nmlsId}/markets",
|
|
840
|
-
...options,
|
|
841
|
-
headers: {
|
|
842
|
-
"Content-Type": "application/json",
|
|
843
|
-
...options?.headers
|
|
844
|
-
}
|
|
845
|
-
});
|
|
846
|
-
};
|
|
847
|
-
/**
|
|
848
|
-
* Properties this loan officer has touched
|
|
849
|
-
* Returns the parcels this loan officer is attributed to in public record — the reverse of the `parties` block on `GET /v1/properties/{id}`. Accepts the same filters, sorts and pagination as the main property search, so a caller can ask 'this LO's parcels in Travis County built after 2015' in one request. Attribution is ALL-TIME: a parcel stays in this LO's set after the loan is paid off, because the question is career reach rather than current book. An LO with no attributed parcels returns an empty page, not a 404 — the LO may be real and simply have nothing in the public record yet.
|
|
850
|
-
*/
|
|
851
|
-
const originatorProperties = (options) => {
|
|
852
|
-
return (options.client ?? client).post({
|
|
853
|
-
security: [{
|
|
854
|
-
name: "x-api-key",
|
|
855
|
-
type: "apiKey"
|
|
856
|
-
}, {
|
|
857
|
-
scheme: "bearer",
|
|
858
|
-
type: "http"
|
|
859
|
-
}],
|
|
860
|
-
url: "/originators/{nmlsId}/properties",
|
|
861
|
-
...options,
|
|
862
|
-
headers: {
|
|
863
|
-
"Content-Type": "application/json",
|
|
864
|
-
...options?.headers
|
|
865
|
-
}
|
|
866
|
-
});
|
|
867
|
-
};
|
|
868
|
-
/**
|
|
869
4
|
* An LO's sponsorship / registration links (admin)
|
|
870
5
|
* Diagnostic: the LO's indexed employment union (sponsorships + registrations), split by source with active counts. `indexGaps` lists what the former database diagnostic showed that the index does not carry.
|
|
871
6
|
*/
|
|
@@ -941,7 +76,7 @@ const adminGetBulkJob = (options) => {
|
|
|
941
76
|
* Search agents with filters
|
|
942
77
|
* Search and list individual real-estate agents with filters — one row per agent. Filter by name, location (state, city, zip), brokerage/office, and production metrics (sales volume, transaction units, price range), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city/zip filters match ANY of an agent's location signals — their listed city/state, their office address(es), AND the markets where they actually closed transactions (production) — combined with OR. So an agent matches a searched location if their office OR their production is there. A search for city "Long Beach" can therefore return agents whose office or displayed primary market is in a different city/state, because they transacted in Long Beach. The `state`/`city` returned on each row reflect the agent's primary market and may differ from the searched location. (Use the `office` filter to match by brokerage/office name, and the per-agent city/county/state breakdown endpoints to rank an agent's volume within a specific market.) RANKING BY DEAL SIDE: combine a location filter with `sort` on `buyerVolume`/`buyerUnits` (or `sellerVolume`/`sellerUnits`, `dualVolume`/`dualUnits`) to rank agents by how active they are representing buyers vs. sellers in that market — e.g. sort `buyerVolume` descending for the most active buyer-side agents in a state or city. This is the per-agent record search: use it to find specific real-estate agents or build a filtered agent list. (For a single agent by ID use the agent detail endpoint.) If you only need how many agents match and not the records themselves, send the same request body to `countAgents`.
|
|
943
78
|
*/
|
|
944
|
-
const
|
|
79
|
+
const listAgents = (options) => {
|
|
945
80
|
return (options?.client ?? client).post({
|
|
946
81
|
security: [{
|
|
947
82
|
name: "x-api-key",
|
|
@@ -961,7 +96,7 @@ const listAgents2 = (options) => {
|
|
|
961
96
|
/**
|
|
962
97
|
* Configurable chart (measure × slice) over the agent's sales
|
|
963
98
|
*/
|
|
964
|
-
const
|
|
99
|
+
const agentAnalyticsChart = (options) => {
|
|
965
100
|
return (options?.client ?? client).post({
|
|
966
101
|
security: [{
|
|
967
102
|
name: "x-api-key",
|
|
@@ -981,7 +116,7 @@ const agentAnalyticsChart2 = (options) => {
|
|
|
981
116
|
/**
|
|
982
117
|
* Production summary with buyer/seller/dual split + previous period
|
|
983
118
|
*/
|
|
984
|
-
const
|
|
119
|
+
const agentAnalyticsSummary = (options) => {
|
|
985
120
|
return (options?.client ?? client).post({
|
|
986
121
|
security: [{
|
|
987
122
|
name: "x-api-key",
|
|
@@ -1001,7 +136,7 @@ const agentAnalyticsSummary2 = (options) => {
|
|
|
1001
136
|
/**
|
|
1002
137
|
* Agent volume/units over time with buyer/seller/dual split
|
|
1003
138
|
*/
|
|
1004
|
-
const
|
|
139
|
+
const agentAnalyticsTimeSeries = (options) => {
|
|
1005
140
|
return (options?.client ?? client).post({
|
|
1006
141
|
security: [{
|
|
1007
142
|
name: "x-api-key",
|
|
@@ -1022,11 +157,13 @@ const agentAnalyticsTimeSeries2 = (options) => {
|
|
|
1022
157
|
* Submit a bulk-delivery job for agents
|
|
1023
158
|
* Queues an ECS task that dumps every matching agents document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/agents/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
1024
159
|
*
|
|
1025
|
-
* **Row limit.** Deliveries of up to
|
|
160
|
+
* **Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.agents` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
1026
161
|
*
|
|
1027
162
|
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
163
|
+
*
|
|
164
|
+
* **Push-target destination.** Pass `destination: { type: "push-target", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery, except that push-target deliveries from the ModelMatch web app are not billed.
|
|
1028
165
|
*/
|
|
1029
|
-
const
|
|
166
|
+
const submitAgentsBulkDelivery = (options) => {
|
|
1030
167
|
return (options?.client ?? client).post({
|
|
1031
168
|
security: [{
|
|
1032
169
|
name: "x-api-key",
|
|
@@ -1051,7 +188,7 @@ const submitAgentsBulkDelivery2 = (options) => {
|
|
|
1051
188
|
*
|
|
1052
189
|
* Idempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/agents/bulk-delivery/{jobId}` for the settled state.
|
|
1053
190
|
*/
|
|
1054
|
-
const
|
|
191
|
+
const cancelAgentsBulkDeliveryJob = (options) => {
|
|
1055
192
|
return (options.client ?? client).delete({
|
|
1056
193
|
security: [{
|
|
1057
194
|
name: "x-api-key",
|
|
@@ -1067,7 +204,7 @@ const cancelAgentsBulkDeliveryJob2 = (options) => {
|
|
|
1067
204
|
/**
|
|
1068
205
|
* Get bulk-delivery job status for agents
|
|
1069
206
|
*/
|
|
1070
|
-
const
|
|
207
|
+
const getAgentsBulkDeliveryJob = (options) => {
|
|
1071
208
|
return (options.client ?? client).get({
|
|
1072
209
|
security: [{
|
|
1073
210
|
name: "x-api-key",
|
|
@@ -1084,7 +221,7 @@ const getAgentsBulkDeliveryJob2 = (options) => {
|
|
|
1084
221
|
* Count agents matching filters
|
|
1085
222
|
* Return the exact number of agents matching the given filters. Accepts the same request body as `listAgents` (pagination and sort are ignored). Use this when you only need a total; to get the matching agents themselves, send the same request body to `listAgents`.
|
|
1086
223
|
*/
|
|
1087
|
-
const
|
|
224
|
+
const countAgents = (options) => {
|
|
1088
225
|
return (options?.client ?? client).post({
|
|
1089
226
|
security: [{
|
|
1090
227
|
name: "x-api-key",
|
|
@@ -1104,7 +241,7 @@ const countAgents2 = (options) => {
|
|
|
1104
241
|
/**
|
|
1105
242
|
* Get agent by ID
|
|
1106
243
|
*/
|
|
1107
|
-
const
|
|
244
|
+
const getAgent = (options) => {
|
|
1108
245
|
return (options.client ?? client).get({
|
|
1109
246
|
security: [{
|
|
1110
247
|
name: "x-api-key",
|
|
@@ -1120,7 +257,7 @@ const getAgent2 = (options) => {
|
|
|
1120
257
|
/**
|
|
1121
258
|
* City volume breakdown across the agent's sales
|
|
1122
259
|
*/
|
|
1123
|
-
const
|
|
260
|
+
const agentCities = (options) => {
|
|
1124
261
|
return (options.client ?? client).post({
|
|
1125
262
|
security: [{
|
|
1126
263
|
name: "x-api-key",
|
|
@@ -1140,7 +277,7 @@ const agentCities2 = (options) => {
|
|
|
1140
277
|
/**
|
|
1141
278
|
* Mortgage companies the agent dealt with (pre-aggregated)
|
|
1142
279
|
*/
|
|
1143
|
-
const
|
|
280
|
+
const agentCompanies = (options) => {
|
|
1144
281
|
return (options.client ?? client).post({
|
|
1145
282
|
security: [{
|
|
1146
283
|
name: "x-api-key",
|
|
@@ -1160,7 +297,7 @@ const agentCompanies2 = (options) => {
|
|
|
1160
297
|
/**
|
|
1161
298
|
* County (FIPS) volume breakdown
|
|
1162
299
|
*/
|
|
1163
|
-
const
|
|
300
|
+
const agentCounties = (options) => {
|
|
1164
301
|
return (options.client ?? client).post({
|
|
1165
302
|
security: [{
|
|
1166
303
|
name: "x-api-key",
|
|
@@ -1180,7 +317,7 @@ const agentCounties2 = (options) => {
|
|
|
1180
317
|
/**
|
|
1181
318
|
* Raw-name lenders encountered (pre-aggregated)
|
|
1182
319
|
*/
|
|
1183
|
-
const
|
|
320
|
+
const agentLenders = (options) => {
|
|
1184
321
|
return (options.client ?? client).post({
|
|
1185
322
|
security: [{
|
|
1186
323
|
name: "x-api-key",
|
|
@@ -1200,7 +337,7 @@ const agentLenders2 = (options) => {
|
|
|
1200
337
|
/**
|
|
1201
338
|
* Listing offices the agent has closed through
|
|
1202
339
|
*/
|
|
1203
|
-
const
|
|
340
|
+
const agentOffices = (options) => {
|
|
1204
341
|
return (options.client ?? client).post({
|
|
1205
342
|
security: [{
|
|
1206
343
|
name: "x-api-key",
|
|
@@ -1220,7 +357,7 @@ const agentOffices2 = (options) => {
|
|
|
1220
357
|
/**
|
|
1221
358
|
* Loan officers the agent worked with (pre-aggregated)
|
|
1222
359
|
*/
|
|
1223
|
-
const
|
|
360
|
+
const agentOriginators = (options) => {
|
|
1224
361
|
return (options.client ?? client).post({
|
|
1225
362
|
security: [{
|
|
1226
363
|
name: "x-api-key",
|
|
@@ -1240,7 +377,7 @@ const agentOriginators2 = (options) => {
|
|
|
1240
377
|
/**
|
|
1241
378
|
* State volume breakdown
|
|
1242
379
|
*/
|
|
1243
|
-
const
|
|
380
|
+
const agentStates = (options) => {
|
|
1244
381
|
return (options.client ?? client).post({
|
|
1245
382
|
security: [{
|
|
1246
383
|
name: "x-api-key",
|
|
@@ -1260,7 +397,7 @@ const agentStates2 = (options) => {
|
|
|
1260
397
|
/**
|
|
1261
398
|
* Zip-code volume breakdown
|
|
1262
399
|
*/
|
|
1263
|
-
const
|
|
400
|
+
const agentZipCodes = (options) => {
|
|
1264
401
|
return (options.client ?? client).post({
|
|
1265
402
|
security: [{
|
|
1266
403
|
name: "x-api-key",
|
|
@@ -1281,7 +418,7 @@ const agentZipCodes2 = (options) => {
|
|
|
1281
418
|
* The ZIP markets this agent works, blended
|
|
1282
419
|
* Rank the ZIP markets one real-estate agent works, with volume, transaction counts and mean sale price per market, plus a weighted summary across the whole footprint. Optionally narrow to a ZIP list or a date window. REACH, NOT MARKET SHARE: an agent belongs to every market they touch — where their office is AND everywhere they have transacted — so one agent is counted in several markets at once. Per-market agent counts therefore over-sum: they cannot be added together, and dividing one into a total does not produce a market share. The only percentage returned, `shareOfScope`, is each market's share of this agent's volume across the scope requested and sums to 100 over that scope; there is no share-of-whole-book figure, because the transaction records carry no per-agent total to divide by. TWO COUNTS, ON PURPOSE: `transactions` counts transaction records; `units` counts the ones carrying a price, which are the records behind `volume` and `avgSalePrice`. Roughly half of an agent's records are priced, so dividing volume by `transactions` understates the average by about 2×. Figures are computed live from the agent's transaction records — an agent record carries no stored market rollup — and are ranked across their busiest ZIP markets. When a ZIP scope returns no markets, `reach.presentInScope` distinguishes 'works there, nothing closed in the window' from 'not present at all'. The summary also carries a Community Lending mix: what kind of neighborhood these markets are, weighted by the agent's activity in each. These are U.S. Census tract-level aggregates describing whole neighborhoods — never an individual, household or client attribute — and on this surface the basis is always the markets in scope, since an agent record carries no stored neighborhood rollup.
|
|
1283
420
|
*/
|
|
1284
|
-
const
|
|
421
|
+
const agentMarkets = (options) => {
|
|
1285
422
|
return (options.client ?? client).post({
|
|
1286
423
|
security: [{
|
|
1287
424
|
name: "x-api-key",
|
|
@@ -1301,7 +438,7 @@ const agentMarkets2 = (options) => {
|
|
|
1301
438
|
/**
|
|
1302
439
|
* Properties this agent has transacted on
|
|
1303
440
|
*/
|
|
1304
|
-
const
|
|
441
|
+
const agentProperties = (options) => {
|
|
1305
442
|
return (options.client ?? client).post({
|
|
1306
443
|
security: [{
|
|
1307
444
|
name: "x-api-key",
|
|
@@ -1338,7 +475,7 @@ const agentRelated = (options) => {
|
|
|
1338
475
|
/**
|
|
1339
476
|
* Sales transactions where this agent was listing or selling side
|
|
1340
477
|
*/
|
|
1341
|
-
const
|
|
478
|
+
const agentSales = (options) => {
|
|
1342
479
|
return (options.client ?? client).post({
|
|
1343
480
|
security: [{
|
|
1344
481
|
name: "x-api-key",
|
|
@@ -1752,9 +889,11 @@ const branchAnalyticsTimeSeries = (options) => {
|
|
|
1752
889
|
* Submit a bulk-delivery job for branches
|
|
1753
890
|
* Queues an ECS task that dumps every matching branches document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/branches/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
1754
891
|
*
|
|
1755
|
-
* **Row limit.** Deliveries of up to
|
|
892
|
+
* **Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.branches` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
1756
893
|
*
|
|
1757
894
|
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
895
|
+
*
|
|
896
|
+
* **Push-target destination.** Pass `destination: { type: "push-target", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery, except that push-target deliveries from the ModelMatch web app are not billed.
|
|
1758
897
|
*/
|
|
1759
898
|
const submitBranchesBulkDelivery = (options) => {
|
|
1760
899
|
return (options?.client ?? client).post({
|
|
@@ -2101,9 +1240,11 @@ const companyAnalyticsTimeSeries = (options) => {
|
|
|
2101
1240
|
* Submit a bulk-delivery job for companies
|
|
2102
1241
|
* Queues an ECS task that dumps every matching companies document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/companies/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
2103
1242
|
*
|
|
2104
|
-
* **Row limit.** Deliveries of up to
|
|
1243
|
+
* **Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.companies` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
2105
1244
|
*
|
|
2106
1245
|
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
1246
|
+
*
|
|
1247
|
+
* **Push-target destination.** Pass `destination: { type: "push-target", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery, except that push-target deliveries from the ModelMatch web app are not billed.
|
|
2107
1248
|
*/
|
|
2108
1249
|
const submitCompaniesBulkDelivery = (options) => {
|
|
2109
1250
|
return (options?.client ?? client).post({
|
|
@@ -4946,7 +4087,7 @@ const lenderCounties = (options) => {
|
|
|
4946
4087
|
};
|
|
4947
4088
|
/**
|
|
4948
4089
|
* Loan officers who send business to this lender
|
|
4949
|
-
* Ranks the loan officers whose loans funded through this lender, by volume. Each label is the loan officer's NMLS ID, so it chains straight into `GET /originators/{nmlsId}`. Loans with no identified loan officer are excluded rather than collapsed into one unnavigable bucket.
|
|
4090
|
+
* Ranks the loan officers whose loans funded through this lender, by volume. Each label is the loan officer's NMLS ID, so it chains straight into `GET /v1/originators/{nmlsId}`. Loans with no identified loan officer are excluded rather than collapsed into one unnavigable bucket.
|
|
4950
4091
|
*/
|
|
4951
4092
|
const lenderOriginators = (options) => {
|
|
4952
4093
|
return (options.client ?? client).post({
|
|
@@ -5072,9 +4213,11 @@ const loansAnalyticsTimeSeries = (options) => {
|
|
|
5072
4213
|
* Submit a bulk-delivery job for loans
|
|
5073
4214
|
* Queues an ECS task that dumps every matching loans document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/loans/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
5074
4215
|
*
|
|
5075
|
-
* **Row limit.** Deliveries of up to
|
|
4216
|
+
* **Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.loans` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
5076
4217
|
*
|
|
5077
4218
|
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
4219
|
+
*
|
|
4220
|
+
* **Push-target destination.** Pass `destination: { type: "push-target", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery, except that push-target deliveries from the ModelMatch web app are not billed.
|
|
5078
4221
|
*/
|
|
5079
4222
|
const submitLoansBulkDelivery = (options) => {
|
|
5080
4223
|
return (options?.client ?? client).post({
|
|
@@ -5635,7 +4778,7 @@ const getOffice = (options) => {
|
|
|
5635
4778
|
* Search originators with filters
|
|
5636
4779
|
* Search and list individual loan originators (LOs — NMLS-registered mortgage loan officers) with filters — one row per originator. Filter by name, NMLS ID, location (state, city), employer/company, and production metrics (loan volume, units, product mix), with sorting and cursor pagination. LOCATION SEMANTICS: the state/city filters match an originator's PRODUCTION GEOGRAPHY — the markets where they actually originated loans in the selected period — not where their office or employer sits. An LO who lends across several markets matches a filter for ANY of those markets, while the `state`/`city` returned on each row reflect only their PRIMARY (highest-volume) market. So a search for city "Long Beach" can return an LO whose displayed location is a different city/state (e.g. their top market is in Arizona) — they still originated loans in Long Beach, it just isn't their #1 market. To rank originators by their volume within a specific market, sort by volume after filtering, or use the per-originator city/county/state breakdown endpoints. This is the per-originator record search: use it to find specific loan officers or build a filtered LO list. (For a single originator by NMLS ID use the originator detail endpoint.) If you only need how many originators match and not the records themselves, send the same request body to `countOriginators`.
|
|
5637
4780
|
*/
|
|
5638
|
-
const
|
|
4781
|
+
const listOriginators = (options) => {
|
|
5639
4782
|
return (options?.client ?? client).post({
|
|
5640
4783
|
security: [{
|
|
5641
4784
|
name: "x-api-key",
|
|
@@ -5655,7 +4798,7 @@ const listOriginators2 = (options) => {
|
|
|
5655
4798
|
/**
|
|
5656
4799
|
* Configurable chart (measure × slice) over one LO's loans
|
|
5657
4800
|
*/
|
|
5658
|
-
const
|
|
4801
|
+
const originatorAnalyticsChart = (options) => {
|
|
5659
4802
|
return (options?.client ?? client).post({
|
|
5660
4803
|
security: [{
|
|
5661
4804
|
name: "x-api-key",
|
|
@@ -5675,7 +4818,7 @@ const originatorAnalyticsChart2 = (options) => {
|
|
|
5675
4818
|
/**
|
|
5676
4819
|
* Production summary with previous-period comparison
|
|
5677
4820
|
*/
|
|
5678
|
-
const
|
|
4821
|
+
const originatorAnalyticsSummary = (options) => {
|
|
5679
4822
|
return (options?.client ?? client).post({
|
|
5680
4823
|
security: [{
|
|
5681
4824
|
name: "x-api-key",
|
|
@@ -5695,7 +4838,7 @@ const originatorAnalyticsSummary2 = (options) => {
|
|
|
5695
4838
|
/**
|
|
5696
4839
|
* Originator volume / units over time
|
|
5697
4840
|
*/
|
|
5698
|
-
const
|
|
4841
|
+
const originatorAnalyticsTimeSeries = (options) => {
|
|
5699
4842
|
return (options?.client ?? client).post({
|
|
5700
4843
|
security: [{
|
|
5701
4844
|
name: "x-api-key",
|
|
@@ -5716,11 +4859,13 @@ const originatorAnalyticsTimeSeries2 = (options) => {
|
|
|
5716
4859
|
* Submit a bulk-delivery job for originators
|
|
5717
4860
|
* Queues an ECS task that dumps every matching originators document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/originators/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
5718
4861
|
*
|
|
5719
|
-
* **Row limit.** Deliveries of up to
|
|
4862
|
+
* **Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.originators` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
5720
4863
|
*
|
|
5721
4864
|
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
4865
|
+
*
|
|
4866
|
+
* **Push-target destination.** Pass `destination: { type: "push-target", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery, except that push-target deliveries from the ModelMatch web app are not billed.
|
|
5722
4867
|
*/
|
|
5723
|
-
const
|
|
4868
|
+
const submitOriginatorsBulkDelivery = (options) => {
|
|
5724
4869
|
return (options?.client ?? client).post({
|
|
5725
4870
|
security: [{
|
|
5726
4871
|
name: "x-api-key",
|
|
@@ -5745,7 +4890,7 @@ const submitOriginatorsBulkDelivery2 = (options) => {
|
|
|
5745
4890
|
*
|
|
5746
4891
|
* Idempotent-ish: cancelling a job that has already finished (or was already cancelled) returns 409 and changes nothing. Poll `GET /v1/originators/bulk-delivery/{jobId}` for the settled state.
|
|
5747
4892
|
*/
|
|
5748
|
-
const
|
|
4893
|
+
const cancelOriginatorsBulkDeliveryJob = (options) => {
|
|
5749
4894
|
return (options.client ?? client).delete({
|
|
5750
4895
|
security: [{
|
|
5751
4896
|
name: "x-api-key",
|
|
@@ -5761,7 +4906,7 @@ const cancelOriginatorsBulkDeliveryJob2 = (options) => {
|
|
|
5761
4906
|
/**
|
|
5762
4907
|
* Get bulk-delivery job status for originators
|
|
5763
4908
|
*/
|
|
5764
|
-
const
|
|
4909
|
+
const getOriginatorsBulkDeliveryJob = (options) => {
|
|
5765
4910
|
return (options.client ?? client).get({
|
|
5766
4911
|
security: [{
|
|
5767
4912
|
name: "x-api-key",
|
|
@@ -5778,7 +4923,7 @@ const getOriginatorsBulkDeliveryJob2 = (options) => {
|
|
|
5778
4923
|
* Count originators matching filters
|
|
5779
4924
|
* Return the exact number of originators matching the given filters. Accepts the same request body as `listOriginators` (pagination and sort are ignored). Use this when you only need a total; to get the matching originators themselves, send the same request body to `listOriginators`.
|
|
5780
4925
|
*/
|
|
5781
|
-
const
|
|
4926
|
+
const countOriginators = (options) => {
|
|
5782
4927
|
return (options?.client ?? client).post({
|
|
5783
4928
|
security: [{
|
|
5784
4929
|
name: "x-api-key",
|
|
@@ -5815,7 +4960,7 @@ const originatorRelated = (options) => {
|
|
|
5815
4960
|
/**
|
|
5816
4961
|
* Get originator by NMLS ID
|
|
5817
4962
|
*/
|
|
5818
|
-
const
|
|
4963
|
+
const getOriginator = (options) => {
|
|
5819
4964
|
return (options.client ?? client).get({
|
|
5820
4965
|
security: [{
|
|
5821
4966
|
name: "x-api-key",
|
|
@@ -5832,7 +4977,7 @@ const getOriginator2 = (options) => {
|
|
|
5832
4977
|
* Real-estate agents this LO co-closed with
|
|
5833
4978
|
* Ranks the real-estate agents on the selling side of this LO's loans, by volume. Buckets whose name is an MLS placeholder for "no selling agent recorded" (`non member`, `non listed agent`, and ~140 board-specific spellings) are excluded rather than ranked as agents — they are not people and cannot be resolved with `GET /v1/agents/{id}`. Percentages are shares of the LO's whole loan population, so they do not sum to 100 across the page.
|
|
5834
4979
|
*/
|
|
5835
|
-
const
|
|
4980
|
+
const originatorAgents = (options) => {
|
|
5836
4981
|
return (options.client ?? client).post({
|
|
5837
4982
|
security: [{
|
|
5838
4983
|
name: "x-api-key",
|
|
@@ -5852,7 +4997,7 @@ const originatorAgents2 = (options) => {
|
|
|
5852
4997
|
/**
|
|
5853
4998
|
* Branch (broker) history for this LO
|
|
5854
4999
|
*/
|
|
5855
|
-
const
|
|
5000
|
+
const originatorBranches = (options) => {
|
|
5856
5001
|
return (options.client ?? client).post({
|
|
5857
5002
|
security: [{
|
|
5858
5003
|
name: "x-api-key",
|
|
@@ -5872,7 +5017,7 @@ const originatorBranches2 = (options) => {
|
|
|
5872
5017
|
/**
|
|
5873
5018
|
* Broker shops this LO originated loans through (name-resolved)
|
|
5874
5019
|
*/
|
|
5875
|
-
const
|
|
5020
|
+
const originatorBrokers = (options) => {
|
|
5876
5021
|
return (options.client ?? client).post({
|
|
5877
5022
|
security: [{
|
|
5878
5023
|
name: "x-api-key",
|
|
@@ -5892,7 +5037,7 @@ const originatorBrokers2 = (options) => {
|
|
|
5892
5037
|
/**
|
|
5893
5038
|
* City volume breakdown across this LO's loans
|
|
5894
5039
|
*/
|
|
5895
|
-
const
|
|
5040
|
+
const originatorCitiesBreakdown = (options) => {
|
|
5896
5041
|
return (options.client ?? client).post({
|
|
5897
5042
|
security: [{
|
|
5898
5043
|
name: "x-api-key",
|
|
@@ -5912,7 +5057,7 @@ const originatorCitiesBreakdown2 = (options) => {
|
|
|
5912
5057
|
/**
|
|
5913
5058
|
* Funding companies (employer history) for this LO
|
|
5914
5059
|
*/
|
|
5915
|
-
const
|
|
5060
|
+
const originatorCompanies = (options) => {
|
|
5916
5061
|
return (options.client ?? client).post({
|
|
5917
5062
|
security: [{
|
|
5918
5063
|
name: "x-api-key",
|
|
@@ -5932,7 +5077,7 @@ const originatorCompanies2 = (options) => {
|
|
|
5932
5077
|
/**
|
|
5933
5078
|
* County (FIPS) volume breakdown across this LO's loans
|
|
5934
5079
|
*/
|
|
5935
|
-
const
|
|
5080
|
+
const originatorCountiesBreakdown = (options) => {
|
|
5936
5081
|
return (options.client ?? client).post({
|
|
5937
5082
|
security: [{
|
|
5938
5083
|
name: "x-api-key",
|
|
@@ -5952,7 +5097,7 @@ const originatorCountiesBreakdown2 = (options) => {
|
|
|
5952
5097
|
/**
|
|
5953
5098
|
* Lenders this LO has originated through
|
|
5954
5099
|
*/
|
|
5955
|
-
const
|
|
5100
|
+
const originatorLenders = (options) => {
|
|
5956
5101
|
return (options.client ?? client).post({
|
|
5957
5102
|
security: [{
|
|
5958
5103
|
name: "x-api-key",
|
|
@@ -5972,7 +5117,7 @@ const originatorLenders2 = (options) => {
|
|
|
5972
5117
|
/**
|
|
5973
5118
|
* Real-estate offices this LO closed through (with sponsoring company)
|
|
5974
5119
|
*/
|
|
5975
|
-
const
|
|
5120
|
+
const originatorOffices = (options) => {
|
|
5976
5121
|
return (options.client ?? client).post({
|
|
5977
5122
|
security: [{
|
|
5978
5123
|
name: "x-api-key",
|
|
@@ -5992,7 +5137,7 @@ const originatorOffices2 = (options) => {
|
|
|
5992
5137
|
/**
|
|
5993
5138
|
* State volume breakdown across this LO's loans
|
|
5994
5139
|
*/
|
|
5995
|
-
const
|
|
5140
|
+
const originatorStatesBreakdown = (options) => {
|
|
5996
5141
|
return (options.client ?? client).post({
|
|
5997
5142
|
security: [{
|
|
5998
5143
|
name: "x-api-key",
|
|
@@ -6013,7 +5158,7 @@ const originatorStatesBreakdown2 = (options) => {
|
|
|
6013
5158
|
* Title companies on this LO's loans (spellings merged)
|
|
6014
5159
|
* Ranks the title companies on this entity's loans (recorded deeds, `recording_date` window — the same population and period axis as every other loans breakdown). Spellings of one company are MERGED: `label` is its most-used spelling, `id` the normalized name every spelling was grouped under (legal-form and filler words such as `inc`, `llc`, `co`, `company`, `title`, `escrow` removed; `natl` → `national`). Placeholder entries meaning "no title company recorded" (`none available` and its misspellings, `unknown`, `n/a`, …) and names shorter than 3 characters are excluded rather than ranked. `attorney` and `accommodation` are kept: they say who closed. `pctUnits` / `pctVolume` are shares of the entity's WHOLE loan population in the window, including loans with no title company, so they do not sum to 100 across the page. Pages of up to 100 via `pagination`.
|
|
6015
5160
|
*/
|
|
6016
|
-
const
|
|
5161
|
+
const originatorTitleCompanies = (options) => {
|
|
6017
5162
|
return (options.client ?? client).post({
|
|
6018
5163
|
security: [{
|
|
6019
5164
|
name: "x-api-key",
|
|
@@ -6033,7 +5178,7 @@ const originatorTitleCompanies2 = (options) => {
|
|
|
6033
5178
|
/**
|
|
6034
5179
|
* Zip-code volume breakdown
|
|
6035
5180
|
*/
|
|
6036
|
-
const
|
|
5181
|
+
const originatorZipCodes = (options) => {
|
|
6037
5182
|
return (options.client ?? client).post({
|
|
6038
5183
|
security: [{
|
|
6039
5184
|
name: "x-api-key",
|
|
@@ -6053,7 +5198,7 @@ const originatorZipCodes2 = (options) => {
|
|
|
6053
5198
|
/**
|
|
6054
5199
|
* Loans originated by this LO
|
|
6055
5200
|
*/
|
|
6056
|
-
const
|
|
5201
|
+
const originatorLoans = (options) => {
|
|
6057
5202
|
return (options.client ?? client).post({
|
|
6058
5203
|
security: [{
|
|
6059
5204
|
name: "x-api-key",
|
|
@@ -6074,7 +5219,7 @@ const originatorLoans2 = (options) => {
|
|
|
6074
5219
|
* The markets this LO lends in
|
|
6075
5220
|
* One blended view of a loan officer's lending footprint: the ZIP codes they originated in, city / county / state rollups of the same scope, and the period totals those markets are a share of. AVERAGES ARE VOLUME-WEIGHTED: the summary loan size is Σ volume ÷ Σ units, not an unweighted mean of the per-market averages (on a real footprint the two differ by thousands of dollars). Sending `zipCodes` narrows every grain to those ZIPs; sending a `dateRange` re-cuts the window. Either switches the response from the LO's pre-aggregated footprint to a live aggregation of their loans — `source` and `sourceReasons` say which was used, and bucket `key` forms differ between them (use `name` for display). All shares on this response are 0–100 percentages. A summary can cover less than the whole book: production that could not be attributed to a place is held out and reported in `summary.unresolved` rather than being folded in or silently dropped. The summary also carries a Community Lending mix — what kind of neighborhood this book lands in. These are U.S. Census tract-level aggregates describing whole neighborhoods, never individual, household or applicant attributes. Unscoped it is the LO's own whole-period mix; a ZIP or date scope recomputes it over the markets in scope, and `summary.communityLending.basis` says which you got.
|
|
6076
5221
|
*/
|
|
6077
|
-
const
|
|
5222
|
+
const originatorMarkets = (options) => {
|
|
6078
5223
|
return (options.client ?? client).post({
|
|
6079
5224
|
security: [{
|
|
6080
5225
|
name: "x-api-key",
|
|
@@ -6095,7 +5240,7 @@ const originatorMarkets2 = (options) => {
|
|
|
6095
5240
|
* Properties this loan officer has touched
|
|
6096
5241
|
* Returns the parcels this loan officer is attributed to in public record — the reverse of the `parties` block on `GET /v1/properties/{id}`. Accepts the same filters, sorts and pagination as the main property search, so a caller can ask 'this LO's parcels in Travis County built after 2015' in one request. Attribution is ALL-TIME: a parcel stays in this LO's set after the loan is paid off, because the question is career reach rather than current book. An LO with no attributed parcels returns an empty page, not a 404 — the LO may be real and simply have nothing in the public record yet.
|
|
6097
5242
|
*/
|
|
6098
|
-
const
|
|
5243
|
+
const originatorProperties = (options) => {
|
|
6099
5244
|
return (options.client ?? client).post({
|
|
6100
5245
|
security: [{
|
|
6101
5246
|
name: "x-api-key",
|
|
@@ -6177,9 +5322,11 @@ const propertiesAnalyticsSummary = (options) => {
|
|
|
6177
5322
|
* Submit a bulk-delivery job for properties
|
|
6178
5323
|
* Queues an ECS task that dumps every matching properties document to S3 in the requested format. Returns 202 with a jobId; poll `GET /v1/properties/bulk-delivery/{jobId}` for status + the signed download URL.
|
|
6179
5324
|
*
|
|
6180
|
-
* **Row limit.** Deliveries of up to
|
|
5325
|
+
* **Row limit.** Deliveries of up to 5,000 rows need no entitlement. Above that, the org's `bulk-delivery.properties` entitlement is required and its scope (row ceiling, row filters, allowed fields) governs the delivery; without it the request is rejected with 403 `entitlement_missing`. Pass `limit` at or below the ceiling to deliver a capped subset of a broader query. Email support@modelmatch.com to request a limit increase.
|
|
6181
5326
|
*
|
|
6182
5327
|
* Delivery is billed at 1 credit per row regardless of entitlement.
|
|
5328
|
+
*
|
|
5329
|
+
* **Push-target destination.** Pass `destination: { type: "push-target", targetId }` to have the finished rows sent to a configured push target instead of downloaded. The target is checked before anything is queued; a refusal returns the push target's status and `code` (`TARGET_NOT_FOUND` 404, `FORBIDDEN` 403, `PLAN_REQUIRED` 402, `TARGET_DISABLED` 409, `ENTITY_MISMATCH` 400). Limits and billing are the same as a file delivery, except that push-target deliveries from the ModelMatch web app are not billed.
|
|
6183
5330
|
*/
|
|
6184
5331
|
const submitPropertiesBulkDelivery = (options) => {
|
|
6185
5332
|
return (options?.client ?? client).post({
|
|
@@ -6684,4 +5831,4 @@ const getSearchToken = (options) => {
|
|
|
6684
5831
|
});
|
|
6685
5832
|
};
|
|
6686
5833
|
//#endregion
|
|
6687
|
-
export { client as _heyApiClient, actionCrmCallerId, addCrmContactMethod, addCrmListMember, addCrmListMembersBulk, addCrmNote, addCrmRecord, addCrmRecordsBulk, addWatchedAgent, addWatchedArea, addWatchedDocument, adminGetBulkJob, adminGetCadLinks, adminGetCadLoadTask, adminLaunchCadLoad, agentAnalyticsChart,
|
|
5834
|
+
export { client as _heyApiClient, actionCrmCallerId, addCrmContactMethod, addCrmListMember, addCrmListMembersBulk, addCrmNote, addCrmRecord, addCrmRecordsBulk, addWatchedAgent, addWatchedArea, addWatchedDocument, adminGetBulkJob, adminGetCadLinks, adminGetCadLoadTask, adminLaunchCadLoad, agentAnalyticsChart, agentAnalyticsSummary, agentAnalyticsTimeSeries, agentCities, agentCompanies, agentCounties, agentLenders, agentMarkets, agentOffices, agentOriginators, agentProperties, agentRelated, agentSales, agentStates, agentZipCodes, analyzeCrmCall, applyCrmEnrichment, applyCrmListTemplate, applyCrmMiUpdates, branchAnalyticsChart, branchAnalyticsSummary, branchAnalyticsTimeSeries, branchCities, branchCounties, branchLenders, branchLoans, branchOriginators, branchRoster, branchStates, branchTitleCompanies, cancelAgentsBulkDeliveryJob, cancelBranchesBulkDeliveryJob, cancelCompaniesBulkDeliveryJob, cancelEnrichBulkJob, cancelLoansBulkDeliveryJob, cancelOriginatorsBulkDeliveryJob, cancelPropertiesBulkDeliveryJob, companyAgents, companyAnalyticsChart, companyAnalyticsSummary, companyAnalyticsTimeSeries, companyBranches, companyBrokers, companyCities, companyCounties, companyEarlyExits, companyEmployeeStats, companyEmployment, companyHeadcount, companyLenders, companyMarkets, companyOffices, companyOriginators, companyRelated, companySponsoredIndividuals, companySponsorshipMovement, companyStates, companyTalentFlow, companyTitleCompanies, companyZipCodes, countAgents, countBranches, countCompanies, countLenders, countLoans, countOffices, countOriginators, countProperties, countSales, createClient, createCrmList, createCrmListField, createCrmManualRecord, createCrmMeeting, createCrmObjectField, createCrmRecord, createCrmTask, createCrmTemplate, createSavedFilter, crmLenderChannels, crmLoLoanMix, crmLoMomentum, crmLoSponsorLocation, crmSimilarOriginators, declineCrmMiUpdate, deleteCrmCallerId, deleteCrmList, deleteCrmListField, deleteCrmMeeting, deleteCrmNote, deleteCrmObjectField, deleteCrmRecord, deleteCrmRecords, deleteCrmTask, deleteCrmTemplate, deleteSavedFilter, describeCrmRecordsOnAdd, dismissCrmMiUpdates, editCrmLoggedActivity, editCrmNote, enrichPropertiesBatch, enrichPropertiesBulk, enrichProperty, filterCrmListMembers, findCrmRecordByNmls, generateCrmRecordDescription, getAgent, getAgentsBulkDeliveryJob, getAlertConditions, getAlertUnreadCount, getBranch, getBranchesBulkDeliveryJob, getCompaniesBulkDeliveryJob, getCompany, getCrmActiveCall, getCrmActivityReport, getCrmCall, getCrmCallTranscript, getCrmCustomValues, getCrmImportJob, getCrmList, getCrmListMemberIds, getCrmListShares, getCrmMiUpdates, getCrmOutcomesReport, getCrmOverrides, getCrmProductionEnrichJob, getCrmRecordAccess, getCrmRecordAccessRequest, getCrmRecordConnections, getCrmRecordMemberIds, getCrmRecordProfile, getCrmTemplate, getCrmTemplateShares, getEnrichBulkJob, getHubspotPushStatus, getLender, getLoan, getLoansBulkDeliveryJob, getMe, getMeCredits, getMePlan, getOffice, getOriginator, getOriginatorsBulkDeliveryJob, getPropertiesBulkDeliveryJob, getProperty, getRealtimeConfig, getSale, getSavedFilter, getSearchToken, grantCrmListAccess, grantCrmRecordAccess, grantCrmRecordAccessRequest, hangupCrmCall, importCrmRecords, instantSearch, lenderCities, lenderCompanies, lenderCounties, lenderOriginators, lenderStates, linkCrmRecord, listAgents, listAlertDigests, listAlertLog, listBranches, listCompanies, listCrmActivity, listCrmCallerIds, listCrmCustomFields, listCrmListAssignees, listCrmListFields, listCrmListMemberships, listCrmListShareableMembers, listCrmLists, listCrmMeetings, listCrmMembers, listCrmOrgMembers, listCrmRecordShareableMembers, listCrmRecordShares, listCrmReferencedActivity, listCrmTasks, listCrmTemplates, listCrmWorkspaceMeetings, listCrmWorkspaceTasks, listEnrichments, listLenders, listLoans, listMarket, listOffices, listOriginators, listProperties, listSales, listSavedFilters, listWatchedAgents, listWatchedAreas, listWatchedDocuments, loanRelated, loansAnalyticsChart, loansAnalyticsSummary, loansAnalyticsTimeSeries, logCrmActivity, lookupCompanies, markAlertDigestRead, markAlertRead, markAllAlertsRead, marketAnalyticsChart, marketAnalyticsSummary, marketAnalyticsTimeSeries, marketCommunityLending, marketMovementActivity, marketMovementByState, marketMovementCohortPayoff, marketMovementMostGained, marketMovementMostLost, marketMovementMovers, marketMovementRankings, marketMovementStats, marketMovementTransitions, officeAgents, originatorAgents, originatorAnalyticsChart, originatorAnalyticsSummary, originatorAnalyticsTimeSeries, originatorBranches, originatorBrokers, originatorCitiesBreakdown, originatorCompanies, originatorCountiesBreakdown, originatorLenders, originatorLoans, originatorMarkets, originatorOffices, originatorProperties, originatorRelated, originatorStatesBreakdown, originatorTitleCompanies, originatorZipCodes, placeCrmCall, previewAlerts, propertiesAnalyticsChart, propertiesAnalyticsSummary, propertyRelated, pushToHubspot, reconcileCrmMeetings, refreshCrmRecordMirror, removeCrmContactMethod, removeCrmListMember, removeWatchedAgent, removeWatchedArea, removeWatchedDocument, requestCrmAccess, requestCrmRecordAccess, retrieveLocation, revokeCrmListAccess, revokeCrmRecordAccess, saleRelated, salesAnalyticsChart, salesAnalyticsSummary, salesAnalyticsTimeSeries, searchCrmEmailRecipients, searchCrmMatchCandidates, searchCrmMentionRecords, searchCrmRecords, searchProperties, sendCrmEmail, setCrmCallAnalysis, setCrmCustomValue, setCrmOverride, setCrmRecordOwner, setDefaultCrmCallerId, shareCrmTemplate, submitAgentsBulkDelivery, submitBranchesBulkDelivery, submitCompaniesBulkDelivery, submitLoansBulkDelivery, submitOriginatorsBulkDelivery, submitPropertiesBulkDelivery, suggestLocations, transcribeCrmCall, transferCrmListOwnership, unshareCrmTemplate, updateAlertConditions, updateCrmContactMethod, updateCrmList, updateCrmListField, updateCrmMeeting, updateCrmObjectField, updateCrmTask, updateCrmTemplate, updateMe, updateSavedFilter };
|