@addresszen/openapi 3.5.1 → 3.6.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.ts CHANGED
@@ -8,7 +8,7 @@ export interface paths {
8
8
  /**
9
9
  * Returns the complete list of addresses for a postcode. Postcode searches are space and case insensitive.
10
10
  *
11
- * The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Postcode Lookup driven address searches, like [Postcode Lookup](/postcode-lookup).
11
+ * The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Address Lookup driven address searches, like [Address Lookup](/docs/address-lookup/).
12
12
  *
13
13
  * ## Postcode Not Found
14
14
  *
@@ -381,6 +381,24 @@ export interface paths {
381
381
  /** Query for and validate phone numbers. */
382
382
  get: operations["PhoneNumberValidation"];
383
383
  };
384
+ "/sign_up": {
385
+ /**
386
+ * Mints a one-shot `cli_token` and returns a prefilled accounts web URL where the user completes captcha + Terms of Service and Devise account creation. The CLI then polls `GET /sign_up/{cli_token}` until the api receives the user record (via the existing Rails → api admin propagation) along with the first API key, at which point credentials are returned exactly once.
387
+ *
388
+ * The api does **not** persist the `cli_token` at mint time — the token only becomes known to the api once Rails propagates the new user. The CLI is therefore responsible for its own polling deadline; if the user never completes signup, the api has no record of this token and `GET /sign_up/{cli_token}` will keep returning `202 Accepted` indefinitely.
389
+ */
390
+ post: operations["SignUpMintToken"];
391
+ };
392
+ "/sign_up/{cli_token}": {
393
+ /**
394
+ * Polls the status of a previously minted `cli_token`. The CLI calls this endpoint repeatedly after directing the user to the `signup_url` returned by `POST /sign_up`.
395
+ *
396
+ * - `202 Accepted` — Rails has not propagated the user to the api yet, or has propagated the user but not minted the first API key. Keep polling. **Note:** the api does not record the `cli_token` at mint time, so a `202` is also what an unknown / never-propagated token returns. The CLI must impose its own polling deadline.
397
+ * - `200 OK` — User and first API key exist. Credentials are returned exactly once; subsequent polls return `410 Gone`.
398
+ * - `410 Gone` — Token has expired (per the `cli_token_expires_at` set by Rails on the User record) or has already been claimed.
399
+ */
400
+ get: operations["SignUpClaim"];
401
+ };
384
402
  }
385
403
 
