@talonic/docs 0.21.64 → 0.21.65

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
@@ -40369,7 +40369,7 @@
40369
40369
  "get": {
40370
40370
  "operationId": "getApOverview",
40371
40371
  "summary": "Totals, entities and the last posting run",
40372
- "description": "The state of the payables inbox without the bills themselves (use `GET /v1/ap/bills`). `gaps` lists what is missing for a complete read: `money_found_not_configured`, `no_binding:<role>`, `unreadable:<role>` and `ledger_unavailable`. Amounts are in the ledger currency of the workspace's Money Found configuration.",
40372
+ "description": "The state of the payables inbox without the bills themselves (use `GET /v1/ap/bills`). The invoices come from the Spec Money Found's invoice role names, else from the workspace's pipeline holding the most documents classified as invoices; `configured` is false only when there is none (`gaps` holds `no_invoice_pipeline`). `gaps` lists what is missing for a complete read: `contracts_not_set_up` (no Money Found) or `contracts_not_bound` (Money Found does not read these invoices), so prices are not checked against contracts while every other check runs; `processing:<role>` while the run is still reading invoices; `rules_pending` while invoices are still checked against the payment rules (`GET /v1/ap/rules`), `no_binding:<role>`, `unreadable:<role>`, `ledger_unavailable`, `contracts_pending` and the contract gaps per source. Amounts are in the currency of the workspace's Money Found configuration, else USD.",
40373
40373
  "tags": [
40374
40374
  "Accounts Payable"
40375
40375
  ],
@@ -40403,9 +40403,12 @@
40403
40403
  "type": "string",
40404
40404
  "enum": [
40405
40405
  "ready",
40406
+ "needs_info",
40407
+ "evaluating",
40406
40408
  "held"
40407
40409
  ]
40408
- }
40410
+ },
40411
+ "description": "evaluating: no hold yet, but the contract price check has not finished."
40409
40412
  },
40410
40413
  {
40411
40414
  "name": "entity",
@@ -40424,11 +40427,31 @@
40424
40427
  "above_contract",
40425
40428
  "duplicate",
40426
40429
  "missing_po",
40427
- "vendor_unknown"
40430
+ "vendor_unknown",
40431
+ "sums_mismatch",
40432
+ "not_received",
40433
+ "above_po",
40434
+ "bank_changed",
40435
+ "already_paid",
40436
+ "date_check",
40437
+ "policy_rule"
40428
40438
  ]
40429
40439
  },
40430
40440
  "description": "Bills with a hold of this reason."
40431
40441
  },
40442
+ {
40443
+ "name": "risk",
40444
+ "in": "query",
40445
+ "schema": {
40446
+ "type": "string",
40447
+ "enum": [
40448
+ "high",
40449
+ "medium",
40450
+ "low"
40451
+ ]
40452
+ },
40453
+ "description": "Held bills of this risk (`ApRisk`)."
40454
+ },
40432
40455
  {
40433
40456
  "name": "q",
40434
40457
  "in": "query",
@@ -40484,7 +40507,7 @@
40484
40507
  "get": {
40485
40508
  "operationId": "listApIssues",
40486
40509
  "summary": "The worklist of held bills",
40487
- "description": "Held bills with why they are held, the dollars at stake and the evidence, largest first.",
40510
+ "description": "Held bills and bills missing information, with why, the dollars at stake, the risk and the evidence; highest risk first, then the dollars at stake, then bills missing information.",
40488
40511
  "tags": [
40489
40512
  "Accounts Payable"
40490
40513
  ],
@@ -40513,6 +40536,71 @@
40513
40536
  }
40514
40537
  }
40515
40538
  },
