@model-match/api 3.46.0 → 3.47.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/openapi.json CHANGED
@@ -18908,6 +18908,97 @@
18908
18908
  ],
18909
18909
  "type": "object"
18910
18910
  },
18911
+ "CrmImportCheck": {
18912
+ "properties": {
18913
+ "data": {
18914
+ "properties": {
18915
+ "failed": {
18916
+ "type": "number"
18917
+ },
18918
+ "fileRows": {
18919
+ "nullable": true,
18920
+ "type": "number"
18921
+ },
18922
+ "imported": {
18923
+ "type": "number"
18924
+ },
18925
+ "inCrm": {
18926
+ "type": "number"
18927
+ },
18928
+ "lists": {
18929
+ "items": {
18930
+ "properties": {
18931
+ "deleted": {
18932
+ "type": "boolean"
18933
+ },
18934
+ "imported": {
18935
+ "type": "number"
18936
+ },
18937
+ "inList": {
18938
+ "type": "number"
18939
+ },
18940
+ "listId": {
18941
+ "type": "string"
18942
+ },
18943
+ "name": {
18944
+ "type": "string"
18945
+ },
18946
+ "rows": {
18947
+ "type": "number"
18948
+ }
18949
+ },
18950
+ "required": [
18951
+ "listId",
18952
+ "name",
18953
+ "deleted",
18954
+ "rows",
18955
+ "imported",
18956
+ "inList"
18957
+ ],
18958
+ "type": "object"
18959
+ },
18960
+ "type": "array"
18961
+ },
18962
+ "notes": {
18963
+ "properties": {
18964
+ "inFile": {
18965
+ "type": "number"
18966
+ },
18967
+ "onFailedRows": {
18968
+ "type": "number"
18969
+ },
18970
+ "present": {
18971
+ "type": "number"
18972
+ }
18973
+ },
18974
+ "required": [
18975
+ "inFile",
18976
+ "onFailedRows",
18977
+ "present"
18978
+ ],
18979
+ "type": "object"
18980
+ },
18981
+ "rows": {
18982
+ "type": "number"
18983
+ }
18984
+ },
18985
+ "required": [
18986
+ "fileRows",
18987
+ "rows",
18988
+ "imported",
18989
+ "failed",
18990
+ "inCrm",
18991
+ "lists",
18992
+ "notes"
18993
+ ],
18994
+ "type": "object"
18995
+ }
18996
+ },
18997
+ "required": [
18998
+ "data"
18999
+ ],
19000
+ "type": "object"
19001
+ },
18911
19002
  "CrmImportErrorCode": {
18912
19003
  "description": "Failure reason on a failed row; drives friendly client copy. Absent on success.",
18913
19004
  "enum": [
@@ -18916,6 +19007,7 @@
18916
19007
  "WRONG_OBJECT_TYPE",
18917
19008
  "NO_ACCESS",
18918
19009
  "UNKNOWN_FIELD",
19010
+ "EXTERNAL_ID_CONFLICT",
18919
19011
  "INVALID",
18920
19012
  "INTERNAL"
18921
19013
  ],
@@ -19043,6 +19135,11 @@
19043
19135
  "description": "Set to update an existing record; omit to create one.",
19044
19136
  "type": "string"
19045
19137
  },
19138
+ "externalId": {
19139
+ "description": "The record's id in the source system (unique per org + batch externalSource). A known id updates that record; an unknown one is stamped on the created record, so re-running an import never duplicates. A record holds at most one id — a different one fails the row with EXTERNAL_ID_CONFLICT.",
19140
+ "maxLength": 256,
19141
+ "type": "string"
19142
+ },
19046
19143
  "facebook": {
19047
19144
  "type": "string"
19048
19145
  },
@@ -19062,6 +19159,21 @@
19062
19159
  "linkedin": {
19063
19160
  "type": "string"
19064
19161
  },
19162
+ "listStatus": {
19163
+ "description": "Status (id or label) within the row's first list; becomes the record's status. Fails the row when it isn't one of that list's.",
19164
+ "maxLength": 120,
19165
+ "type": "string"
19166
+ },
19167
+ "lists": {
19168
+ "description": "Lists this row's record joins, by name (case/space-insensitive), among the list owner's lists — the batch ownerUserId, else the caller. A name with no match fails the row unless the batch sets createMissingLists.",
19169
+ "items": {
19170
+ "maxLength": 200,
19171
+ "minLength": 1,
19172
+ "type": "string"
19173
+ },
19174
+ "maxItems": 20,
19175
+ "type": "array"
19176
+ },
19065
19177
  "location": {
19066
19178
  "type": "string"
19067
19179
  },
@@ -19094,6 +19206,17 @@
19094
19206
  "realtor": {
19095
19207
  "type": "string"
19096
19208
  },