386
404
  export interface components {
@@ -389,6 +407,7 @@ export interface components {
389
407
  ecad: components["schemas"]["EcadAddress"];
390
408
  geonames: components["schemas"]["GeonamesPlace"];
391
409
  here: components["schemas"]["HereAddress"];
410
+ gilp: components["schemas"]["GilpGroundStability"];
392
411
  /**
393
412
  * ID
394
413
  * @description Global unique internally generated identifier for an address
@@ -564,13 +583,13 @@ export interface components {
564
583
  paf_pobox: string;
565
584
  /**
566
585
  * Department Name
567
- * @description Used to supplment Organisation Name to identify a deparment within the organisation.
586
+ * @description Used to supplement Organisation Name to identify a department within the organisation.
568
587
  * @example
569
588
  */
570
589
  paf_department_name: string;
571
590
  /**
572
591
  * Organisation Name
573
- * @description Used to supplment Organisation Name to identify a deparment within the organisation
592
+ * @description Name of the business or organisation receiving mail at this delivery point
574
593
  * @example Prime Minister & First Lord Of The Treasury
575
594
  */
576
595
  paf_organisation_name: string;
@@ -1102,6 +1121,839 @@ export interface components {
1102
1121
  country?: "England" | "Scotland" | "Wales";
1103
1122
  native: components["schemas"]["AddressBaseCore"];
1104
1123
  };
1124
+ /**
1125
+ * AddressBase Premium
1126
+ * @description A flat, consolidated row from the `abp.addresses` materialised view of
1127
+ * Ordnance Survey's AddressBase Premium dataset.
1128
+ *
1129
+ * Each row joins the BLPU spine (one per UPRN) to the Royal Mail Delivery
1130
+ * Point Address (DPA), plus the current Classification and Organisation
1131
+ * records (where `end_date IS NULL`), the English-preferred LPI, its Street
1132
+ * and Street Descriptor, and pivoted Application Cross References.
1133
+ *
1134
+ * Cardinality is one row per Royal Mail delivery point (UDPRN) for postal
1135
+ * UPRNs; non-postal UPRNs (in BLPU but with no Royal Mail delivery point -
1136
+ * utility infrastructure, commercial-only sites, etc.) get a single row with
1137
+ * `udprn` and the DPA columns NULL. Fallbacks for non-postal UPRNs: `postcode`
1138
+ * falls back to BLPU's `postcode_locator`; `organisation_name` falls back to
1139
+ * the Organisation record's `organisation`. The unique key is the composite
1140
+ * `(uprn, udprn)`.
1141
+ *
1142
+ * Audit-date columns are prefixed with their source table name
1143
+ * (`blpu_*`, `dpa_*`, `lpi_*`, `street_*`, `sd_*`, etc.) to avoid clashes.
1144
+ *
1145
+ * @example {
1146
+ * "uprn": "49020496",
1147
+ * "parent_uprn": "49020495",
1148
+ * "logical_status": 1,
1149
+ * "blpu_state": "2",
1150
+ * "blpu_state_date": "2011-10-06T00:00:00.000Z",
1151
+ * "country": "W",
1152
+ * "latitude": 52.4121999,
1153
+ * "longitude": -4.0883772,
1154
+ * "x_coordinate": 258053.87,
1155
+ * "y_coordinate": 281405.95,
1156
+ * "rpc": 2,
1157
+ * "local_custodian_code": 6820,
1158
+ * "addressbase_postal": "D",
1159
+ * "postcode_locator": "SY23 1JT",
1160
+ * "multi_occ_count": 4,
1161
+ * "blpu_start_date": "2007-10-24T00:00:00.000Z",
1162
+ * "blpu_end_date": null,
1163
+ * "blpu_last_update_date": "2025-10-13T00:00:00.000Z",
1164
+ * "blpu_entry_date": "2006-11-24T00:00:00.000Z",
1165
+ * "udprn": "24255522",
1166
+ * "organisation_name": null,
1167
+ * "legal_name": null,
1168
+ * "department_name": null,
1169
+ * "sub_building_name": null,
1170
+ * "building_name": null,
1171
+ * "building_number": 1,
1172
+ * "dependent_thoroughfare": "CASTLE TERRACE",
1173
+ * "thoroughfare": "SOUTH ROAD",
1174
+ * "double_dependent_locality": null,
1175
+ * "dependent_locality": null,
1176
+ * "post_town": "ABERYSTWYTH",
1177
+ * "postcode": "SY23 1JT",
1178
+ * "postcode_type": "S",
1179
+ * "delivery_point_suffix": "1A",
1180
+ * "po_box_number": null,
1181
+ * "welsh_dependent_thoroughfare": "HEOL Y CASTELL",
1182
+ * "welsh_thoroughfare": "TAN Y CAE",
1183
+ * "welsh_double_dependent_locality": null,
1184
+ * "welsh_dependent_locality": null,
1185
+ * "welsh_post_town": "ABERYSTWYTH",
1186
+ * "dpa_process_date": "2016-01-18T00:00:00.000Z",
1187
+ * "dpa_start_date": "2012-04-23T00:00:00.000Z",
1188
+ * "dpa_end_date": null,
1189
+ * "dpa_last_update_date": "2016-02-10T00:00:00.000Z",
1190
+ * "dpa_entry_date": "2012-03-19T00:00:00.000Z",
1191
+ * "classification_code": "RD04",
1192
+ * "class_scheme": "AddressBase Premium Classification Scheme",
1193
+ * "scheme_version": 1,
1194
+ * "classification_start_date": "2007-10-24T00:00:00.000Z",
1195
+ * "classification_end_date": null,
1196
+ * "classification_last_update_date": "2018-09-23T00:00:00.000Z",
1197
+ * "classification_entry_date": "2006-11-24T00:00:00.000Z",
1198
+ * "organisation_start_date": null,
1199
+ * "organisation_end_date": null,
1200
+ * "organisation_last_update_date": null,
1201
+ * "organisation_entry_date": null,
1202
+ * "lpi_key": "6820L000054880",
1203
+ * "lpi_language": "CYM",
1204
+ * "lpi_logical_status": 1,
1205
+ * "lpi_start_date": "2007-10-24T00:00:00.000Z",
1206
+ * "lpi_end_date": null,
1207
+ * "lpi_last_update_date": "2025-09-26T00:00:00.000Z",
1208
+ * "lpi_entry_date": "2007-09-04T00:00:00.000Z",
1209
+ * "sao_start_number": null,
1210
+ * "sao_start_suffix": null,
1211
+ * "sao_end_number": null,
1212
+ * "sao_end_suffix": null,
1213
+ * "sao_text": null,
1214
+ * "pao_start_number": 1,
1215
+ * "pao_start_suffix": null,
1216
+ * "pao_end_number": null,
1217
+ * "pao_end_suffix": null,
1218
+ * "pao_text": "HEOL Y CASTELL",
1219
+ * "usrn": "47114724",
1220
+ * "usrn_match_indicator": "1",
1221
+ * "area_name": null,
1222
+ * "level": null,
1223
+ * "official_flag": "Y",
1224
+ * "street_record_type": 1,
1225
+ * "swa_org_ref_naming": 6820,
1226
+ * "street_state": "2",
1227
+ * "street_state_date": "1990-01-01T00:00:00.000Z",
1228
+ * "street_surface": "1",
1229
+ * "street_classification": null,
1230
+ * "street_start_date": "2007-10-24T00:00:00.000Z",
1231
+ * "street_last_update_date": "2022-01-14T00:00:00.000Z",
1232
+ * "street_record_entry_date": "1998-07-14T00:00:00.000Z",
1233
+ * "street_start_x": 257968,
1234
+ * "street_start_y": 281400,
1235
+ * "street_start_lat": 52.4121241,
1236
+ * "street_start_long": -4.0896363,
1237
+ * "street_end_x": 258266,
1238
+ * "street_end_y": 281393,
1239
+ * "street_end_lat": 52.4121386,
1240
+ * "street_end_long": -4.0852551,
1241
+ * "street_tolerance": 10,
1242
+ * "street_description": "SOUTH ROAD",
1243
+ * "street_locality": null,
1244
+ * "street_town": "ABERYSTWYTH",
1245
+ * "adminstrative_area": "CEREDIGION",
1246
+ * "sd_language": "ENG",
1247
+ * "sd_start_date": "2007-10-24T00:00:00.000Z",
1248
+ * "sd_end_date": null,
1249
+ * "sd_last_update_date": "2016-02-06T00:00:00.000Z",
1250
+ * "sd_entry_date": "1998-07-14T00:00:00.000Z",
1251
+ * "toid": "osgb1000020592167",
1252
+ * "toid_address": "osgb1000002175099422",
1253
+ * "toid_highways": "osgb5000005181786114",
1254
+ * "council_tax_ref": null,
1255
+ * "ndr_ref": null,
1256
+ * "ons_ward_code": "W05001302",
1257
+ * "ons_parish_code": "W04000359"
1258
+ * }
1259
+ */
1260
+ AddressBasePremium: {
1261
+ /**
1262
+ * Unique Property Reference Number
1263
+ * @description Unique Property Reference Number - a persistent identifier for a Basic
1264
+ * Land and Property Unit (BLPU). Up to 12 digits. Primary key for the
1265
+ * BLPU spine. Carried as a string to preserve precision (12-digit values
1266
+ * can exceed Number.MAX_SAFE_INTEGER).
1267
+ */
1268
+ uprn: string;
1269
+ /**
1270
+ * Parent UPRN
1271
+ * @description UPRN of the parent record where a parent-child relationship exists
1272
+ * (flats sharing a building entrance, sub-units of a parent property).
1273
+ */
1274
+ parent_uprn?: string | null;
1275
+ /**
1276
+ * Logical Status Code
1277
+ * @description Logical lifecycle status of the BLPU. `1` Approved, `6` Provisional,
1278
+ * `8` Historical. BLPU records do not take value `3` (alternative).
1279
+ */
1280
+ logical_status: number;
1281
+ /**
1282
+ * BLPU State Code
1283
+ * @description Physical state of the BLPU. `1` Under construction, `2` In use,
1284
+ * `3` Unoccupied / vacant / derelict, `4` No longer existing,
1285
+ * `6` Planning permission granted.
1286
+ */
1287
+ blpu_state?: string | null;
1288
+ /**
1289
+ * BLPU State Date
1290
+ * Format: date-time
1291
+ * @description Date the BLPU achieved its current state.
1292
+ */
1293
+ blpu_state_date?: string | null;
1294
+ /**
1295
+ * Country Code
1296
+ * @description Country containing the BLPU, determined by intersection with OS
1297
+ * Boundary-Line. `E` England, `W` Wales, `S` Scotland, `N` Northern
1298
+ * Ireland, `L` Channel Islands, `M` Isle of Man, `J` not assigned to a
1299
+ * country.
1300
+ */
1301
+ country: string;
1302
+ /**
1303
+ * Latitude (ETRS89)
1304
+ * Format: double
1305
+ * @description Latitude coordinate in the ETRS89 coordinate reference system.
1306
+ */
1307
+ latitude: number;
1308
+ /**
1309
+ * Longitude (ETRS89)
1310
+ * Format: double
1311
+ * @description Longitude coordinate in the ETRS89 coordinate reference system.
1312
+ */
1313
+ longitude: number;
1314
+ /**
1315
+ * Eastings (OSGB36 British National Grid)
1316
+ * Format: double
1317
+ * @description X location in metres on the OSGB36 British National Grid
1318
+ * (precision 8, scale 2).
1319
+ */
1320
+ x_coordinate: number;
1321
+ /**
1322
+ * Northings (OSGB36 British National Grid)
1323
+ * Format: double
1324
+ * @description Y location in metres on the OSGB36 British National Grid
1325
+ * (precision 9, scale 2).
1326
+ */
1327
+ y_coordinate: number;
1328
+ /**
1329
+ * Representative Point Code
1330
+ * @description Representative Point Code - reliability of the BLPU's coordinate, as
1331
+ * assessed by the local authority custodian. `1` Central internal,
1332
+ * `2` General internal, `3` Transitional, `4` Street location,
1333
+ * `5` Postcode unit, `9` Low accuracy.
1334
+ */
1335
+ rpc?: number | null;
1336
+ /**
1337
+ * Local Custodian Code
1338
+ * @description 4-digit identifier of the Local Authority responsible for maintaining
1339
+ * the record.
1340
+ */
1341
+ local_custodian_code: number;
1342
+ /**
1343
+ * AddressBase Postal Code
1344
+ * @description Whether the address can receive mail per AddressBase rules. `D` linked
1345
+ * to PAF, `N` not a postal address, `C` postal with a PAF-linked parent,
1346
+ * `L` postal based on Local Authority information.
1347
+ */
1348
+ addressbase_postal: string;
1349
+ /**
1350
+ * Postcode Locator
1351
+ * @description Royal Mail PAF postcode, locally assigned by the custodian, or
1352
+ * spatially derived where no PAF match exists. Up to 8 characters.
1353
+ */
1354
+ postcode_locator: string;
1355
+ /**
1356
+ * Multi-occupancy Count
1357
+ * @description Count of child UPRNs for this record where parent-child relationships
1358
+ * exist.
1359
+ */
1360
+ multi_occ_count: number;
1361
+ /**
1362
+ * BLPU Start Date
1363
+ * Format: date-time
1364
+ * @description Date the address record was inserted into the database.
1365
+ */
1366
+ blpu_start_date?: string | null;
1367
+ /**
1368
+ * BLPU End Date
1369
+ * Format: date-time
1370
+ * @description Date the address record was closed in the database.
1371
+ */
1372
+ blpu_end_date?: string | null;
1373
+ /**
1374
+ * BLPU Last Update Date
1375
+ * Format: date-time
1376
+ * @description Date of the most recent attribute change on the BLPU record.
1377
+ */
1378
+ blpu_last_update_date?: string | null;
1379
+ /**
1380
+ * BLPU Entry Date
1381
+ * Format: date-time
1382
+ * @description Date the record was inserted into the Local Authority database.
1383
+ */
1384
+ blpu_entry_date?: string | null;
1385
+ /**
1386
+ * Unique Delivery Point Reference Number
1387
+ * @description Royal Mail's Unique Delivery Point Reference Number - primary key for
1388
+ * the Delivery Point Address (DPA) record. Up to 8 digits. NULL for
1389
+ * non-postal UPRNs.
1390
+ */
1391
+ udprn?: string | null;
1392
+ /**
1393
+ * Organisation Name
1394
+ * @description Royal Mail-recognised organisation name from DPA, falling back to the
1395
+ * AddressBase Organisation record's `organisation` when DPA is absent.
1396
+ */
1397
+ organisation_name?: string | null;
1398
+ /**
1399
+ * Legal Name
1400
+ * @description Registered legal name from the AddressBase Organisation record.
1401
+ */
1402
+ legal_name?: string | null;
1403
+ /**
1404
+ * Department Name
1405
+ * @description Subdivision of an organisation that receives mail at a distinct
1406
+ * delivery point. Requires `organisation_name` to be present.
1407
+ */
1408
+ department_name?: string | null;
1409
+ /**
1410
+ * Sub-building Name
1411
+ * @description Property subdivision identifier (e.g. flat number). Requires
1412
+ * `building_name` or `building_number`.
1413
+ */
1414
+ sub_building_name?: string | null;
1415
+ /**
1416
+ * Building Name
1417
+ * @description Descriptive name applied to a single building or small group of
1418
+ * buildings.
1419
+ */
1420
+ building_name?: string | null;
1421
+ /**
1422
+ * Building Number
1423
+ * @description Numeric identifier for a single building or small group of buildings.
1424
+ * Complex number formats (e.g. "12A") go in `building_name` or
1425
+ * `sub_building_name`.
1426
+ */
1427
+ building_number?: number | null;
1428
+ /**
1429
+ * Dependent Thoroughfare
1430
+ * @description Named thoroughfare within another named thoroughfare. Requires
1431
+ * `thoroughfare` to be present.
1432
+ */
1433
+ dependent_thoroughfare?: string | null;
1434
+ /**
1435
+ * Thoroughfare
1436
+ * @description Road, track or named access route with Royal Mail delivery points.
1437
+ */
1438
+ thoroughfare?: string | null;
1439
+ /**
1440
+ * Double Dependent Locality
1441
+ * @description Estate or area name used to distinguish similar thoroughfares within a
1442
+ * dependent locality. Requires `dependent_locality`.
1443
+ */
1444
+ double_dependent_locality?: string | null;
1445
+ /**
1446
+ * Dependent Locality
1447
+ * @description Subdivision of a post town to differentiate same-name thoroughfares.
1448
+ */
1449
+ dependent_locality?: string | null;
1450
+ /**
1451
+ * Post Town
1452
+ * @description Town or city of the Royal Mail sorting office serving this record.
1453
+ * Uppercased. NULL for non-postal UPRNs (no Royal Mail delivery point).
1454
+ */
1455
+ post_town?: string | null;
1456
+ /**
1457
+ * Postcode
1458
+ * @description Royal Mail postcode from DPA, falling back to BLPU's `postcode_locator`
1459
+ * when no Royal Mail delivery point exists. Uppercased, with single space
1460
+ * between outward and inward portions.
1461
+ */
1462
+ postcode: string;
1463
+ /**
1464
+ * Postcode Type Code
1465
+ * @description Royal Mail postal-user category. `S` Small user (e.g. a residential
1466
+ * property), `L` Large user (e.g. a large commercial company).
1467
+ */
1468
+ postcode_type?: string | null;
1469
+ /**
1470
+ * Delivery Point Suffix
1471
+ * @description Two-character code uniquely identifying an individual delivery point
1472
+ * within a postcode (Royal Mail DPS).
1473
+ */
1474
+ delivery_point_suffix?: string | null;
1475
+ /**
1476
+ * PO Box Number
1477
+ * @description Post Office Box number.
1478
+ */
1479
+ po_box_number?: string | null;
1480
+ /**
1481
+ * Welsh Dependent Thoroughfare
1482
+ * @description Welsh translation of `dependent_thoroughfare`. Requires `welsh_thoroughfare`.
1483
+ */
1484
+ welsh_dependent_thoroughfare?: string | null;
1485
+ /**
1486
+ * Welsh Thoroughfare
1487
+ * @description Welsh translation of `thoroughfare`.
1488
+ */
1489
+ welsh_thoroughfare?: string | null;
1490
+ /**
1491
+ * Welsh Double Dependent Locality
1492
+ * @description Welsh translation of `double_dependent_locality`. Requires `welsh_dependent_locality`.
1493
+ */
1494
+ welsh_double_dependent_locality?: string | null;
1495
+ /**
1496
+ * Welsh Dependent Locality
1497
+ * @description Welsh translation of `dependent_locality`.
1498
+ */
1499
+ welsh_dependent_locality?: string | null;
1500
+ /**
1501
+ * Welsh Post Town
1502
+ * @description Welsh translation of `post_town`.
1503
+ */
1504
+ welsh_post_town?: string | null;
1505
+ /**
1506
+ * DPA Process Date
1507
+ * Format: date-time
1508
+ * @description Date the PAF record was processed into the database.
1509
+ */
1510
+ dpa_process_date?: string | null;
1511
+ /**
1512
+ * DPA Start Date
1513
+ * Format: date-time
1514
+ * @description Date the address record was matched to the Delivery Point Address.
1515
+ */
1516
+ dpa_start_date?: string | null;
1517
+ /**
1518
+ * DPA End Date
1519
+ * Format: date-time
1520
+ * @description Date the PAF record no longer existed in the database.
1521
+ */
1522
+ dpa_end_date?: string | null;
1523
+ /**
1524
+ * DPA Last Update Date
1525
+ * Format: date-time
1526
+ * @description Date any attribute on the DPA record was last changed.
1527
+ */
1528
+ dpa_last_update_date?: string | null;
1529
+ /**
1530
+ * DPA Entry Date
1531
+ * Format: date-time
1532
+ * @description Date the PAF record was first loaded by GeoPlace.
1533
+ */
1534
+ dpa_entry_date?: string | null;
1535
+ /**
1536
+ * Classification Code
1537
+ * @description Current AddressBase classification code (e.g. `RD` residential,
1538
+ * `CR` commercial retail). Top-level categories: `R` Residential,
1539
+ * `C` Commercial, `L` Land, `M` Military, `O` Other, `P` Parent shell,
1540
+ * `U` Unclassified, `X` Dual use, `Z` Object of interest. NULL when no
1541
+ * current classification row exists for the UPRN.
1542
+ */
1543
+ classification_code?: string | null;
1544
+ /**
1545
+ * Classification Scheme
1546
+ * @description Name of the classification scheme applied to this record.
1547
+ */
1548
+ class_scheme?: string | null;
1549
+ /**
1550
+ * Classification Scheme Version
1551
+ * @description Version number of the classification scheme in use (e.g. `1.0`).
1552
+ */
1553
+ scheme_version?: number | null;
1554
+ /**
1555
+ * Classification Start Date
1556
+ * Format: date-time
1557
+ * @description Date the classification record was first loaded into the database.
1558
+ */
1559
+ classification_start_date?: string | null;
1560
+ /**
1561
+ * Classification End Date
1562
+ * Format: date-time
1563
+ * @description Date the classification record ceased to exist.
1564
+ */
1565
+ classification_end_date?: string | null;
1566
+ /**
1567
+ * Classification Last Update Date
1568
+ * Format: date-time
1569
+ * @description Date of the most recent attribute change on the classification record.
1570
+ */
1571
+ classification_last_update_date?: string | null;
1572
+ /**
1573
+ * Classification Entry Date
1574
+ * Format: date-time
1575
+ * @description Date the associated address record was inserted into the Local
1576
+ * Authority database.
1577
+ */
1578
+ classification_entry_date?: string | null;
1579
+ /**
1580
+ * Organisation Start Date
1581
+ * Format: date-time
1582
+ * @description Date the organisation record was initially loaded into the database.
1583
+ */
1584
+ organisation_start_date?: string | null;
1585
+ /**
1586
+ * Organisation End Date
1587
+ * Format: date-time
1588
+ * @description Date the organisation record ceased to exist.
1589
+ */
1590
+ organisation_end_date?: string | null;
1591
+ /**
1592
+ * Organisation Last Update Date
1593
+ * Format: date-time
1594
+ * @description Date of the most recent attribute change on the organisation record.
1595
+ */
1596
+ organisation_last_update_date?: string | null;
1597
+ /**
1598
+ * Organisation Entry Date
1599
+ * Format: date-time
1600
+ * @description Date the UPRN was entered into the Local Authority database.
1601
+ */
1602
+ organisation_entry_date?: string | null;
1603
+ /**
1604
+ * LPI Key
1605
+ * @description Unique identifier and primary key for the LPI record.
1606
+ */
1607
+ lpi_key?: string | null;
1608
+ /**
1609
+ * LPI Language Code
1610
+ * @description Language used for this LPI record. `ENG` English, `CYM` Welsh,
1611
+ * `GAE` Gaelic (Scottish), `BIL` Bilingual.
1612
+ */
1613
+ lpi_language?: string | null;
1614
+ /**
1615
+ * LPI Logical Status Code
1616
+ * @description Logical status of the LPI record. `1` Approved, `3` Alternative,
1617
+ * `6` Provisional, `8` Historical.
1618
+ */
1619
+ lpi_logical_status?: number | null;
1620
+ /**
1621
+ * LPI Start Date
1622
+ * Format: date-time
1623
+ * @description Date the LPI was first loaded into the database.
1624
+ */
1625
+ lpi_start_date?: string | null;
1626
+ /**
1627
+ * LPI End Date
1628
+ * Format: date-time
1629
+ * @description Date the LPI record ceased to exist.
1630
+ */
1631
+ lpi_end_date?: string | null;
1632
+ /**
1633
+ * LPI Last Update Date
1634
+ * Format: date-time
1635
+ * @description Date of the most recent attribute change on the LPI record.
1636
+ */
1637
+ lpi_last_update_date?: string | null;
1638
+ /**
1639
+ * LPI Entry Date
1640
+ * Format: date-time
1641
+ * @description Date the LPI record was inserted into the Local Authority database.
1642
+ */
1643
+ lpi_entry_date?: string | null;
1644
+ /**
1645
+ * SAO Start Number
1646
+ * @description Number of the Secondary Addressable Object, or range start. Requires
1647
+ * `pao_start_number` or `pao_text` to be present.
1648
+ */
1649
+ sao_start_number?: number | null;
1650
+ /**
1651
+ * SAO Start Suffix
1652
+ * @description Suffix appended to `sao_start_number`. Requires `sao_start_number`.
1653
+ */
1654
+ sao_start_suffix?: string | null;
1655
+ /**
1656
+ * SAO End Number
1657
+ * @description End number of the SAO range. Requires `sao_start_number`.
1658
+ */
1659
+ sao_end_number?: number | null;
1660
+ /**
1661
+ * SAO End Suffix
1662
+ * @description Suffix appended to `sao_end_number`. Requires `sao_end_number`.
1663
+ */
1664
+ sao_end_suffix?: string | null;
1665
+ /**
1666
+ * SAO Text
1667
+ * @description Building name or description for the Secondary Addressable Object
1668
+ * (e.g. "FLAT 1", "UNIT B"). Requires `pao_start_number` or `pao_text`.
1669
+ */
1670
+ sao_text?: string | null;
1671
+ /**
1672
+ * PAO Start Number
1673
+ * @description Number of the Primary Addressable Object, or range start. Mandatory if
1674
+ * `pao_text` is absent.
1675
+ */
1676
+ pao_start_number?: number | null;
1677
+ /**
1678
+ * PAO Start Suffix
1679
+ * @description Suffix appended to `pao_start_number`. Requires `pao_start_number`.
1680
+ */
1681
+ pao_start_suffix?: string | null;
1682
+ /**
1683
+ * PAO End Number
1684
+ * @description End number of the PAO range. Requires `pao_start_number`.
1685
+ */
1686
+ pao_end_number?: number | null;
1687
+ /**
1688
+ * PAO End Suffix
1689
+ * @description Suffix appended to `pao_end_number`. Requires `pao_end_number`.
1690
+ */
1691
+ pao_end_suffix?: string | null;
1692
+ /**
1693
+ * PAO Text
1694
+ * @description Building name or description for the Primary Addressable Object.
1695
+ * Mandatory if `pao_start_number` is absent.
1696
+ */
1697
+ pao_text?: string | null;
1698
+ /**
1699
+ * Unique Street Reference Number
1700
+ * @description Unique Street Reference Number linking this LPI to its Street record.
1701
+ * Up to 8 digits.
1702
+ */
1703
+ usrn?: string | null;
1704
+ /**
1705
+ * USRN Match Indicator Code
1706
+ * @description Confidence of the LPI to Street linkage. `1` Matched manually to the
1707
+ * nearest accessible Street, `2` Matched spatially to the nearest USRN.
1708
+ */
1709
+ usrn_match_indicator?: string | null;
1710
+ /**
1711
+ * Area Name
1712
+ * @description Third-level geographic area name such as island or property group.
1713
+ */
1714
+ area_name?: string | null;
1715
+ /**
1716
+ * Level
1717
+ * @description Vertical position of the property (e.g. "GROUND FLOOR").
1718
+ */
1719
+ level?: string | null;
1720
+ /**
1721
+ * Official Flag Code
1722
+ * @description Whether the LPI corresponds to an entry in the official Street Name and
1723
+ * Numbering register. `Y` Official address, `N` Unofficial address.
1724
+ */
1725
+ official_flag?: string | null;
1726
+ /**
1727
+ * Street Record Type Code
1728
+ * @description Description of the street record type. `1` Official designated Street
1729
+ * Name, `2` Street Description, `3` Numbered Street, `4` Unofficial
1730
+ * Street Description, `9` Description used for LLPG Access.
1731
+ */
1732
+ street_record_type?: number | null;
1733
+ /**
1734
+ * SWA Org Ref (Naming)
1735
+ * @description Code identifying the Street Naming and Numbering Authority or Local
1736
+ * Highway Authority (DfT-allocated).
1737
+ */
1738
+ swa_org_ref_naming?: number | null;
1739
+ /**
1740
+ * Street State Code
1741
+ * @description Current state of the street. `1` Under construction, `2` Open,
1742
+ * `4` Permanently closed.
1743
+ */
1744
+ street_state?: string | null;
1745
+ /**
1746
+ * Street State Date
1747
+ * Format: date-time
1748
+ * @description Date when the street achieved its current state.
1749
+ */
1750
+ street_state_date?: string | null;
1751
+ /**
1752
+ * Street Surface Code
1753
+ * @description Surface finish of the street. `1` Metalled, `2` Unmetalled, `3` Mixed.
1754
+ */
1755
+ street_surface?: string | null;
1756
+ /**
1757
+ * Street Classification Code
1758
+ * @description Primary classification of the street record. `4` Pedestrian way or
1759
+ * footpath, `6` Cycletrack or cycleway, `8` All vehicles, `9` Restricted
1760
+ * byway, `10` Bridleway.
1761
+ */
1762
+ street_classification?: string | null;
1763
+ /**
1764
+ * Street Start Date
1765
+ * Format: date-time
1766
+ * @description Date this street record or version was inserted into the database.
1767
+ */
1768
+ street_start_date?: string | null;
1769
+ /**
1770
+ * Street Last Update Date
1771
+ * Format: date-time
1772
+ * @description Date when any attribute of the street record was last changed.
1773
+ */
1774
+ street_last_update_date?: string | null;
1775
+ /**
1776
+ * Street Record Entry Date
1777
+ * Format: date-time
1778
+ * @description Date the street record was entered into the Local Authority database.
1779
+ */
1780
+ street_record_entry_date?: string | null;
1781
+ /**
1782
+ * Street Start Eastings
1783
+ * Format: double
1784
+ * @description X coordinate (BNG) for the street start point.
1785
+ */
1786
+ street_start_x?: number | null;
1787
+ /**
1788
+ * Street Start Northings
1789
+ * Format: double
1790
+ * @description Y coordinate (BNG) for the street start point.
1791
+ */
1792
+ street_start_y?: number | null;
1793
+ /**
1794
+ * Street Start Latitude
1795
+ * Format: double
1796
+ * @description Latitude (ETRS89) for the street start point.
1797
+ */
1798
+ street_start_lat?: number | null;
1799
+ /**
1800
+ * Street Start Longitude
1801
+ * Format: double
1802
+ * @description Longitude (ETRS89) for the street start point.
1803
+ */
1804
+ street_start_long?: number | null;
1805
+ /**
1806
+ * Street End Eastings
1807
+ * Format: double
1808
+ * @description X coordinate (BNG) for the street end point.
1809
+ */
1810
+ street_end_x?: number | null;
1811
+ /**
1812
+ * Street End Northings
1813
+ * Format: double
1814
+ * @description Y coordinate (BNG) for the street end point.
1815
+ */
1816
+ street_end_y?: number | null;
1817
+ /**
1818
+ * Street End Latitude
1819
+ * Format: double
1820
+ * @description Latitude (ETRS89) for the street end point.
1821
+ */
1822
+ street_end_lat?: number | null;
1823
+ /**
1824
+ * Street End Longitude
1825
+ * Format: double
1826
+ * @description Longitude (ETRS89) for the street end point.
1827
+ */
1828
+ street_end_long?: number | null;
1829
+ /**
1830
+ * Street Tolerance
1831
+ * @description Accuracy of street-coordinate data capture, in metres.
1832
+ */
1833
+ street_tolerance?: number | null;
1834
+ /**
1835
+ * Street Description
1836
+ * @description Street name, description or street number.
1837
+ */
1838
+ street_description?: string | null;
1839
+ /**
1840
+ * Street Locality
1841
+ * @description Geographical area within a town.
1842
+ */
1843
+ street_locality?: string | null;
1844
+ /**
1845
+ * Street Town
1846
+ * @description Name of the town. Required for Street Record Types `1` and `2`;
1847
+ * optional for types `3`, `4` and `9`.
1848
+ */
1849
+ street_town?: string | null;
1850
+ /**
1851
+ * Administrative Area
1852
+ * @description Local Highway Authority name (administrative area / county / unitary
1853
+ * authority). Field name spelling preserved verbatim from OS
1854
+ * (`ADMINSTRATIVE_AREA`).
1855
+ */
1856
+ adminstrative_area?: string | null;
1857
+ /**
1858
+ * Street Descriptor Language Code
1859
+ * @description Language of the street descriptor. `ENG` English, `CYM` Welsh,
1860
+ * `GAE` Gaelic (Scottish), `BIL` Bilingual.
1861
+ */
1862
+ sd_language?: string | null;
1863
+ /**
1864
+ * Street Descriptor Start Date
1865
+ * Format: date-time
1866
+ * @description Date the street descriptor record was first created in the database.
1867
+ */
1868
+ sd_start_date?: string | null;
1869
+ /**
1870
+ * Street Descriptor End Date
1871
+ * Format: date-time
1872
+ * @description Date the street descriptor record ceased to exist.
1873
+ */
1874
+ sd_end_date?: string | null;
1875
+ /**
1876
+ * Street Descriptor Last Update Date
1877
+ * Format: date-time
1878
+ * @description Date of the most recent attribute change on the street descriptor record.
1879
+ */
1880
+ sd_last_update_date?: string | null;
1881
+ /**
1882
+ * Street Descriptor Entry Date
1883
+ * Format: date-time
1884
+ * @description Date the street descriptor record was entered into the Local Authority
1885
+ * database.
1886
+ */
1887
+ sd_entry_date?: string | null;
1888
+ /**
1889
+ * TOID (Topography)
1890
+ * @description OS MasterMap Topography Layer TOID (cross-reference source `7666MT`)
1891
+ * linked to the UPRN.
1892
+ */
1893
+ toid?: string | null;
1894
+ /**
1895
+ * TOID (Address Layer)
1896
+ * @description OS MasterMap Address Layer 2 TOID (cross-reference source `7666MA`)
1897
+ * linked to the UPRN.
1898
+ */
1899
+ toid_address?: string | null;
1900
+ /**
1901
+ * TOID (Highways)
1902
+ * @description OS MasterMap Highways TOID (cross-reference source `7666MI`) linked to
1903
+ * the UPRN.
1904
+ */
1905
+ toid_highways?: string | null;
1906
+ /**
1907
+ * Council Tax Reference
1908
+ * @description Centrally created Valuation Office Agency council tax reference
1909
+ * (cross-reference source `7666VC`) linked to the UPRN.
1910
+ */
1911
+ council_tax_ref?: string | null;
1912
+ /**
1913
+ * Non-Domestic Rates Reference
1914
+ * @description Centrally created Valuation Office Agency non-domestic rates reference
1915
+ * (cross-reference source `7666VN`) linked to the UPRN.
1916
+ */
1917
+ ndr_ref?: string | null;
1918
+ /**
1919
+ * ONS Ward Code
1920
+ * @description Office for National Statistics ward code (cross-reference source
1921
+ * `7666OW`) linked to the UPRN.
1922
+ */
1923
+ ons_ward_code?: string | null;
1924
+ /**
1925
+ * ONS Parish Code
1926
+ * @description Office for National Statistics parish code (cross-reference source
1927
+ * `7666OP`) linked to the UPRN.
1928
+ */
1929
+ ons_parish_code?: string | null;
1930
+ };
1931
+ /**
1932
+ * AddressBase Premium
1933
+ * @description Address from Ordnance Survey AddressBase Premium dataset.
1934
+ *
1935
+ * Please contact us to have this enabled on your account.
1936
+ *
1937
+ * All AddressBase Premium addresses have a UPRN and a rooftop geolocation available however they may not have a UDPRN.
1938
+ */
1939
+ AbpAddress: components["schemas"]["PafBase"] & {
1940
+ /** @enum {undefined} */
1941
+ country_iso?: "GBR";
1942
+ /** @enum {string} */
1943
+ dataset?: "abp";
1944
+ /** @enum {undefined} */
1945
+ country_iso_2?: "GB";
1946
+ /** @enum {undefined} */
1947
+ language?: "en";
1948
+ /**
1949
+ * Postcode Type
1950
+ * @enum {string}
1951
+ */
1952
+ postcode_type?: "";
1953
+ /** @enum {undefined} */
1954
+ country?: "England" | "Scotland" | "Wales" | "Northern Ireland";
1955
+ native: components["schemas"]["AddressBasePremium"];
1956
+ };
1105
1957
  /**
1106
1958
  * Dataset
1107
1959
  * @description Indicates the provenance of an address.
@@ -1113,6 +1965,7 @@ export interface components {
1113
1965
  * - `pafa` (GBR) Alias File
1114
1966
  * - `pafw` (GBR) Welsh File
1115
1967
  * - `ab` (GBR) AddressBase Core
1968
+ * - `abp` (GBR) AddressBase Premium
1116
1969
  * - `ecaf` (IRL) Eircode ECAF
1117
1970
  * - `ecad` (IRL) Eircode ECAD
1118
1971
  * - `herewe` (Western Europe) Western Europe Dataset
@@ -1147,6 +2000,7 @@ export interface components {
1147
2000
  | "ecaf"
1148
2001
  | "ecad"
1149
2002
  | "ab"
2003
+ | "abp"
1150
2004
  | "herewe"
1151
2005
  | "heret"
1152
2006
  | "heresa"
@@ -1234,7 +2088,6 @@ export interface components {
1234
2088
  | "HUN"
1235
2089
  | "KAZ"
1236
2090
  | "KGZ"
1237
- | "KOS"
1238
2091
  | "LTU"
1239
2092
  | "LVA"
1240
2093
  | "MDA"
@@ -1249,6 +2102,7 @@ export interface components {
1249
2102
  | "TUR"
1250
2103
  | "UKR"
1251
2104
  | "UZB"
2105
+ | "XKX"
1252
2106
  | "HKG"
1253
2107
  | "BGD"
1254
2108
  | "IND"
@@ -2141,7 +2995,7 @@ export interface components {
2141
2995
  * @description Post County ID
2142
2996
  * @example 10098783
2143
2997
  */
2144
- post_county_id?: string;
2998
+ post_county_id?: string | null;
2145
2999
  /**
2146
3000
  * @description NUA means "non-unique address".
2147
3001
  *
@@ -6141,6 +6995,7 @@ export interface components {
6141
6995
  | components["schemas"]["PafAliasAddress"]
6142
6996
  | components["schemas"]["WelshPafAddress"]
6143
6997
  | components["schemas"]["AbAddress"]
6998
+ | components["schemas"]["AbpAddress"]
6144
6999
  | components["schemas"]["GbrGlobalAddress"]
6145
7000
  )[];
6146
7001
  /** @enum {integer} */
@@ -6493,6 +7348,11 @@ export interface components {
6493
7348
  * @example false
6494
7349
  */
6495
7350
  ab: boolean;
7351
+ /**
7352
+ * @description UK AddressBase Premium dataset
7353
+ * @example false
7354
+ */
7355
+ abp?: boolean;
6496
7356
  /**
6497
7357
  * @description Northern Ireland Pointer Dataset
6498
7358
  * @example false
@@ -6699,7 +7559,7 @@ export interface components {
6699
7559
  /** @description Current balance purchases attached to key. */
6700
7560
  current_purchases: components["schemas"]["ApiKeyCurrentPurchase"][];
6701
7561
  /**
6702
- * @description Accept IP addresses forwarded in the `IDPC-Source-IP` header
7562
+ * @description Accept IP addresses forwarded in the `AZ-Source-IP` header
6703
7563
  * @default false
6704
7564
  */
6705
7565
  ip_forwarding: boolean;
@@ -6778,7 +7638,7 @@ export interface components {
6778
7638
  limit_reached?: boolean;
6779
7639
  };
6780
7640
  /**
6781
- * @description Accept IP addresses forwarded in the `IDPC-Source-IP` header
7641
+ * @description Accept IP addresses forwarded in the `AZ-Source-IP` header
6782
7642
  * @default false
6783
7643
  */
6784
7644
  ip_forwarding?: boolean;
@@ -6922,6 +7782,11 @@ export interface components {
6922
7782
  * @example false
6923
7783
  */
6924
7784
  ab?: boolean;
7785
+ /**
7786
+ * @description UK AddressBase Premium dataset
7787
+ * @example false
7788
+ */
7789
+ abp?: boolean;
6925
7790
  /**
6926
7791
  * @description Northern Ireland Pointer Dataset
6927
7792
  * @example false
@@ -7700,6 +8565,7 @@ export interface components {
7700
8565
  | components["schemas"]["PafAliasAddress"]
7701
8566
  | components["schemas"]["NybAddress"]
7702
8567
  | components["schemas"]["AbAddress"]
8568
+ | components["schemas"]["AbpAddress"]
7703
8569
  | components["schemas"]["GbrGlobalAddress"];
7704
8570
  };
7705
8571
  /**
@@ -7877,6 +8743,7 @@ export interface components {
7877
8743
  | components["schemas"]["PafAliasAddress"]
7878
8744
  | components["schemas"]["WelshPafAddress"]
7879
8745
  | components["schemas"]["AbAddress"]
8746
+ | components["schemas"]["AbpAddress"]
7880
8747
  | components["schemas"]["HereAddress"]
7881
8748
  | components["schemas"]["GnafAddress"]
7882
8749
  | components["schemas"]["KadasterAddress"]
@@ -7919,6 +8786,7 @@ export interface components {
7919
8786
  | components["schemas"]["WelshPafAddress"]
7920
8787
  | components["schemas"]["PafAliasAddress"]
7921
8788
  | components["schemas"]["AbAddress"]
8789
+ | components["schemas"]["AbpAddress"]
7922
8790
  )[];
7923
8791
  /** Format: int32 */
7924
8792
  total: number;
@@ -8778,6 +9646,101 @@ export interface components {
8778
9646
  | components["schemas"]["PhoneNumber"]
8779
9647
  | components["schemas"]["InvalidPhoneNumber"];
8780
9648
  };
9649
+ /**
9650
+ * GILP Ground Stability
9651
+ * @description Postcode-level potential insurance risk from natural ground movement, from
9652
+ * the BGS GeoSure Insurance and Lenders Product (GILP) Derived Postcode
9653
+ * Database. Combines the six GeoSure hazards on (low-rise) buildings:
9654
+ * shrink-swell, landslides, soluble rocks, running sand, compressible ground
9655
+ * and collapsible deposits.
9656
+ *
9657
+ * Field names, types and score ranges mirror the GILP v8 Derived Postcode
9658
+ * Database verbatim (lower-cased), per the BGS user guide (Open Report
9659
+ * OR/26/013). Scores are unitless measures of expected impact, normalised by
9660
+ * expert elicitation so they are comparable and summable across hazards;
9661
+ * `total` is the sum of the six individual hazard scores.
9662
+ *
9663
+ * Hazards cover NATURAL ground movement only - no mining or contaminated
9664
+ * land (compressible ground is the one layer that considers man-made ground,
9665
+ * e.g. landfill). Values are generalised to postcode level; minimum
9666
+ * meaningful resolution is the postcode.
9667
+ */
9668
+ GilpGroundStability: {
9669
+ /**
9670
+ * @description The individual postcode.
9671
+ * @example BA1 0AA
9672
+ */
9673
+ postcode: string;
9674
+ /**
9675
+ * @description The individual hazard score value for collapsible deposits - rocks and
9676
+ * soils that may collapse when a load is placed on them, especially when
9677
+ * saturated.
9678
+ *
9679
+ * @example 0
9680
+ */
9681
+ collapse: number;
9682
+ /**
9683
+ * @description The individual hazard score value for running sand - loosely packed
9684
+ * sandy layers that can become fluidised by water flowing through them,
9685
+ * potentially removing support from overlying buildings.
9686
+ *
9687
+ * @example 6
9688
+ */
9689
+ rsand: number;
9690
+ /**
9691
+ * @description The individual hazard score value for compressible ground - very soft
9692
+ * materials like peat or some clays that may compress if loaded by
9693
+ * overlying structures or if the groundwater level changes.
9694
+ *
9695
+ * @example 74
9696
+ */
9697
+ comp: number;
9698
+ /**
9699
+ * @description The individual hazard score value for shrink-swell - swelling clays
9700
+ * that change volume with moisture variation, particularly in the upper
9701
+ * two metres of the ground.
9702
+ *
9703
+ * @example 252
9704
+ */
9705
+ sswell: number;
9706
+ /**
9707
+ * @description The individual hazard score value for soluble rocks (dissolution) -
9708
+ * soluble material dissolving to form underground cavities that reduce
9709
+ * support to the ground above.
9710
+ *
9711
+ * @example 0
9712
+ */
9713
+ solub: number;
9714
+ /**
9715
+ * @description The individual hazard score value for landslide - slope instability
9716
+ * causing down-slope movement of materials such as a landslide or
9717
+ * rockfall.
9718
+ *
9719
+ * @example 35
9720
+ */
9721
+ landslide: number;
9722
+ /**
9723
+ * @description The total combined score of all 6 hazards.
9724
+ * @example 367
9725
+ */
9726
+ total: number;
9727
+ /**
9728
+ * @description Classification of the insurance hazard potential, dividing `total`
9729
+ * into 5 equal categories: Low (0-399), Low-Medium (400-799), Medium
9730
+ * (800-1199), Medium-High (1200-1599), High (1600-2000).
9731
+ *
9732
+ * @example Low
9733
+ * @enum {string}
9734
+ */
9735
+ class: "Low" | "Low-Medium" | "Medium" | "Medium-High" | "High";
9736
+ /**
9737
+ * @description Dataset name and version number, encoding the GeoSure version and the
9738
+ * OS Code-Point Open version used in production.
9739
+ *
9740
+ * @example GILP_v8_2025.3
9741
+ */
9742
+ version: string;
9743
+ };
8781
9744
  };
8782
9745
  parameters: {
8783
9746
  /**
@@ -9105,7 +10068,7 @@ export interface operations {
9105
10068
  /**
9106
10069
  * Returns the complete list of addresses for a postcode. Postcode searches are space and case insensitive.
9107
10070
  *
9108
- * The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Postcode Lookup driven address searches, like [Postcode Lookup](/postcode-lookup).
10071
+ * The Postcode Lookup API provides a JSON interface to search UK addresses from a postcode. It can be used to power Address Lookup driven address searches, like [Address Lookup](/docs/address-lookup/).
9109
10072
  *
9110
10073
  * ## Postcode Not Found
9111
10074
  *
@@ -11180,6 +12143,124 @@ export interface operations {
11180
12143
  };
11181
12144
  };
11182
12145
  };
12146
+ /**
12147
+ * Mints a one-shot `cli_token` and returns a prefilled accounts web URL where the user completes captcha + Terms of Service and Devise account creation. The CLI then polls `GET /sign_up/{cli_token}` until the api receives the user record (via the existing Rails → api admin propagation) along with the first API key, at which point credentials are returned exactly once.
12148
+ *
12149
+ * The api does **not** persist the `cli_token` at mint time — the token only becomes known to the api once Rails propagates the new user. The CLI is therefore responsible for its own polling deadline; if the user never completes signup, the api has no record of this token and `GET /sign_up/{cli_token}` will keep returning `202 Accepted` indefinitely.
12150
+ */
12151
+ SignUpMintToken: {
12152
+ responses: {
12153
+ /** Token minted */
12154
+ 200: {
12155
+ content: {
12156
+ "application/json": {
12157
+ /** @example 2000 */
12158
+ code: number;
12159
+ /** @example Success */
12160
+ message: string;
12161
+ result: {
12162
+ /** @description Random URL-safe token (base64url). Used by the CLI to poll for credentials. */
12163
+ cli_token: string;
12164
+ /**
12165
+ * Format: uri
12166
+ * @description Prefilled accounts web URL. The user opens this in a browser to complete signup.
12167
+ */
12168
+ signup_url: string;
12169
+ };
12170
+ };
12171
+ };
12172
+ };
12173
+ /** Bad Request */
12174
+ 400: {
12175
+ content: {
12176
+ "application/json": components["schemas"]["BadRequestResponse"];
12177
+ };
12178
+ };
12179
+ };
12180
+ requestBody: {
12181
+ content: {
12182
+ "application/json": {
12183
+ /**
12184
+ * Format: email
12185
+ * @description Account holder's email address.
12186
+ */
12187
+ email: string;
12188
+ /** @description Account holder's full name. */
12189
+ name: string;
12190
+ /** @description Organisation name. */
12191
+ org_name: string;
12192
+ org_address_line_one: string;
12193
+ org_address_line_two?: string;
12194
+ org_address_line_three?: string;
12195
+ org_post_town: string;
12196
+ org_postcode: string;
12197
+ /** @description ISO 3166-1 alpha-2 country code. */
12198
+ org_country_code: string;
12199
+ };
12200
+ };
12201
+ };
12202
+ };
12203
+ /**
12204
+ * Polls the status of a previously minted `cli_token`. The CLI calls this endpoint repeatedly after directing the user to the `signup_url` returned by `POST /sign_up`.
12205
+ *
12206
+ * - `202 Accepted` — Rails has not propagated the user to the api yet, or has propagated the user but not minted the first API key. Keep polling. **Note:** the api does not record the `cli_token` at mint time, so a `202` is also what an unknown / never-propagated token returns. The CLI must impose its own polling deadline.
12207
+ * - `200 OK` — User and first API key exist. Credentials are returned exactly once; subsequent polls return `410 Gone`.
12208
+ * - `410 Gone` — Token has expired (per the `cli_token_expires_at` set by Rails on the User record) or has already been claimed.
12209
+ */
12210
+ SignUpClaim: {
12211
+ parameters: {
12212
+ path: {
12213
+ /** The token returned by `POST /sign_up`. */
12214
+ cli_token: string;
12215
+ };
12216
+ };
12217
+ responses: {
12218
+ /** Credentials ready */
12219
+ 200: {
12220
+ content: {
12221
+ "application/json": {
12222
+ /** @example 2000 */
12223
+ code: number;
12224
+ /** @example Success */
12225
+ message: string;
12226
+ result: {
12227
+ /** @description User-level token used to manage account resources via the api. */
12228
+ user_token: string;
12229
+ /** @description Initial test API key for the account. */
12230
+ test_api_key: string;
12231
+ /** @description Internal api user id. */
12232
+ user_id: string;
12233
+ };
12234
+ };
12235
+ };
12236
+ };
12237
+ /** Pending — keep polling */
12238
+ 202: {
12239
+ content: {
12240
+ "application/json": {
12241
+ /** @example 2020 */
12242
+ code: number;
12243
+ /** @example Pending */
12244
+ message: string;
12245
+ result: {
12246
+ /** @enum {string} */
12247
+ status: "pending";
12248
+ };
12249
+ };
12250
+ };
12251
+ };
12252
+ /** Signup token expired or already claimed */
12253
+ 410: {
12254
+ content: {
12255
+ "application/json": {
12256
+ /** @example 4100 */
12257
+ code: number;
12258
+ message: string;
12259
+ };
12260
+ };
12261
+ };
12262
+ };
12263
+ };
11183
12264
  }
11184
12265
 
11185
12266
  export interface external {}