40539
+ "/v1/ap/risk": {
40540
+ "get": {
40541
+ "operationId": "getApRiskMatrix",
40542
+ "summary": "The risk matrix",
40543
+ "description": "The platform's defaults, the workspace's changes (`overrides`, null when none) and the settings in force, with the matrix that turns likelihood and impact into a held bill's risk.",
40544
+ "tags": [
40545
+ "Accounts Payable"
40546
+ ],
40547
+ "responses": {
40548
+ "200": {
40549
+ "description": "The risk matrix.",
40550
+ "content": {
40551
+ "application/json": {
40552
+ "schema": {
40553
+ "$ref": "#/components/schemas/ApRiskMatrix"
40554
+ }
40555
+ }
40556
+ }
40557
+ }
40558
+ }
40559
+ },
40560
+ "put": {
40561
+ "operationId": "saveApRiskMatrix",
40562
+ "summary": "Save the risk matrix",
40563
+ "description": "Only what differs from the defaults is kept; a part the body leaves out (`likelihood` or `impact`) keeps what was saved; `risk: null` goes back to the defaults. The rest of the AP configuration is untouched. Every held bill's risk follows on the next read.",
40564
+ "tags": [
40565
+ "Accounts Payable"
40566
+ ],
40567
+ "requestBody": {
40568
+ "required": true,
40569
+ "content": {
40570
+ "application/json": {
40571
+ "schema": {
40572
+ "type": "object",
40573
+ "properties": {
40574
+ "risk": {
40575
+ "nullable": true,
40576
+ "allOf": [
40577
+ {
40578
+ "$ref": "#/components/schemas/ApRiskSettings"
40579
+ }
40580
+ ]
40581
+ }
40582
+ }
40583
+ }
40584
+ }
40585
+ }
40586
+ },
40587
+ "responses": {
40588
+ "200": {
40589
+ "description": "The risk matrix as saved.",
40590
+ "content": {
40591
+ "application/json": {
40592
+ "schema": {
40593
+ "$ref": "#/components/schemas/ApRiskMatrix"
40594
+ }
40595
+ }
40596
+ }
40597
+ },
40598
+ "400": {
40599
+ "$ref": "#/components/responses/BadRequest"
40600
+ }
40601
+ }
40602
+ }
40603
+ },
40516
40604
  "/v1/ap/config": {
40517
40605
  "get": {
40518
40606
  "operationId": "getApConfig",
@@ -40749,6 +40837,314 @@
40749
40837
  }
40750
40838
  }
40751
40839
  },