19209
+ "rejectReason": {
19210
+ "description": "The client already failed this row (e.g. an undialable phone): it is logged as failed with this reason and never written.",
19211
+ "maxLength": 500,
19212
+ "minLength": 1,
19213
+ "type": "string"
19214
+ },
19215
+ "sourceLine": {
19216
+ "description": "The row's line in the source file; kept in import history so the download points back at the file.",
19217
+ "minimum": 1,
19218
+ "type": "integer"
19219
+ },
19097
19220
  "state": {
19098
19221
  "type": "string"
19099
19222
  },
@@ -19103,6 +19226,34 @@
19103
19226
  "subtitle": {
19104
19227
  "type": "string"
19105
19228
  },
19229
+ "timelineNotes": {
19230
+ "description": "Dated note history (e.g. a legacy notes export), appended as plain notes authored by the record's owner. Keyed: a note the record already has (deleted ones included) is skipped, so re-runs never double it. Distinct from `note`, which is append-only.",
19231
+ "items": {
19232
+ "properties": {
19233
+ "body": {
19234
+ "maxLength": 10000,
19235
+ "minLength": 1,
19236
+ "type": "string"
19237
+ },
19238
+ "key": {
19239
+ "description": "Stable id from the source system; absent ⇒ a hash of date + text.",
19240
+ "maxLength": 256,
19241
+ "type": "string"
19242
+ },
19243
+ "occurredAt": {
19244
+ "description": "ISO date-time the note was written (the timeline backdates to it); an unreadable date fails the row.",
19245
+ "maxLength": 64,
19246
+ "type": "string"
19247
+ }
19248
+ },
19249
+ "required": [
19250
+ "body"
19251
+ ],
19252
+ "type": "object"
19253
+ },
19254
+ "maxItems": 200,
19255
+ "type": "array"
19256
+ },
19106
19257
  "title": {
19107
19258
  "description": "Role title override for people rows (the record's Title field, column and filter) — distinct from `subtitle`, the display line under the name. Trimmed; blank reads as absent. Overwrites on update rows. Ignored on companies imports.",
19108
19259
  "type": "string"
@@ -19154,17 +19305,410 @@
19154
19305
  ],
19155
19306
  "type": "object"
19156
19307
  },