40840
+ "/v1/ap/rules": {
40841
+ "get": {
40842
+ "operationId": "listApRules",
40843
+ "summary": "Payment-rule batches and their rules",
40844
+ "description": "Every batch of payment-rule files (policies, validation rules), newest first: each file's reading state (`status` pending, processing, waiting, completed, error; `rules_status` none, generating, waiting, ready, error) and the rules found in it, each with the words of the file it comes from. Every invoice is checked against all of them, together with the documents it links to (purchase orders, delivery notes, contract); a failed rule holds it (`policy_rule`), an unclear one is a note, and a check still running makes it `evaluating` (gap `rules_pending`). Requires scope `read`.",
40845
+ "tags": [
40846
+ "Accounts Payable"
40847
+ ],
40848
+ "responses": {
40849
+ "200": {
40850
+ "description": "The batches.",
40851
+ "content": {
40852
+ "application/json": {
40853
+ "schema": {
40854
+ "type": "array",
40855
+ "items": {
40856
+ "type": "object",
40857
+ "properties": {
40858
+ "id": {
40859
+ "type": "string",
40860
+ "format": "uuid"
40861
+ },
40862
+ "name": {
40863
+ "type": "string"
40864
+ },
40865
+ "created_at": {
40866
+ "type": "string",
40867
+ "format": "date-time"
40868
+ },
40869
+ "files": {
40870
+ "type": "array",
40871
+ "items": {
40872
+ "type": "object",
40873
+ "properties": {
40874
+ "document_id": {
40875
+ "type": "string",
40876
+ "format": "uuid"
40877
+ },
40878
+ "filename": {
40879
+ "type": "string"
40880
+ },
40881
+ "status": {
40882
+ "type": "string"
40883
+ },
40884
+ "rules_status": {
40885
+ "type": "string"
40886
+ },
40887
+ "error": {
40888
+ "type": "string",
40889
+ "nullable": true
40890
+ },
40891
+ "rule_count": {
40892
+ "type": "integer"
40893
+ }
40894
+ }
40895
+ }
40896
+ },
40897
+ "rules": {
40898
+ "type": "array",
40899
+ "items": {
40900
+ "type": "object",
40901
+ "properties": {
40902
+ "id": {
40903
+ "type": "string",
40904
+ "format": "uuid"
40905
+ },
40906
+ "document_id": {
40907
+ "type": "string",
40908
+ "format": "uuid"
40909
+ },
40910
+ "code": {
40911
+ "type": "string",
40912
+ "nullable": true
40913
+ },
40914
+ "text": {
40915
+ "type": "string"
40916
+ },
40917
+ "obligation": {
40918
+ "type": "string"
40919
+ },
40920
+ "source_quote": {
40921
+ "type": "string",
40922
+ "nullable": true
40923
+ },
40924
+ "origin": {
40925
+ "type": "string"
40926
+ }
40927
+ }
40928
+ }
40929
+ }
40930
+ }
40931
+ }
40932
+ }
40933
+ }
40934
+ }
40935
+ }
40936
+ }
40937
+ }
40938
+ },
40939
+ "/v1/ap/rules/batches": {
40940
+ "post": {
40941
+ "operationId": "createApRuleBatch",
40942
+ "summary": "Add payment-rule files as a batch",
40943
+ "description": "Documents already uploaded (1 to 50) become one batch: each is read and turned into rules in the background, then every invoice is checked against them. They stay out of the Compliance app. Requires scope `write`.",
40944
+ "tags": [
40945
+ "Accounts Payable"
40946
+ ],
40947
+ "requestBody": {
40948
+ "required": true,
40949
+ "content": {
40950
+ "application/json": {
40951
+ "schema": {
40952
+ "type": "object",
40953
+ "required": [
40954
+ "document_ids"
40955
+ ],
40956
+ "properties": {
40957
+ "document_ids": {
40958
+ "type": "array",
40959
+ "minItems": 1,
40960
+ "maxItems": 50,
40961
+ "items": {
40962
+ "type": "string",
40963
+ "format": "uuid"
40964
+ }
40965
+ },
40966
+ "name": {
40967
+ "type": "string",
40968
+ "maxLength": 200
40969
+ }
40970
+ }
40971
+ }
40972
+ }
40973
+ }
40974
+ },
40975
+ "responses": {
40976
+ "201": {
40977
+ "description": "The batch."
40978
+ },
40979
+ "404": {
40980
+ "$ref": "#/components/responses/NotFound"
40981
+ }
40982
+ }
40983
+ }
40984
+ },
40985
+ "/v1/ap/rules/batches/{id}": {
40986
+ "delete": {
40987
+ "operationId": "deleteApRuleBatch",
40988
+ "summary": "Remove a batch of payment rules",
40989
+ "description": "Its files stop being rule files (the documents stay) and every invoice is checked again without its rules. Requires scope `write`.",
40990
+ "tags": [
40991
+ "Accounts Payable"
40992
+ ],
40993
+ "parameters": [
40994
+ {
40995
+ "name": "id",
40996
+ "in": "path",
40997
+ "required": true,
40998
+ "schema": {
40999
+ "type": "string",
41000
+ "format": "uuid"
41001
+ }
41002
+ }
41003
+ ],
41004
+ "responses": {
41005
+ "200": {
41006
+ "description": "Removed."
41007
+ },
41008
+ "404": {
41009
+ "$ref": "#/components/responses/NotFound"
41010
+ }
41011
+ }
41012
+ }
41013
+ },
41014
+ "/v1/ap/rules/batches/{id}/rules": {
41015
+ "post": {
41016
+ "operationId": "createApRule",
41017
+ "summary": "Add a rule to a batch",
41018
+ "description": "A rule written by a person, checked like the rules found in the files. Requires scope `write`.",
41019
+ "tags": [
41020
+ "Accounts Payable"
41021
+ ],
41022
+ "parameters": [
41023
+ {
41024
+ "name": "id",
41025
+ "in": "path",
41026
+ "required": true,
41027
+ "schema": {
41028
+ "type": "string",
41029
+ "format": "uuid"
41030
+ }
41031
+ }
41032
+ ],
41033
+ "requestBody": {
41034
+ "required": true,
41035
+ "content": {
41036
+ "application/json": {
41037
+ "schema": {
41038
+ "type": "object",
41039
+ "required": [
41040
+ "text"
41041
+ ],
41042
+ "properties": {
41043
+ "text": {
41044
+ "type": "string",
41045
+ "maxLength": 2000
41046
+ }
41047
+ }
41048
+ }
41049
+ }
41050
+ }
41051
+ },
41052
+ "responses": {
41053
+ "201": {
41054
+ "description": "The rule."
41055
+ },
41056
+ "404": {
41057
+ "$ref": "#/components/responses/NotFound"
41058
+ }
41059
+ }
41060
+ }
41061
+ },
41062
+ "/v1/ap/rules/rules/{ruleId}": {
41063
+ "delete": {
41064
+ "operationId": "deleteApRule",
41065
+ "summary": "Remove a payment rule",
41066
+ "description": "Requires scope `write`.",
41067
+ "tags": [
41068
+ "Accounts Payable"
41069
+ ],
41070
+ "parameters": [
41071
+ {
41072
+ "name": "ruleId",
41073
+ "in": "path",
41074
+ "required": true,
41075
+ "schema": {
41076
+ "type": "string",
41077
+ "format": "uuid"
41078
+ }
41079
+ }
41080
+ ],
41081
+ "responses": {
41082
+ "200": {
41083
+ "description": "Removed."
41084
+ },
41085
+ "404": {
41086
+ "$ref": "#/components/responses/NotFound"
41087
+ }
41088
+ }
41089
+ }
41090
+ },
41091
+ "/v1/ap/intake": {
41092
+ "post": {
41093
+ "operationId": "postApIntake",
41094
+ "summary": "Add invoices to the invoice pipeline",
41095
+ "description": "Adds the workspace's documents classified as invoices, purchase orders or delivery notes to the pipeline AP reads, and starts it (only the new documents are read). It takes only documents no run holds yet (one a person or a routing rule sent elsewhere stays there) and only from the sources the pipeline already reads, or from a new source no other Spec reads (so sales invoices the company issues, read by another Spec, are not read as bills). New documents are added by themselves once classified; this catches up the ones that arrived before. With `dry_run` nothing is added and `added` lists what would be. `pipeline_id` is null when the workspace has no invoice pipeline. Requires scope `write`.",
41096
+ "tags": [
41097
+ "Accounts Payable"
41098
+ ],
41099
+ "requestBody": {
41100
+ "required": false,
41101
+ "content": {
41102
+ "application/json": {
41103
+ "schema": {
41104
+ "type": "object",
41105
+ "properties": {
41106
+ "dry_run": {
41107
+ "type": "boolean"
41108
+ }
41109
+ }
41110
+ }
41111
+ }
41112
+ }
41113
+ },
41114
+ "responses": {
41115
+ "201": {
41116
+ "description": "What was added.",
41117
+ "content": {
41118
+ "application/json": {
41119
+ "schema": {
41120
+ "type": "object",
41121
+ "properties": {
41122
+ "pipeline_id": {
41123
+ "type": "string",
41124
+ "format": "uuid",
41125
+ "nullable": true
41126
+ },
41127
+ "added": {
41128
+ "type": "array",
41129
+ "items": {
41130
+ "type": "string",
41131
+ "format": "uuid"
41132
+ }
41133
+ }
41134
+ }
41135
+ }
41136
+ }
41137
+ }
41138
+ },
41139
+ "400": {
41140
+ "$ref": "#/components/responses/BadRequest"
41141
+ },
41142
+ "403": {
41143
+ "$ref": "#/components/responses/Forbidden"
41144
+ }
41145
+ }
41146
+ }
41147
+ },
40752
41148
  "/v1/ap/netsuite/runs": {
40753
41149
  "get": {
40754
41150
  "operationId": "listApNetSuiteRuns",
@@ -42198,6 +42594,10 @@
42198
42594
  "enabled": {
42199
42595
  "type": "boolean"
42200
42596
  },
42597
+ "standard": {
42598
+ "type": "boolean",
42599
+ "description": "A standard app: one the platform ships whole, added from the catalog and never drafted or published. It is switched on when added, switches on and off without a version, and has no runs."
42600
+ },
42201
42601
  "contract": {
42202
42602
  "type": "object",
42203
42603
  "nullable": true,
@@ -55692,7 +56092,8 @@
55692
56092
  "postcode_town",
55693
56093
  "address",
55694
56094
  "email",
55695
- "phone"
56095
+ "phone",
56096
+ "kind"
55696
56097
  ]
55697
56098
  }
55698
56099
  }
@@ -65517,6 +65918,44 @@
65517
65918
  "type": "object",
65518
65919
  "description": "Every key is optional; defaults read the Money Found bindings.",
65519
65920
  "properties": {
65921
+ "risk": {
65922
+ "type": "object",
65923
+ "description": "The risk matrix for this workspace, over the platform defaults (duplicate, already paid and bank changed: high; above contract, above PO, not received and payment rule: medium; the rest low; impact high from 10,000, medium from 1,000).",
65924
+ "properties": {
65925
+ "likelihood": {
65926
+ "type": "object",
65927
+ "description": "Per hold reason: high, medium or low.",
65928
+ "additionalProperties": {
65929
+ "type": "string",
65930
+ "enum": [
65931
+ "high",
65932
+ "medium",
65933
+ "low"
65934
+ ]
65935
+ }
65936
+ },
65937
+ "impact": {
65938
+ "type": "object",
65939
+ "description": "Both thresholds or neither.",
65940
+ "required": [
65941
+ "high",
65942
+ "medium"
65943
+ ],
65944
+ "properties": {
65945
+ "high": {
65946
+ "type": "number",
65947
+ "minimum": 0,
65948
+ "description": "Amount at stake (ledger currency) from which the impact is high."
65949
+ },
65950
+ "medium": {
65951
+ "type": "number",
65952
+ "minimum": 0,
65953
+ "description": "From which it is medium; not above `high`."
65954
+ }
65955
+ }
65956
+ }
65957
+ }
65958
+ },
65520
65959
  "bill_sources": {
65521
65960
  "type": "array",
65522
65961
  "description": "Where bills come from; default is the `ap_invoices` role without purchase orders.",
@@ -65725,7 +66164,14 @@
65725
66164
  "above_contract",
65726
66165
  "duplicate",
65727
66166
  "missing_po",
65728
- "vendor_unknown"
66167
+ "vendor_unknown",
66168
+ "sums_mismatch",
66169
+ "not_received",
66170
+ "above_po",
66171
+ "bank_changed",
66172
+ "already_paid",
66173
+ "date_check",
66174
+ "policy_rule"
65729
66175
  ]
65730
66176
  },