19308
+ "CrmImportRows": {
19309
+ "properties": {
19310
+ "data": {
19311
+ "properties": {
19312
+ "next": {
19313
+ "nullable": true,
19314
+ "type": "number"
19315
+ },
19316
+ "rows": {
19317
+ "items": {
19318
+ "properties": {
19319
+ "code": {
19320
+ "nullable": true,
19321
+ "type": "string"
19322
+ },
19323
+ "email": {
19324
+ "nullable": true,
19325
+ "type": "string"
19326
+ },
19327
+ "entityId": {
19328
+ "nullable": true,
19329
+ "type": "string"
19330
+ },
19331
+ "error": {
19332
+ "nullable": true,
19333
+ "type": "string"
19334
+ },
19335
+ "externalId": {
19336
+ "nullable": true,
19337
+ "type": "string"
19338
+ },
19339
+ "inCrm": {
19340
+ "type": "boolean"
19341
+ },
19342
+ "inListIds": {
19343
+ "items": {
19344
+ "type": "string"
19345
+ },
19346
+ "type": "array"
19347
+ },
19348
+ "listIds": {
19349
+ "items": {
19350
+ "type": "string"
19351
+ },
19352
+ "type": "array"
19353
+ },
19354
+ "name": {
19355
+ "nullable": true,
19356
+ "type": "string"
19357
+ },
19358
+ "notesInFile": {
19359
+ "type": "number"
19360
+ },
19361
+ "notesPresent": {
19362
+ "type": "number"
19363
+ },
19364
+ "outcome": {
19365
+ "enum": [
19366
+ "created",
19367
+ "updated",
19368
+ "failed"
19369
+ ],
19370
+ "type": "string"
19371
+ },
19372
+ "phone": {
19373
+ "nullable": true,
19374
+ "type": "string"
19375
+ },
19376
+ "seq": {
19377
+ "type": "number"
19378
+ },
19379
+ "sourceLine": {
19380
+ "nullable": true,
19381
+ "type": "number"
19382
+ }
19383
+ },
19384
+ "required": [
19385
+ "seq",
19386
+ "outcome",
19387
+ "entityId",
19388
+ "name",
19389
+ "externalId",
19390
+ "email",
19391
+ "phone",
19392
+ "code",
19393
+ "error",
19394
+ "sourceLine",
19395
+ "listIds",
19396
+ "inListIds",
19397
+ "inCrm",
19398
+ "notesInFile",
19399
+ "notesPresent"
19400
+ ],
19401
+ "type": "object"
19402
+ },
19403
+ "type": "array"
19404
+ }
19405
+ },
19406
+ "required": [
19407
+ "rows",
19408
+ "next"
19409
+ ],
19410
+ "type": "object"
19411
+ }
19412
+ },
19413
+ "required": [
19414
+ "data"
19415
+ ],
19416
+ "type": "object"
19417
+ },
19418
+ "CrmImportRun": {
19419
+ "properties": {
19420
+ "data": {
19421
+ "properties": {
19422
+ "canUndo": {
19423
+ "type": "boolean"
19424
+ },
19425
+ "completedAt": {
19426
+ "nullable": true,
19427
+ "type": "string"
19428
+ },
19429
+ "created": {
19430
+ "type": "number"
19431
+ },
19432
+ "createdAt": {
19433
+ "type": "string"
19434
+ },
19435
+ "createdByUserId": {
19436
+ "type": "string"
19437
+ },
19438
+ "externalSource": {
19439
+ "nullable": true,
19440
+ "type": "string"
19441
+ },
19442
+ "failed": {
19443
+ "type": "number"
19444
+ },
19445
+ "fileName": {
19446
+ "nullable": true,
19447
+ "type": "string"
19448
+ },
19449
+ "fileRows": {
19450
+ "nullable": true,
19451
+ "type": "number"
19452
+ },
19453
+ "id": {
19454
+ "type": "string"
19455
+ },
19456
+ "lastUndoAt": {
19457
+ "nullable": true,
19458
+ "type": "string"
19459
+ },
19460
+ "lists": {
19461
+ "items": {
19462
+ "properties": {
19463
+ "created": {
19464
+ "type": "boolean"
19465
+ },
19466
+ "deleted": {
19467
+ "type": "boolean"
19468
+ },
19469
+ "listId": {
19470
+ "type": "string"
19471
+ },
19472
+ "name": {
19473
+ "type": "string"
19474
+ }
19475
+ },
19476
+ "required": [
19477
+ "listId",
19478
+ "name",
19479
+ "created",
19480
+ "deleted"
19481
+ ],
19482
+ "type": "object"
19483
+ },
19484
+ "type": "array"
19485
+ },
19486
+ "objectType": {
19487
+ "type": "string"
19488
+ },
19489
+ "ownerUserId": {
19490
+ "nullable": true,
19491
+ "type": "string"
19492
+ },
19493
+ "scoped": {
19494
+ "type": "boolean"
19495
+ },
19496
+ "total": {
19497
+ "type": "number"
19498
+ },
19499
+ "undoRemoved": {
19500
+ "nullable": true,
19501
+ "type": "number"
19502
+ },
19503
+ "undoneAt": {
19504
+ "nullable": true,
19505
+ "type": "string"
19506
+ },
19507
+ "undoneByUserId": {
19508
+ "nullable": true,
19509
+ "type": "string"
19510
+ },
19511
+ "updated": {
19512
+ "type": "number"
19513
+ }
19514
+ },
19515
+ "required": [
19516
+ "id",
19517
+ "createdByUserId",
19518
+ "ownerUserId",
19519
+ "objectType",
19520
+ "externalSource",
19521
+ "fileName",
19522
+ "fileRows",
19523
+ "total",
19524
+ "created",
19525
+ "updated",
19526
+ "failed",
19527
+ "lists",
19528
+ "createdAt",
19529
+ "completedAt",
19530
+ "undoneAt",
19531
+ "undoneByUserId",
19532
+ "undoRemoved",
19533
+ "lastUndoAt",
19534
+ "scoped",
19535
+ "canUndo"
19536
+ ],
19537
+ "type": "object"
19538
+ }
19539
+ },
19540
+ "required": [
19541
+ "data"
19542
+ ],
19543
+ "type": "object"
19544
+ },
19545
+ "CrmImportRuns": {
19546
+ "properties": {
19547
+ "data": {
19548
+ "items": {
19549
+ "properties": {
19550
+ "canUndo": {
19551
+ "type": "boolean"
19552
+ },
19553
+ "completedAt": {
19554
+ "nullable": true,
19555
+ "type": "string"
19556
+ },
19557
+ "created": {
19558
+ "type": "number"
19559
+ },
19560
+ "createdAt": {
19561
+ "type": "string"
19562
+ },
19563
+ "createdByUserId": {
19564
+ "type": "string"
19565
+ },
19566
+ "externalSource": {
19567
+ "nullable": true,
19568
+ "type": "string"
19569
+ },
19570
+ "failed": {
19571
+ "type": "number"
19572
+ },
19573
+ "fileName": {
19574
+ "nullable": true,
19575
+ "type": "string"
19576
+ },
19577
+ "fileRows": {
19578
+ "nullable": true,
19579
+ "type": "number"
19580
+ },
19581
+ "id": {
19582
+ "type": "string"
19583
+ },
19584
+ "lastUndoAt": {
19585
+ "nullable": true,
19586
+ "type": "string"
19587
+ },
19588
+ "lists": {
19589
+ "items": {
19590
+ "properties": {
19591
+ "created": {
19592
+ "type": "boolean"
19593
+ },
19594
+ "deleted": {
19595
+ "type": "boolean"
19596
+ },
19597
+ "listId": {
19598
+ "type": "string"
19599
+ },
19600
+ "name": {
19601
+ "type": "string"
19602
+ }
19603
+ },
19604
+ "required": [
19605
+ "listId",
19606
+ "name",
19607
+ "created",
19608
+ "deleted"
19609
+ ],
19610
+ "type": "object"
19611
+ },
19612
+ "type": "array"
19613
+ },
19614
+ "objectType": {
19615
+ "type": "string"
19616
+ },
19617
+ "ownerUserId": {
19618
+ "nullable": true,
19619
+ "type": "string"
19620
+ },
19621
+ "scoped": {
19622
+ "type": "boolean"
19623
+ },
19624
+ "total": {
19625
+ "type": "number"
19626
+ },
19627
+ "undoRemoved": {
19628
+ "nullable": true,
19629
+ "type": "number"
19630
+ },
19631
+ "undoneAt": {
19632
+ "nullable": true,
19633
+ "type": "string"
19634
+ },
19635
+ "undoneByUserId": {
19636
+ "nullable": true,
19637
+ "type": "string"
19638
+ },
19639
+ "updated": {
19640
+ "type": "number"
19641
+ }
19642
+ },
19643
+ "required": [
19644
+ "id",
19645
+ "createdByUserId",
19646
+ "ownerUserId",
19647
+ "objectType",
19648
+ "externalSource",
19649
+ "fileName",
19650
+ "fileRows",
19651
+ "total",
19652
+ "created",
19653
+ "updated",
19654
+ "failed",
19655
+ "lists",
19656
+ "createdAt",
19657
+ "completedAt",
19658
+ "undoneAt",
19659
+ "undoneByUserId",
19660
+ "undoRemoved",
19661
+ "lastUndoAt",
19662
+ "scoped",
19663
+ "canUndo"
19664
+ ],
19665
+ "type": "object"
19666
+ },
19667
+ "type": "array"
19668
+ }
19669
+ },
19670
+ "required": [
19671
+ "data"
19672
+ ],
19673
+ "type": "object"
19674
+ },
19157
19675
  "CrmImportSummary": {
19158
19676
  "properties": {
19159
19677
  "created": {
19160
19678
  "type": "number"
19161
19679
  },
19680
+ "dryRun": {
19681
+ "type": "boolean"
19682
+ },
19162
19683
  "enrichJobId": {
19163
19684
  "type": "string"
19164
19685
  },
19165
19686
  "failed": {
19166
19687
  "type": "number"
19167
19688
  },
19689
+ "lists": {
19690
+ "description": "Lists the rows named (row `lists`), and which this batch created.",
19691
+ "items": {
19692
+ "properties": {
19693
+ "created": {
19694
+ "type": "boolean"
19695
+ },
19696
+ "listId": {
19697
+ "type": "string"
19698
+ },
19699
+ "name": {
19700
+ "type": "string"
19701
+ }
19702
+ },
19703
+ "required": [
19704
+ "name",
19705
+ "listId",
19706
+ "created"
19707
+ ],
19708
+ "type": "object"
19709
+ },
19710
+ "type": "array"
19711
+ },
19168
19712
  "results": {
19169
19713
  "items": {
19170
19714
  "$ref": "#/components/schemas/CrmImportRowResult"
@@ -19187,6 +19731,40 @@
19187
19731
  ],
19188
19732
  "type": "object"
19189
19733
  },
19734
+ "CrmImportUndo": {
19735
+ "properties": {
19736
+ "data": {
19737
+ "properties": {
19738
+ "keptChanged": {
19739
+ "type": "number"
19740
+ },
19741
+ "keptNoAccess": {
19742
+ "type": "number"
19743
+ },
19744
+ "listsRemoved": {
19745
+ "items": {
19746
+ "type": "string"
19747
+ },
19748
+ "type": "array"
19749
+ },
19750
+ "removed": {
19751
+ "type": "number"
19752
+ }
19753
+ },
19754
+ "required": [
19755
+ "removed",
19756
+ "keptChanged",
19757
+ "keptNoAccess",
19758
+ "listsRemoved"
19759
+ ],
19760
+ "type": "object"
19761
+ }
19762
+ },
19763
+ "required": [
19764
+ "data"
19765
+ ],
19766
+ "type": "object"
19767
+ },
19190
19768
  "CrmLenderChannels": {
19191
19769
  "properties": {
19192
19770
  "data": {
@@ -42324,7 +42902,7 @@
42324
42902
  "info": {
42325
42903
  "description": "ModelMatch API — mortgage and real-estate market data.\n\n## Bulk delivery limits\n\nThe `POST /{entity}/bulk-delivery` endpoints export a full result set to\nS3 as NDJSON, JSON, CSV, or Parquet.\n\n- **Up to 5,000 rows per delivery: no entitlement required.** Available to\n every authenticated caller.\n- **Above 5,000 rows: requires the entity's `bulk-delivery.{entity}`\n entitlement** (e.g. `bulk-delivery.loans`). The grant's scope sets your\n row ceiling and may also restrict which rows and fields you receive.\n\nA delivery that would exceed the limit available to you is rejected with\n`403 entitlement_missing`, reporting the matched row count and the ceiling\nthat applied. To stay under the limit, pass `limit` — the job then delivers\n(and bills for) only the first `limit` rows of a broader query.\n\n**Need a higher limit?** Email support@modelmatch.com to request the\nentitlement. Limits are raised per organization and per entity.\n\nBulk delivery is billed at 1 credit per delivered row whether or not\nan entitlement is held.\n\nInstead of a download, a delivery can be sent to a push target configured\non your workspace: pass `destination: { type: \"push-target\", targetId }`.\nThe same limits and billing apply.",
42326
42904
  "title": "ModelMatch API",
42327
- "version": "3.107.0"
42905
+ "version": "3.108.0"
42328
42906
  },
42329
42907
  "openapi": "3.1.0",
42330
42908
  "paths": {
@@ -56682,6 +57260,14 @@
56682
57260
  "application/json": {
56683
57261
  "schema": {
56684
57262
  "properties": {
57263
+ "createMissingLists": {
57264
+ "description": "Create lists rows name that the list owner doesn't have yet, owned by ownerUserId (else the caller).",
57265
+ "type": "boolean"
57266
+ },
57267
+ "dryRun": {
57268
+ "description": "Plan only: return what the import WOULD do (per-row created / updated / failed, lists it would find or create) without writing anything. Always synchronous.",
57269
+ "type": "boolean"
57270
+ },
56685
57271
  "entityType": {
56686
57272
  "allOf": [
56687
57273
  {
@@ -56692,10 +57278,50 @@
56692
57278
  }
56693
57279
  ]
56694
57280
  },
57281
+ "externalSource": {
57282
+ "description": "Source system the rows' externalIds belong to (e.g. \"legacy-mm\"). Defaults to \"import\".",
57283
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$",
57284
+ "type": "string"
57285
+ },
57286
+ "fileName": {
57287
+ "description": "Source file name, shown in import history.",
57288
+ "maxLength": 255,
57289
+ "type": "string"
57290
+ },
57291
+ "fileRows": {
57292
+ "description": "Data rows in the source file (the client's count, including rows it rejected before sending) — the check report's file rows.",
57293
+ "minimum": 0,
57294
+ "type": "integer"
57295
+ },
57296
+ "importBatchKey": {
57297
+ "description": "This batch's key within its run (e.g. \"2/5\"). A batch resent under a key the run already recorded is refused (409).",
57298
+ "maxLength": 40,
57299
+ "minLength": 1,
57300
+ "type": "string"
57301
+ },
57302
+ "importRunId": {
57303
+ "description": "Import history run id, minted by the client per run and sent with every batch of it — the batches become one history entry.",
57304
+ "maxLength": 100,
57305
+ "minLength": 1,
57306
+ "type": "string"
57307
+ },
56695
57308
  "listId": {
56696
57309
  "nullable": true,
56697
57310
  "type": "string"
56698
57311
  },
57312
+ "listStatuses": {
57313
+ "additionalProperties": {
57314
+ "items": {
57315
+ "maxLength": 120,
57316
+ "minLength": 1,
57317
+ "type": "string"
57318
+ },
57319
+ "maxItems": 50,
57320
+ "type": "array"
57321
+ },
57322
+ "description": "Status labels, in order, per list name — the status vocabulary of lists this batch creates (else the default statuses).",
57323
+ "type": "object"
57324
+ },
56699
57325
  "objectType": {
56700
57326
  "$ref": "#/components/schemas/CrmObjectType"
56701
57327
  },
@@ -56780,6 +57406,16 @@
56780
57406
  },
56781
57407
  "description": "Not found"
56782
57408
  },
57409
+ "409": {
57410
+ "content": {
57411
+ "application/json": {
57412
+ "schema": {
57413
+ "$ref": "#/components/schemas/ErrorResponse"
57414
+ }
57415
+ }
57416
+ },
57417
+ "description": "This batch's `importBatchKey` was already recorded on the run — a resend, refused."
57418
+ },
56783
57419
  "413": {
56784
57420
  "content": {
56785
57421
  "application/json": {
@@ -56910,6 +57546,531 @@
56910
57546
  ]
56911
57547
  }
56912
57548
  },
57549
+ "/v1/crm/imports": {
57550
+ "get": {
57551
+ "operationId": "listCrmImports",
57552
+ "parameters": [
57553
+ {
57554
+ "in": "query",
57555
+ "name": "limit",
57556
+ "required": false,
57557
+ "schema": {
57558
+ "maximum": 500,
57559
+ "minimum": 1,
57560
+ "type": "integer"
57561
+ }
57562
+ },
57563
+ {
57564
+ "description": "Only runs that touched this list (list settings).",
57565
+ "in": "query",
57566
+ "name": "listId",
57567
+ "required": false,
57568
+ "schema": {
57569
+ "description": "Only runs that touched this list (list settings).",
57570
+ "minLength": 1,
57571
+ "type": "string"
57572
+ }
57573
+ },
57574
+ {
57575
+ "description": "Page back: runs created before this (the last run's `createdAt`).",
57576
+ "in": "query",
57577
+ "name": "before",
57578
+ "required": false,
57579
+ "schema": {
57580
+ "description": "Page back: runs created before this (the last run's `createdAt`).",
57581
+ "format": "date-time",
57582
+ "type": "string"
57583
+ }
57584
+ }
57585
+ ],
57586
+ "responses": {
57587
+ "200": {
57588
+ "content": {
57589
+ "application/json": {
57590
+ "schema": {
57591
+ "$ref": "#/components/schemas/CrmImportRuns"
57592
+ }
57593
+ }
57594
+ },
57595
+ "description": "Import runs."
57596
+ },
57597
+ "400": {
57598
+ "content": {
57599
+ "application/json": {
57600
+ "schema": {
57601
+ "$ref": "#/components/schemas/ErrorResponse"
57602
+ }
57603
+ }
57604
+ },
57605
+ "description": "Validation error"
57606
+ },
57607
+ "401": {
57608
+ "content": {
57609
+ "application/json": {
57610
+ "schema": {
57611
+ "$ref": "#/components/schemas/ErrorResponse"
57612
+ }
57613
+ }
57614
+ },
57615
+ "description": "Unauthorized"
57616
+ },
57617
+ "403": {
57618
+ "content": {
57619
+ "application/json": {
57620
+ "schema": {
57621
+ "$ref": "#/components/schemas/ErrorResponse"
57622
+ }
57623
+ }
57624
+ },
57625
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)"
57626
+ },
57627
+ "404": {
57628
+ "content": {
57629
+ "application/json": {
57630
+ "schema": {
57631
+ "$ref": "#/components/schemas/ErrorResponse"
57632
+ }
57633
+ }
57634
+ },
57635
+ "description": "Not found"
57636
+ },
57637
+ "413": {
57638
+ "content": {
57639
+ "application/json": {
57640
+ "schema": {
57641
+ "$ref": "#/components/schemas/PayloadTooLarge"
57642
+ }
57643
+ }
57644
+ },
57645
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits"
57646
+ },
57647
+ "503": {
57648
+ "content": {
57649
+ "application/json": {
57650
+ "schema": {
57651
+ "$ref": "#/components/schemas/SearchUnavailable"
57652
+ }
57653
+ }
57654
+ },
57655
+ "description": "Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."
57656
+ }
57657
+ },
57658
+ "summary": "List import runs (own + into your lists; all for admins), newest first",
57659
+ "tags": [
57660
+ "CRM"
57661
+ ]
57662
+ }
57663
+ },
57664
+ "/v1/crm/imports/{id}": {
57665
+ "get": {
57666
+ "operationId": "getCrmImport",
57667
+ "parameters": [
57668
+ {
57669
+ "description": "Import run id.",
57670
+ "in": "path",
57671
+ "name": "id",
57672
+ "required": true,
57673
+ "schema": {
57674
+ "description": "Import run id.",
57675
+ "type": "string"
57676
+ }
57677
+ }
57678
+ ],
57679
+ "responses": {
57680
+ "200": {
57681
+ "content": {
57682
+ "application/json": {
57683
+ "schema": {
57684
+ "$ref": "#/components/schemas/CrmImportRun"
57685
+ }
57686
+ }
57687
+ },
57688
+ "description": "The import run."
57689
+ },
57690
+ "400": {
57691
+ "content": {
57692
+ "application/json": {
57693
+ "schema": {
57694
+ "$ref": "#/components/schemas/ErrorResponse"
57695
+ }
57696
+ }
57697
+ },
57698
+ "description": "Validation error"
57699
+ },
57700
+ "401": {
57701
+ "content": {
57702
+ "application/json": {
57703
+ "schema": {
57704
+ "$ref": "#/components/schemas/ErrorResponse"
57705
+ }
57706
+ }
57707
+ },
57708
+ "description": "Unauthorized"
57709
+ },
57710
+ "403": {
57711
+ "content": {
57712
+ "application/json": {
57713
+ "schema": {
57714
+ "$ref": "#/components/schemas/ErrorResponse"
57715
+ }
57716
+ }
57717
+ },
57718
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)"
57719
+ },
57720
+ "404": {
57721
+ "content": {
57722
+ "application/json": {
57723
+ "schema": {
57724
+ "$ref": "#/components/schemas/ErrorResponse"
57725
+ }
57726
+ }
57727
+ },
57728
+ "description": "Not found"
57729
+ },
57730
+ "413": {
57731
+ "content": {
57732
+ "application/json": {
57733
+ "schema": {
57734
+ "$ref": "#/components/schemas/PayloadTooLarge"
57735
+ }
57736
+ }
57737
+ },
57738
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits"
57739
+ },
57740
+ "503": {
57741
+ "content": {
57742
+ "application/json": {
57743
+ "schema": {
57744
+ "$ref": "#/components/schemas/SearchUnavailable"
57745
+ }
57746
+ }
57747
+ },
57748
+ "description": "Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."
57749
+ }
57750
+ },
57751
+ "summary": "Get one import run",
57752
+ "tags": [
57753
+ "CRM"
57754
+ ]
57755
+ }
57756
+ },
57757
+ "/v1/crm/imports/{id}/check": {
57758
+ "get": {
57759
+ "operationId": "checkCrmImport",
57760
+ "parameters": [
57761
+ {
57762
+ "description": "Import run id.",
57763
+ "in": "path",
57764
+ "name": "id",
57765
+ "required": true,
57766
+ "schema": {
57767
+ "description": "Import run id.",
57768
+ "type": "string"
57769
+ }
57770
+ }
57771
+ ],
57772
+ "responses": {
57773
+ "200": {
57774
+ "content": {
57775
+ "application/json": {
57776
+ "schema": {
57777
+ "$ref": "#/components/schemas/CrmImportCheck"
57778
+ }
57779
+ }
57780
+ },
57781
+ "description": "The run checked against the CRM now."
57782
+ },
57783
+ "400": {
57784
+ "content": {
57785
+ "application/json": {
57786
+ "schema": {
57787
+ "$ref": "#/components/schemas/ErrorResponse"
57788
+ }
57789
+ }
57790
+ },
57791
+ "description": "Validation error"
57792
+ },
57793
+ "401": {
57794
+ "content": {
57795
+ "application/json": {
57796
+ "schema": {
57797
+ "$ref": "#/components/schemas/ErrorResponse"
57798
+ }
57799
+ }
57800
+ },
57801
+ "description": "Unauthorized"
57802
+ },
57803
+ "403": {
57804
+ "content": {
57805
+ "application/json": {
57806
+ "schema": {
57807
+ "$ref": "#/components/schemas/ErrorResponse"
57808
+ }
57809
+ }
57810
+ },
57811
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)"
57812
+ },
57813
+ "404": {
57814
+ "content": {
57815
+ "application/json": {
57816
+ "schema": {
57817
+ "$ref": "#/components/schemas/ErrorResponse"
57818
+ }
57819
+ }
57820
+ },
57821
+ "description": "Not found"
57822
+ },
57823
+ "413": {
57824
+ "content": {
57825
+ "application/json": {
57826
+ "schema": {
57827
+ "$ref": "#/components/schemas/PayloadTooLarge"
57828
+ }
57829
+ }
57830
+ },
57831
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits"
57832
+ },
57833
+ "503": {
57834
+ "content": {
57835
+ "application/json": {
57836
+ "schema": {
57837
+ "$ref": "#/components/schemas/SearchUnavailable"
57838
+ }
57839
+ }
57840
+ },
57841
+ "description": "Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."
57842
+ }
57843
+ },
57844
+ "summary": "Check report for an import run (rows, records, lists, notes)",
57845
+ "tags": [
57846
+ "CRM"
57847
+ ]
57848
+ }
57849
+ },
57850
+ "/v1/crm/imports/{id}/rows": {
57851
+ "get": {
57852
+ "operationId": "listCrmImportRows",
57853
+ "parameters": [
57854
+ {
57855
+ "description": "Import run id.",
57856
+ "in": "path",
57857
+ "name": "id",
57858
+ "required": true,
57859
+ "schema": {
57860
+ "description": "Import run id.",
57861
+ "type": "string"
57862
+ }
57863
+ },
57864
+ {
57865
+ "description": "Cursor: return rows after this `seq` (from `next`).",
57866
+ "in": "query",
57867
+ "name": "after",
57868
+ "required": false,
57869
+ "schema": {
57870
+ "description": "Cursor: return rows after this `seq` (from `next`).",
57871
+ "minimum": -1,
57872
+ "nullable": true,
57873
+ "type": "integer"
57874
+ }
57875
+ },
57876
+ {
57877
+ "in": "query",
57878
+ "name": "limit",
57879
+ "required": false,
57880
+ "schema": {
57881
+ "maximum": 5000,
57882
+ "minimum": 1,
57883
+ "type": "integer"
57884
+ }
57885
+ }
57886
+ ],
57887
+ "responses": {
57888
+ "200": {
57889
+ "content": {
57890
+ "application/json": {
57891
+ "schema": {
57892
+ "$ref": "#/components/schemas/CrmImportRows"
57893
+ }
57894
+ }
57895
+ },
57896
+ "description": "A page of the run's rows."
57897
+ },
57898
+ "400": {
57899
+ "content": {
57900
+ "application/json": {
57901
+ "schema": {
57902
+ "$ref": "#/components/schemas/ErrorResponse"
57903
+ }
57904
+ }
57905
+ },
57906
+ "description": "Validation error"
57907
+ },
57908
+ "401": {
57909
+ "content": {
57910
+ "application/json": {
57911
+ "schema": {
57912
+ "$ref": "#/components/schemas/ErrorResponse"
57913
+ }
57914
+ }
57915
+ },
57916
+ "description": "Unauthorized"
57917
+ },
57918
+ "403": {
57919
+ "content": {
57920
+ "application/json": {
57921
+ "schema": {
57922
+ "$ref": "#/components/schemas/ErrorResponse"
57923
+ }
57924
+ }
57925
+ },
57926
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)"
57927
+ },
57928
+ "404": {
57929
+ "content": {
57930
+ "application/json": {
57931
+ "schema": {
57932
+ "$ref": "#/components/schemas/ErrorResponse"
57933
+ }
57934
+ }
57935
+ },
57936
+ "description": "Not found"
57937
+ },
57938
+ "413": {
57939
+ "content": {
57940
+ "application/json": {
57941
+ "schema": {
57942
+ "$ref": "#/components/schemas/PayloadTooLarge"
57943
+ }
57944
+ }
57945
+ },
57946
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits"
57947
+ },
57948
+ "503": {
57949
+ "content": {
57950
+ "application/json": {
57951
+ "schema": {
57952
+ "$ref": "#/components/schemas/SearchUnavailable"
57953
+ }
57954
+ }
57955
+ },
57956
+ "description": "Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."
57957
+ }
57958
+ },
57959
+ "summary": "Every row of an import run with its outcome, in file order",
57960
+ "tags": [
57961
+ "CRM"
57962
+ ]
57963
+ }
57964
+ },
57965
+ "/v1/crm/imports/{id}/undo": {
57966
+ "post": {
57967
+ "operationId": "undoCrmImport",
57968
+ "parameters": [
57969
+ {
57970
+ "description": "Import run id.",
57971
+ "in": "path",
57972
+ "name": "id",
57973
+ "required": true,
57974
+ "schema": {
57975
+ "description": "Import run id.",
57976
+ "type": "string"
57977
+ }
57978
+ }
57979
+ ],
57980
+ "requestBody": {
57981
+ "content": {
57982
+ "application/json": {
57983
+ "schema": {
57984
+ "properties": {
57985
+ "dryRun": {
57986
+ "description": "Count what would be removed; change nothing.",
57987
+ "type": "boolean"
57988
+ }
57989
+ },
57990
+ "type": "object"
57991
+ }
57992
+ }
57993
+ },
57994
+ "required": false
57995
+ },
57996
+ "responses": {
57997
+ "200": {
57998
+ "content": {
57999
+ "application/json": {
58000
+ "schema": {
58001
+ "$ref": "#/components/schemas/CrmImportUndo"
58002
+ }
58003
+ }
58004
+ },
58005
+ "description": "What was (or, on a dry run, would be) removed and kept."
58006
+ },
58007
+ "400": {
58008
+ "content": {
58009
+ "application/json": {
58010
+ "schema": {
58011
+ "$ref": "#/components/schemas/ErrorResponse"
58012
+ }
58013
+ }
58014
+ },
58015
+ "description": "Validation error"
58016
+ },
58017
+ "401": {
58018
+ "content": {
58019
+ "application/json": {
58020
+ "schema": {
58021
+ "$ref": "#/components/schemas/ErrorResponse"
58022
+ }
58023
+ }
58024
+ },
58025
+ "description": "Unauthorized"
58026
+ },
58027
+ "403": {
58028
+ "content": {
58029
+ "application/json": {
58030
+ "schema": {
58031
+ "$ref": "#/components/schemas/ErrorResponse"
58032
+ }
58033
+ }
58034
+ },
58035
+ "description": "Forbidden (authenticated, but missing required context — e.g. no active organization)"
58036
+ },
58037
+ "404": {
58038
+ "content": {
58039
+ "application/json": {
58040
+ "schema": {
58041
+ "$ref": "#/components/schemas/ErrorResponse"
58042
+ }
58043
+ }
58044
+ },
58045
+ "description": "Not found"
58046
+ },
58047
+ "413": {
58048
+ "content": {
58049
+ "application/json": {
58050
+ "schema": {
58051
+ "$ref": "#/components/schemas/PayloadTooLarge"
58052
+ }
58053
+ }
58054
+ },
58055
+ "description": "Response payload too large — detail endpoint capped to fit Lambda response limits"
58056
+ },
58057
+ "503": {
58058
+ "content": {
58059
+ "application/json": {
58060
+ "schema": {
58061
+ "$ref": "#/components/schemas/SearchUnavailable"
58062
+ }
58063
+ }
58064
+ },
58065
+ "description": "Search timed out or the cluster is overloaded — retry after `Retry-After` seconds."
58066
+ }
58067
+ },
58068
+ "summary": "Undo an import run (removes untouched records it created)",
58069
+ "tags": [
58070
+ "CRM"
58071
+ ]
58072
+ }
58073
+ },
56913
58074
  "/v1/crm/lender-channels": {
56914
58075
  "post": {
56915
58076
  "operationId": "crmLenderChannels",