65731
66177
  "label": {
@@ -65734,7 +66180,7 @@
65734
66180
  },
65735
66181
  "amount": {
65736
66182
  "type": "number",
65737
- "description": "Dollars at stake in the ledger currency."
66183
+ "description": "Dollars at stake in the ledger currency; 0 for a failed payment rule (`policy_rule`), which holds the bill for review without putting its money at stake."
65738
66184
  },
65739
66185
  "explanation": {
65740
66186
  "type": "string"
@@ -65767,9 +66213,136 @@
65767
66213
  }
65768
66214
  }
65769
66215
  },
66216
+ "ApRisk": {
66217
+ "type": "object",
66218
+ "description": "A held bill's risk from the risk matrix: how likely its kind of hold loses money (likelihood) against the money at stake (impact). Likelihood high × impact high or medium, or medium × high, is high; high × low, medium × medium and low × high are medium; the rest low. A bill held for several reasons takes its highest cell. Set per workspace in the AP configuration's `risk`.",
66219
+ "properties": {
66220
+ "level": {
66221
+ "type": "string",
66222
+ "enum": [
66223
+ "high",
66224
+ "medium",
66225
+ "low"
66226
+ ]
66227
+ },
66228
+ "likelihood": {
66229
+ "type": "string",
66230
+ "enum": [
66231
+ "high",
66232
+ "medium",
66233
+ "low"
66234
+ ]
66235
+ },
66236
+ "impact": {
66237
+ "type": "string",
66238
+ "enum": [
66239
+ "high",
66240
+ "medium",
66241
+ "low"
66242
+ ],
66243
+ "nullable": true,
66244
+ "description": "Null when the bill could not be converted to the ledger currency; the level is then the likelihood."
66245
+ },
66246
+ "reason": {
66247
+ "type": "string",
66248
+ "enum": [
66249
+ "above_contract",
66250
+ "duplicate",
66251
+ "missing_po",
66252
+ "vendor_unknown",
66253
+ "sums_mismatch",
66254
+ "not_received",
66255
+ "above_po",
66256
+ "bank_changed",
66257
+ "already_paid",
66258
+ "date_check",
66259
+ "policy_rule"
66260
+ ],
66261
+ "description": "The kind of hold that decides the risk."
66262
+ },
66263
+ "amount": {
66264
+ "type": "number",
66265
+ "nullable": true,
66266
+ "description": "Dollars of that hold in the ledger currency, never more than the bill (the bill's open amount when the hold carries none); null when not converted."
66267
+ }
66268
+ }
66269
+ },
66270
+ "ApRiskSettings": {
66271
+ "type": "object",
66272
+ "properties": {
66273
+ "likelihood": {
66274
+ "type": "object",
66275
+ "description": "Per hold reason: high, medium or low.",
66276
+ "additionalProperties": {
66277
+ "type": "string",
66278
+ "enum": [
66279
+ "high",
66280
+ "medium",
66281
+ "low"
66282
+ ]
66283
+ }
66284
+ },
66285
+ "impact": {
66286
+ "type": "object",
66287
+ "required": [
66288
+ "high",
66289
+ "medium"
66290
+ ],
66291
+ "properties": {
66292
+ "high": {
66293
+ "type": "number",
66294
+ "minimum": 0
66295
+ },
66296
+ "medium": {
66297
+ "type": "number",
66298
+ "minimum": 0
66299
+ }
66300
+ }
66301
+ }
66302
+ }
66303
+ },
66304
+ "ApRiskMatrix": {
66305
+ "type": "object",
66306
+ "properties": {
66307
+ "currency": {
66308
+ "type": "string",
66309
+ "description": "The ledger currency the impact amounts are in."
66310
+ },
66311
+ "defaults": {
66312
+ "$ref": "#/components/schemas/ApRiskSettings"
66313
+ },
66314
+ "overrides": {
66315
+ "allOf": [
66316
+ {
66317
+ "$ref": "#/components/schemas/ApRiskSettings"
66318
+ }
66319
+ ],
66320
+ "nullable": true,
66321
+ "description": "What this workspace changed; null when it uses the defaults."
66322
+ },
66323
+ "settings": {
66324
+ "$ref": "#/components/schemas/ApRiskSettings"
66325
+ },
66326
+ "matrix": {
66327
+ "type": "object",
66328
+ "description": "Likelihood (key) to impact (key) to risk.",
66329
+ "additionalProperties": {
66330
+ "type": "object",
66331
+ "additionalProperties": {
66332
+ "type": "string",
66333
+ "enum": [
66334
+ "high",
66335
+ "medium",
66336
+ "low"
66337
+ ]
66338
+ }
66339
+ }
66340
+ }
66341
+ }
66342
+ },
65770
66343
  "ApNote": {
65771
66344
  "type": "object",
65772
- "description": "A finding on the bill that does not hold it (estimated exposure, a discount to take).",
66345
+ "description": "A finding on the bill that does not hold it (estimated exposure, a discount to take). A payment rule the check could not settle has `lever_id: policy_rule`, the rule (code and text) as `label` and the reason as `explanation`.",
65773
66346
  "properties": {
65774
66347
  "label": {
65775
66348
  "type": "string"
@@ -65786,6 +66359,13 @@
65786
66359
  },
65787
66360
  "lever_id": {
65788
66361
  "type": "string"
66362
+ },
66363
+ "evidence": {
66364
+ "type": "array",
66365
+ "description": "Where the finding comes from, when it has a document: for a payment rule, the rule file opened at the rule's words (`field: policy_rule`).",
66366
+ "items": {
66367
+ "$ref": "#/components/schemas/ApEvidence"
66368
+ }
65789
66369
  }
65790
66370
  }
65791
66371
  },
@@ -65853,6 +66433,15 @@
65853
66433
  "key": {
65854
66434
  "type": "string"
65855
66435
  },
66436
+ "risk": {
66437
+ "allOf": [
66438
+ {
66439
+ "$ref": "#/components/schemas/ApRisk"
66440
+ }
66441
+ ],
66442
+ "nullable": true,
66443
+ "description": "A held bill's risk; null when it is not held."
66444
+ },
65856
66445
  "document_id": {
65857
66446
  "type": "string",
65858
66447
  "format": "uuid",
@@ -65950,8 +66539,11 @@
65950
66539
  "type": "string",
65951
66540
  "enum": [
65952
66541
  "ready",
66542
+ "needs_info",
66543
+ "evaluating",
65953
66544
  "held"
65954
- ]
66545
+ ],
66546
+ "description": "held: a hold found a problem; evaluating: no hold yet, the contract price check is still running; needs_info: something a definitive call needs is missing; ready: none of these."
65955
66547
  },
65956
66548
  "holds": {
65957
66549
  "type": "array",
@@ -66064,6 +66656,14 @@
66064
66656
  "type": "number",
66065
66657
  "description": "Dollars the holds put at stake, never more than the bill."
66066
66658
  },
66659
+ "risk": {
66660
+ "allOf": [
66661
+ {
66662
+ "$ref": "#/components/schemas/ApRisk"
66663
+ }
66664
+ ],
66665
+ "nullable": true
66666
+ },
66067
66667
  "holds": {
66068
66668
  "type": "array",
66069
66669
  "items": {
@@ -66075,7 +66675,14 @@
66075
66675
  "above_contract",
66076
66676
  "duplicate",
66077
66677
  "missing_po",
66078
- "vendor_unknown"
66678
+ "vendor_unknown",
66679
+ "sums_mismatch",
66680
+ "not_received",
66681
+ "above_po",
66682
+ "bank_changed",
66683
+ "already_paid",
66684
+ "date_check",
66685
+ "policy_rule"
66079
66686
  ]
66080
66687
  },
66081
66688
  "label": {
@@ -66291,6 +66898,29 @@
66291
66898
  }
66292
66899
  }
66293
66900
  },
66901
+ "needs_info": {
66902
+ "type": "object",
66903
+ "properties": {
66904
+ "count": {
66905
+ "type": "integer"
66906
+ },
66907
+ "amount": {
66908
+ "type": "number"
66909
+ }
66910
+ }
66911
+ },
66912
+ "evaluating": {
66913
+ "type": "object",
66914
+ "description": "Bills the contract price check has not finished with (no hold yet).",
66915
+ "properties": {
66916
+ "count": {
66917
+ "type": "integer"
66918
+ },
66919
+ "amount": {
66920
+ "type": "number"
66921
+ }
66922
+ }
66923
+ },
66294
66924
  "held": {
66295
66925
  "type": "object",
66296
66926
  "properties": {
@@ -66338,6 +66968,43 @@
66338
66968
  "type": "number"
66339
66969
  }
66340
66970
  }
66971
+ },
66972
+ "by_reason": {
66973
+ "type": "object",
66974
+ "description": "Held bills and dollars at stake per hold reason (every reason, zero when none).",
66975
+ "additionalProperties": {
66976
+ "type": "object",
66977
+ "properties": {
66978
+ "count": {
66979
+ "type": "integer"
66980
+ },
66981
+ "amount": {
66982
+ "type": "number"
66983
+ }
66984
+ }
66985
+ }
66986
+ },
66987
+ "with_stake": {
66988
+ "type": "integer",
66989
+ "description": "Held bills with dollars at stake (a bill held only by a failed payment rule has none)."
66990
+ },
66991
+ "by_risk": {
66992
+ "type": "object",
66993
+ "description": "Held bills and their dollars (ledger currency) per risk: high, medium, low; a held bill without a risk counts medium. `unconverted` of them have no ledger amount.",
66994
+ "additionalProperties": {
66995
+ "type": "object",
66996
+ "properties": {
66997
+ "count": {
66998
+ "type": "integer"
66999
+ },
67000
+ "amount": {
67001
+ "type": "number"
67002
+ },
67003
+ "unconverted": {
67004
+ "type": "integer"
67005
+ }
67006
+ }
67007
+ }
66341
67008
  }
66342
67009
  }
66343
67010
  },