@addresszen/openapi 4.1.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +291 -250
- package/dist/index.d.ts +291 -250
- package/dist/openapi.json +577 -501
- package/dist/openapi.yaml +750 -671
- package/openapi.ts +291 -250
- package/package.json +1 -1
package/dist/openapi.yaml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
openapi: 3.0.3
|
|
2
2
|
info:
|
|
3
|
-
version: 4.
|
|
3
|
+
version: 4.2.0
|
|
4
4
|
license:
|
|
5
5
|
name: Copyright (C) IDDQD Limited - All Rights Reserved
|
|
6
6
|
url: https://terms.addresszen.com
|
|
@@ -297,16 +297,22 @@ paths:
|
|
|
297
297
|
- lang: JavaScript
|
|
298
298
|
label: JavaScript
|
|
299
299
|
source: |
|
|
300
|
-
|
|
300
|
+
import { createZenClient, keyAvailability } from '@addresszen/sdk';
|
|
301
301
|
|
|
302
|
-
const
|
|
302
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
303
|
+
|
|
304
|
+
const { data } = await keyAvailability({
|
|
305
|
+
client,
|
|
306
|
+
path: { key: 'ak_test' },
|
|
307
|
+
});
|
|
303
308
|
- lang: Python
|
|
304
309
|
label: Python
|
|
305
310
|
source: |
|
|
306
|
-
|
|
311
|
+
# pip install addresszen
|
|
312
|
+
from addresszen import AddressZen
|
|
307
313
|
|
|
308
|
-
|
|
309
|
-
|
|
314
|
+
with AddressZen("ak_test") as client:
|
|
315
|
+
result = client.key_availability("ak_test")
|
|
310
316
|
- lang: Ruby
|
|
311
317
|
label: Ruby
|
|
312
318
|
source: |
|
|
@@ -366,26 +372,22 @@ paths:
|
|
|
366
372
|
- lang: JavaScript
|
|
367
373
|
label: JavaScript
|
|
368
374
|
source: |
|
|
369
|
-
|
|
370
|
-
'https://api.addresszen.com/v1/keys/ak_test/details?' +
|
|
371
|
-
new URLSearchParams({
|
|
372
|
-
user_token: 'uk_secret',
|
|
373
|
-
})
|
|
374
|
-
);
|
|
375
|
+
import { createZenClient, keyDetails } from '@addresszen/sdk';
|
|
375
376
|
|
|
376
|
-
const {
|
|
377
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
378
|
+
|
|
379
|
+
const { data } = await keyDetails({
|
|
380
|
+
client,
|
|
381
|
+
path: { key: 'ak_test' },
|
|
382
|
+
});
|
|
377
383
|
- lang: Python
|
|
378
384
|
label: Python
|
|
379
385
|
source: |
|
|
380
|
-
|
|
386
|
+
# pip install addresszen
|
|
387
|
+
from addresszen import AddressZen
|
|
381
388
|
|
|
382
|
-
|
|
383
|
-
"
|
|
384
|
-
params={
|
|
385
|
-
"user_token": "uk_secret",
|
|
386
|
-
},
|
|
387
|
-
)
|
|
388
|
-
result = response.json()["result"]
|
|
389
|
+
with AddressZen("ak_test") as client:
|
|
390
|
+
result = client.key_details("ak_test", user_token="uk_secret")
|
|
389
391
|
- lang: Ruby
|
|
390
392
|
label: Ruby
|
|
391
393
|
source: |
|
|
@@ -410,7 +412,7 @@ paths:
|
|
|
410
412
|
tags:
|
|
411
413
|
- Keys
|
|
412
414
|
summary: Update Details
|
|
413
|
-
description: Updates a key's settings and returns its private details. Only the fields you send change. A key on an unlimited plan ignores changes to `datasets`, `daily_limit` and `monthly_limit`.
|
|
415
|
+
description: 'Updates a key''s settings and returns its private details. Only the fields you send change. A key on an unlimited plan ignores changes to `datasets`, `daily_limit` and `monthly_limit`. Datasets set by your plan cannot be changed here: sending one with a different value returns a 400.'
|
|
414
416
|
operationId: UpdateKeyDetails
|
|
415
417
|
security:
|
|
416
418
|
- ManagementKey: []
|
|
@@ -450,7 +452,9 @@ paths:
|
|
|
450
452
|
-H 'Content-Type: application/json' \
|
|
451
453
|
-d '{
|
|
452
454
|
"name": "My Updated Key",
|
|
453
|
-
"daily_limit":
|
|
455
|
+
"daily_limit": {
|
|
456
|
+
"limit": 1000
|
|
457
|
+
},
|
|
454
458
|
"notifications": {
|
|
455
459
|
"enabled": true
|
|
456
460
|
}
|
|
@@ -458,36 +462,37 @@ paths:
|
|
|
458
462
|
- lang: JavaScript
|
|
459
463
|
label: JavaScript
|
|
460
464
|
source: |
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
+
import { createZenClient, updateKeyDetails } from '@addresszen/sdk';
|
|
466
|
+
|
|
467
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
468
|
+
|
|
469
|
+
const { data } = await updateKeyDetails({
|
|
470
|
+
client,
|
|
471
|
+
path: { key: 'ak_test' },
|
|
472
|
+
body: {
|
|
465
473
|
name: 'My Updated Key',
|
|
466
|
-
daily_limit:
|
|
474
|
+
daily_limit: {
|
|
475
|
+
limit: 1000,
|
|
476
|
+
},
|
|
467
477
|
notifications: {
|
|
468
478
|
enabled: true,
|
|
469
479
|
},
|
|
470
|
-
}
|
|
480
|
+
},
|
|
471
481
|
});
|
|
472
|
-
|
|
473
|
-
const { result } = await response.json();
|
|
474
482
|
- lang: Python
|
|
475
483
|
label: Python
|
|
476
484
|
source: |
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
"
|
|
484
|
-
"
|
|
485
|
-
"
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
},
|
|
489
|
-
)
|
|
490
|
-
result = response.json()["result"]
|
|
485
|
+
# pip install addresszen
|
|
486
|
+
from addresszen import AddressZen
|
|
487
|
+
|
|
488
|
+
with AddressZen("ak_test") as client:
|
|
489
|
+
result = client.update_key_details(
|
|
490
|
+
"ak_test",
|
|
491
|
+
user_token="uk_secret",
|
|
492
|
+
name="My Updated Key",
|
|
493
|
+
daily_limit={"limit": 1000},
|
|
494
|
+
notifications={"enabled": True},
|
|
495
|
+
)
|
|
491
496
|
- lang: Ruby
|
|
492
497
|
label: Ruby
|
|
493
498
|
source: |
|
|
@@ -497,7 +502,9 @@ paths:
|
|
|
497
502
|
uri = URI("https://api.addresszen.com/v1/keys/ak_test/details?user_token=uk_secret")
|
|
498
503
|
body = {
|
|
499
504
|
name: "My Updated Key",
|
|
500
|
-
daily_limit:
|
|
505
|
+
daily_limit: {
|
|
506
|
+
limit: 1000,
|
|
507
|
+
},
|
|
501
508
|
notifications: {
|
|
502
509
|
enabled: true,
|
|
503
510
|
},
|
|
@@ -514,7 +521,9 @@ paths:
|
|
|
514
521
|
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
|
|
515
522
|
CURLOPT_POSTFIELDS => json_encode([
|
|
516
523
|
"name" => "My Updated Key",
|
|
517
|
-
"daily_limit" =>
|
|
524
|
+
"daily_limit" => [
|
|
525
|
+
"limit" => 1000,
|
|
526
|
+
],
|
|
518
527
|
"notifications" => [
|
|
519
528
|
"enabled" => true,
|
|
520
529
|
],
|
|
@@ -569,26 +578,22 @@ paths:
|
|
|
569
578
|
- lang: JavaScript
|
|
570
579
|
label: JavaScript
|
|
571
580
|
source: |
|
|
572
|
-
|
|
573
|
-
'https://api.addresszen.com/v1/keys/ak_test/usage?' +
|
|
574
|
-
new URLSearchParams({
|
|
575
|
-
user_token: 'uk_secret',
|
|
576
|
-
})
|
|
577
|
-
);
|
|
581
|
+
import { createZenClient, keyUsage } from '@addresszen/sdk';
|
|
578
582
|
|
|
579
|
-
const {
|
|
583
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
584
|
+
|
|
585
|
+
const { data } = await keyUsage({
|
|
586
|
+
client,
|
|
587
|
+
path: { key: 'ak_test' },
|
|
588
|
+
});
|
|
580
589
|
- lang: Python
|
|
581
590
|
label: Python
|
|
582
591
|
source: |
|
|
583
|
-
|
|
592
|
+
# pip install addresszen
|
|
593
|
+
from addresszen import AddressZen
|
|
584
594
|
|
|
585
|
-
|
|
586
|
-
"
|
|
587
|
-
params={
|
|
588
|
-
"user_token": "uk_secret",
|
|
589
|
-
},
|
|
590
|
-
)
|
|
591
|
-
result = response.json()["result"]
|
|
595
|
+
with AddressZen("ak_test") as client:
|
|
596
|
+
result = client.key_usage("ak_test", user_token="uk_secret")
|
|
592
597
|
- lang: Ruby
|
|
593
598
|
label: Ruby
|
|
594
599
|
source: |
|
|
@@ -683,26 +688,22 @@ paths:
|
|
|
683
688
|
- lang: JavaScript
|
|
684
689
|
label: JavaScript
|
|
685
690
|
source: |
|
|
686
|
-
|
|
687
|
-
'https://api.addresszen.com/v1/keys/ak_test/lookups?' +
|
|
688
|
-
new URLSearchParams({
|
|
689
|
-
user_token: 'uk_secret',
|
|
690
|
-
})
|
|
691
|
-
);
|
|
691
|
+
import { createZenClient, keyLogs } from '@addresszen/sdk';
|
|
692
692
|
|
|
693
|
-
const {
|
|
693
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
694
|
+
|
|
695
|
+
const { data: csv } = await keyLogs({
|
|
696
|
+
client,
|
|
697
|
+
path: { key: 'ak_test' },
|
|
698
|
+
});
|
|
694
699
|
- lang: Python
|
|
695
700
|
label: Python
|
|
696
701
|
source: |
|
|
697
|
-
|
|
702
|
+
# pip install addresszen
|
|
703
|
+
from addresszen import AddressZen
|
|
698
704
|
|
|
699
|
-
|
|
700
|
-
"
|
|
701
|
-
params={
|
|
702
|
-
"user_token": "uk_secret",
|
|
703
|
-
},
|
|
704
|
-
)
|
|
705
|
-
result = response.json()["result"]
|
|
705
|
+
with AddressZen("ak_test") as client:
|
|
706
|
+
result = client.key_logs("ak_test", user_token="uk_secret")
|
|
706
707
|
- lang: Ruby
|
|
707
708
|
label: Ruby
|
|
708
709
|
source: |
|
|
@@ -733,15 +734,19 @@ paths:
|
|
|
733
734
|
|
|
734
735
|
Submit the whole address in `query`, or the first address line in `query` with either `zip_code`, or `city` and `state`. A freeform `query` is parsed into those components before the search runs.
|
|
735
736
|
|
|
736
|
-
A match returns the standardized address lines, city, state and ZIP+4, scored by `fit` and `confidence`. It also carries the CASS record behind the match: delivery point, DPV flags, carrier route, eLOT, county, congressional district, RDI, time zone and coordinates.
|
|
737
|
+
A match returns the standardized address lines, city, state and ZIP+4, scored by `fit` and `confidence`. It also carries the CASS record behind the match: delivery point, DPV flags, carrier route, eLOT, county, congressional district, RDI, time zone and coordinates. CASS corrects what it can, so an address with the wrong city or state for its ZIP code still verifies, with the corrected values.
|
|
738
|
+
|
|
739
|
+
An address that cannot be verified returns `200` with a `count` of `0`, a `null` `match` and empty address fields. `match_information` says why, e.g. `Address not found` or `House number not valid for this street`. It is for people to read and its wording may change, so test `match` for `null` rather than parsing it.
|
|
737
740
|
|
|
738
|
-
|
|
741
|
+
In the United States every verification the CASS engine answers draws on your balance, matched or not. A query that cannot be parsed into an address does not. Elsewhere only a match draws on your balance. A key without address verification enabled returns `401`. A verification still running after 9.5 seconds aborts with `429`.
|
|
739
742
|
|
|
740
743
|
## Countries
|
|
741
744
|
|
|
742
745
|
Verify defaults to the United States, where it is CASS certified. Pass `context` with an ISO 3166-1 alpha-3 country code to verify an address elsewhere, e.g. `context=GBR` or `context=FRA`. The address datasets your key is licensed for decide which countries it can verify.
|
|
743
746
|
|
|
744
|
-
Outside the United States there is no CASS record
|
|
747
|
+
Outside the United States there is no CASS record, so `match` is the address in the same format Retrieve Address returns: USPS-style field names, empty strings where the country has no equivalent, and the raw dataset record in `native`. Check `dataset` to tell the two apart: it is present on every non-US match and absent from a CASS match.
|
|
748
|
+
|
|
749
|
+
The top-level fields (`address_line_one`, `address_line_two`, `city`, `state`, `zip_code`, `country_iso_2`) are populated for every country, along with `confidence` and `fit`.
|
|
745
750
|
operationId: AddressVerify
|
|
746
751
|
security:
|
|
747
752
|
- ApiKey: []
|
|
@@ -790,7 +795,7 @@ paths:
|
|
|
790
795
|
state:
|
|
791
796
|
type: string
|
|
792
797
|
description: |
|
|
793
|
-
State of an address. For the US, use the 2
|
|
798
|
+
State of an address. For the US, use the 2-letter state abbreviation.
|
|
794
799
|
example: CO
|
|
795
800
|
responses:
|
|
796
801
|
'200':
|
|
@@ -818,31 +823,24 @@ paths:
|
|
|
818
823
|
- lang: JavaScript
|
|
819
824
|
label: JavaScript
|
|
820
825
|
source: |
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
body:
|
|
826
|
+
import { createZenClient, addressVerify } from '@addresszen/sdk';
|
|
827
|
+
|
|
828
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
829
|
+
|
|
830
|
+
const { data } = await addressVerify({
|
|
831
|
+
client,
|
|
832
|
+
body: {
|
|
828
833
|
query: '123 Main St, Springfield, IL 62701',
|
|
829
|
-
}
|
|
834
|
+
},
|
|
830
835
|
});
|
|
831
|
-
|
|
832
|
-
const { result } = await response.json();
|
|
833
836
|
- lang: Python
|
|
834
837
|
label: Python
|
|
835
838
|
source: |
|
|
836
|
-
|
|
839
|
+
# pip install addresszen
|
|
840
|
+
from addresszen import AddressZen
|
|
837
841
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
headers={"Authorization": 'api_key="ak_test"'},
|
|
841
|
-
json={
|
|
842
|
-
"query": "123 Main St, Springfield, IL 62701",
|
|
843
|
-
},
|
|
844
|
-
)
|
|
845
|
-
result = response.json()["result"]
|
|
842
|
+
with AddressZen("ak_test") as client:
|
|
843
|
+
result = client.address_verify(query="123 Main St, Springfield, IL 62701")
|
|
846
844
|
- lang: Ruby
|
|
847
845
|
label: Ruby
|
|
848
846
|
source: |
|
|
@@ -1025,28 +1023,37 @@ paths:
|
|
|
1025
1023
|
- lang: JavaScript
|
|
1026
1024
|
label: JavaScript
|
|
1027
1025
|
source: |
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
new URLSearchParams({
|
|
1031
|
-
api_key: 'ak_test',
|
|
1032
|
-
query: '1600 Pennsylvania',
|
|
1033
|
-
})
|
|
1034
|
-
);
|
|
1026
|
+
import { createZenClient } from '@addresszen/sdk';
|
|
1027
|
+
import { createAutocomplete } from '@addresszen/sdk/autocomplete';
|
|
1035
1028
|
|
|
1036
|
-
const
|
|
1029
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
1030
|
+
|
|
1031
|
+
// Debounces keystrokes, drops superseded requests and caches suggestions
|
|
1032
|
+
const autocomplete = createAutocomplete({ client });
|
|
1033
|
+
|
|
1034
|
+
const hits = await autocomplete.find({ query: '1600 Pennsylvania' });
|
|
1035
|
+
if (hits?.length) {
|
|
1036
|
+
const address = await autocomplete.retrieve({ hit: hits[0] });
|
|
1037
|
+
}
|
|
1038
|
+
- lang: JavaScript
|
|
1039
|
+
label: JavaScript (direct)
|
|
1040
|
+
source: |
|
|
1041
|
+
import { createZenClient, findAddress } from '@addresszen/sdk';
|
|
1042
|
+
|
|
1043
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
1044
|
+
|
|
1045
|
+
const { data } = await findAddress({
|
|
1046
|
+
client,
|
|
1047
|
+
query: { query: '1600 Pennsylvania' },
|
|
1048
|
+
});
|
|
1037
1049
|
- lang: Python
|
|
1038
1050
|
label: Python
|
|
1039
1051
|
source: |
|
|
1040
|
-
|
|
1052
|
+
# pip install addresszen
|
|
1053
|
+
from addresszen import AddressZen
|
|
1041
1054
|
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
params={
|
|
1045
|
-
"api_key": "ak_test",
|
|
1046
|
-
"query": "1600 Pennsylvania",
|
|
1047
|
-
},
|
|
1048
|
-
)
|
|
1049
|
-
result = response.json()["result"]
|
|
1055
|
+
with AddressZen("ak_test") as client:
|
|
1056
|
+
result = client.find_address(query="1600 Pennsylvania")
|
|
1050
1057
|
- lang: Ruby
|
|
1051
1058
|
label: Ruby
|
|
1052
1059
|
source: |
|
|
@@ -1132,26 +1139,37 @@ paths:
|
|
|
1132
1139
|
- lang: JavaScript
|
|
1133
1140
|
label: JavaScript
|
|
1134
1141
|
source: |
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
new URLSearchParams({
|
|
1138
|
-
api_key: 'ak_test',
|
|
1139
|
-
})
|
|
1140
|
-
);
|
|
1142
|
+
import { createZenClient } from '@addresszen/sdk';
|
|
1143
|
+
import { createAutocomplete } from '@addresszen/sdk/autocomplete';
|
|
1141
1144
|
|
|
1142
|
-
const
|
|
1145
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
1146
|
+
|
|
1147
|
+
// Debounces keystrokes, drops superseded requests and caches suggestions
|
|
1148
|
+
const autocomplete = createAutocomplete({ client });
|
|
1149
|
+
|
|
1150
|
+
const hits = await autocomplete.find({ query: '1600 Pennsylvania' });
|
|
1151
|
+
if (hits?.length) {
|
|
1152
|
+
const address = await autocomplete.retrieve({ hit: hits[0] });
|
|
1153
|
+
}
|
|
1154
|
+
- lang: JavaScript
|
|
1155
|
+
label: JavaScript (direct)
|
|
1156
|
+
source: |
|
|
1157
|
+
import { createZenClient, retrieveAddress } from '@addresszen/sdk';
|
|
1158
|
+
|
|
1159
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
1160
|
+
|
|
1161
|
+
const { data } = await retrieveAddress({
|
|
1162
|
+
client,
|
|
1163
|
+
path: { address: 'usps_V118834572|310||3191' },
|
|
1164
|
+
});
|
|
1143
1165
|
- lang: Python
|
|
1144
1166
|
label: Python
|
|
1145
1167
|
source: |
|
|
1146
|
-
|
|
1168
|
+
# pip install addresszen
|
|
1169
|
+
from addresszen import AddressZen
|
|
1147
1170
|
|
|
1148
|
-
|
|
1149
|
-
"
|
|
1150
|
-
params={
|
|
1151
|
-
"api_key": "ak_test",
|
|
1152
|
-
},
|
|
1153
|
-
)
|
|
1154
|
-
result = response.json()["result"]
|
|
1171
|
+
with AddressZen("ak_test") as client:
|
|
1172
|
+
result = client.retrieve_address("usps_V118834572|310||3191")
|
|
1155
1173
|
- lang: Ruby
|
|
1156
1174
|
label: Ruby
|
|
1157
1175
|
source: |
|
|
@@ -1274,28 +1292,22 @@ paths:
|
|
|
1274
1292
|
- lang: JavaScript
|
|
1275
1293
|
label: JavaScript
|
|
1276
1294
|
source: |
|
|
1277
|
-
|
|
1278
|
-
'https://api.addresszen.com/v1/places?' +
|
|
1279
|
-
new URLSearchParams({
|
|
1280
|
-
api_key: 'ak_test',
|
|
1281
|
-
query: 'london',
|
|
1282
|
-
})
|
|
1283
|
-
);
|
|
1295
|
+
import { createZenClient, findPlace } from '@addresszen/sdk';
|
|
1284
1296
|
|
|
1285
|
-
const
|
|
1297
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
1298
|
+
|
|
1299
|
+
const { data } = await findPlace({
|
|
1300
|
+
client,
|
|
1301
|
+
query: { query: 'london' },
|
|
1302
|
+
});
|
|
1286
1303
|
- lang: Python
|
|
1287
1304
|
label: Python
|
|
1288
1305
|
source: |
|
|
1289
|
-
|
|
1306
|
+
# pip install addresszen
|
|
1307
|
+
from addresszen import AddressZen
|
|
1290
1308
|
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
params={
|
|
1294
|
-
"api_key": "ak_test",
|
|
1295
|
-
"query": "london",
|
|
1296
|
-
},
|
|
1297
|
-
)
|
|
1298
|
-
result = response.json()["result"]
|
|
1309
|
+
with AddressZen("ak_test") as client:
|
|
1310
|
+
result = client.find_place(query="london")
|
|
1299
1311
|
- lang: Ruby
|
|
1300
1312
|
label: Ruby
|
|
1301
1313
|
source: |
|
|
@@ -1526,26 +1538,22 @@ paths:
|
|
|
1526
1538
|
- lang: JavaScript
|
|
1527
1539
|
label: JavaScript
|
|
1528
1540
|
source: |
|
|
1529
|
-
|
|
1530
|
-
'https://api.addresszen.com/v1/places/geonames_5353?' +
|
|
1531
|
-
new URLSearchParams({
|
|
1532
|
-
api_key: 'ak_test',
|
|
1533
|
-
})
|
|
1534
|
-
);
|
|
1541
|
+
import { createZenClient, resolvePlace } from '@addresszen/sdk';
|
|
1535
1542
|
|
|
1536
|
-
const
|
|
1543
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
1544
|
+
|
|
1545
|
+
const { data } = await resolvePlace({
|
|
1546
|
+
client,
|
|
1547
|
+
path: { place: 'geonames_5353' },
|
|
1548
|
+
});
|
|
1537
1549
|
- lang: Python
|
|
1538
1550
|
label: Python
|
|
1539
1551
|
source: |
|
|
1540
|
-
|
|
1552
|
+
# pip install addresszen
|
|
1553
|
+
from addresszen import AddressZen
|
|
1541
1554
|
|
|
1542
|
-
|
|
1543
|
-
"
|
|
1544
|
-
params={
|
|
1545
|
-
"api_key": "ak_test",
|
|
1546
|
-
},
|
|
1547
|
-
)
|
|
1548
|
-
result = response.json()["result"]
|
|
1555
|
+
with AddressZen("ak_test") as client:
|
|
1556
|
+
result = client.resolve_place("geonames_5353")
|
|
1549
1557
|
- lang: Ruby
|
|
1550
1558
|
label: Ruby
|
|
1551
1559
|
source: |
|
|
@@ -1620,26 +1628,22 @@ paths:
|
|
|
1620
1628
|
- lang: JavaScript
|
|
1621
1629
|
label: JavaScript
|
|
1622
1630
|
source: |
|
|
1623
|
-
|
|
1624
|
-
'https://api.addresszen.com/v1/keys/ak_test/licensees?' +
|
|
1625
|
-
new URLSearchParams({
|
|
1626
|
-
user_token: 'uk_secret',
|
|
1627
|
-
})
|
|
1628
|
-
);
|
|
1631
|
+
import { createZenClient, listLicensees } from '@addresszen/sdk';
|
|
1629
1632
|
|
|
1630
|
-
const {
|
|
1633
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
1634
|
+
|
|
1635
|
+
const { data } = await listLicensees({
|
|
1636
|
+
client,
|
|
1637
|
+
path: { key: 'ak_test' },
|
|
1638
|
+
});
|
|
1631
1639
|
- lang: Python
|
|
1632
1640
|
label: Python
|
|
1633
1641
|
source: |
|
|
1634
|
-
|
|
1642
|
+
# pip install addresszen
|
|
1643
|
+
from addresszen import AddressZen
|
|
1635
1644
|
|
|
1636
|
-
|
|
1637
|
-
"
|
|
1638
|
-
params={
|
|
1639
|
-
"user_token": "uk_secret",
|
|
1640
|
-
},
|
|
1641
|
-
)
|
|
1642
|
-
result = response.json()["result"]
|
|
1645
|
+
with AddressZen("ak_test") as client:
|
|
1646
|
+
result = client.list_licensees("ak_test", user_token="uk_secret")
|
|
1643
1647
|
- lang: Ruby
|
|
1644
1648
|
label: Ruby
|
|
1645
1649
|
source: |
|
|
@@ -1708,10 +1712,14 @@ paths:
|
|
|
1708
1712
|
- lang: JavaScript
|
|
1709
1713
|
label: JavaScript
|
|
1710
1714
|
source: |
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
+
import { createZenClient, createLicensee } from '@addresszen/sdk';
|
|
1716
|
+
|
|
1717
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
1718
|
+
|
|
1719
|
+
const { data } = await createLicensee({
|
|
1720
|
+
client,
|
|
1721
|
+
path: { key: 'ak_test' },
|
|
1722
|
+
body: {
|
|
1715
1723
|
name: 'Qwerty Widgets Limited',
|
|
1716
1724
|
address: '12 High Street, Manchester',
|
|
1717
1725
|
postcode: 'BR8 7RE',
|
|
@@ -1719,29 +1727,24 @@ paths:
|
|
|
1719
1727
|
daily: {
|
|
1720
1728
|
limit: 10000,
|
|
1721
1729
|
},
|
|
1722
|
-
}
|
|
1730
|
+
},
|
|
1723
1731
|
});
|
|
1724
|
-
|
|
1725
|
-
const { result } = await response.json();
|
|
1726
1732
|
- lang: Python
|
|
1727
1733
|
label: Python
|
|
1728
1734
|
source: |
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
"
|
|
1736
|
-
"
|
|
1737
|
-
"
|
|
1738
|
-
"
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
},
|
|
1743
|
-
)
|
|
1744
|
-
result = response.json()["result"]
|
|
1735
|
+
# pip install addresszen
|
|
1736
|
+
from addresszen import AddressZen
|
|
1737
|
+
|
|
1738
|
+
with AddressZen("ak_test") as client:
|
|
1739
|
+
result = client.create_licensee(
|
|
1740
|
+
"ak_test",
|
|
1741
|
+
user_token="uk_secret",
|
|
1742
|
+
name="Qwerty Widgets Limited",
|
|
1743
|
+
address="12 High Street, Manchester",
|
|
1744
|
+
postcode="BR8 7RE",
|
|
1745
|
+
whitelist=[],
|
|
1746
|
+
daily={"limit": 10000},
|
|
1747
|
+
)
|
|
1745
1748
|
- lang: Ruby
|
|
1746
1749
|
label: Ruby
|
|
1747
1750
|
source: |
|
|
@@ -1820,26 +1823,22 @@ paths:
|
|
|
1820
1823
|
- lang: JavaScript
|
|
1821
1824
|
label: JavaScript
|
|
1822
1825
|
source: |
|
|
1823
|
-
|
|
1824
|
-
'https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94?' +
|
|
1825
|
-
new URLSearchParams({
|
|
1826
|
-
user_token: 'uk_secret',
|
|
1827
|
-
})
|
|
1828
|
-
);
|
|
1826
|
+
import { createZenClient, retrieveLicensee } from '@addresszen/sdk';
|
|
1829
1827
|
|
|
1830
|
-
const {
|
|
1828
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
1829
|
+
|
|
1830
|
+
const { data } = await retrieveLicensee({
|
|
1831
|
+
client,
|
|
1832
|
+
path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },
|
|
1833
|
+
});
|
|
1831
1834
|
- lang: Python
|
|
1832
1835
|
label: Python
|
|
1833
1836
|
source: |
|
|
1834
|
-
|
|
1837
|
+
# pip install addresszen
|
|
1838
|
+
from addresszen import AddressZen
|
|
1835
1839
|
|
|
1836
|
-
|
|
1837
|
-
"
|
|
1838
|
-
params={
|
|
1839
|
-
"user_token": "uk_secret",
|
|
1840
|
-
},
|
|
1841
|
-
)
|
|
1842
|
-
result = response.json()["result"]
|
|
1840
|
+
with AddressZen("ak_test") as client:
|
|
1841
|
+
result = client.retrieve_licensee("ak_test", "sl_ijoiqsxeQgXW2gkiE0X94", user_token="uk_secret")
|
|
1843
1842
|
- lang: Ruby
|
|
1844
1843
|
label: Ruby
|
|
1845
1844
|
source: |
|
|
@@ -1918,19 +1917,22 @@ paths:
|
|
|
1918
1917
|
- lang: JavaScript
|
|
1919
1918
|
label: JavaScript
|
|
1920
1919
|
source: |
|
|
1921
|
-
|
|
1922
|
-
|
|
1920
|
+
import { createZenClient, deleteLicensee } from '@addresszen/sdk';
|
|
1921
|
+
|
|
1922
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
1923
|
+
|
|
1924
|
+
const { data } = await deleteLicensee({
|
|
1925
|
+
client,
|
|
1926
|
+
path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },
|
|
1923
1927
|
});
|
|
1924
1928
|
- lang: Python
|
|
1925
1929
|
label: Python
|
|
1926
1930
|
source: |
|
|
1927
|
-
|
|
1931
|
+
# pip install addresszen
|
|
1932
|
+
from addresszen import AddressZen
|
|
1928
1933
|
|
|
1929
|
-
|
|
1930
|
-
"
|
|
1931
|
-
params={"user_token": "uk_secret"},
|
|
1932
|
-
)
|
|
1933
|
-
response.raise_for_status()
|
|
1934
|
+
with AddressZen("ak_test") as client:
|
|
1935
|
+
result = client.delete_licensee("ak_test", "sl_ijoiqsxeQgXW2gkiE0X94", user_token="uk_secret")
|
|
1934
1936
|
- lang: Ruby
|
|
1935
1937
|
label: Ruby
|
|
1936
1938
|
source: |
|
|
@@ -1995,32 +1997,32 @@ paths:
|
|
|
1995
1997
|
- lang: JavaScript
|
|
1996
1998
|
label: JavaScript
|
|
1997
1999
|
source: |
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2000
|
+
import { createZenClient, updateLicensee } from '@addresszen/sdk';
|
|
2001
|
+
|
|
2002
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
2003
|
+
|
|
2004
|
+
const { data } = await updateLicensee({
|
|
2005
|
+
client,
|
|
2006
|
+
path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },
|
|
2007
|
+
body: {
|
|
2002
2008
|
daily: {
|
|
2003
2009
|
limit: 20000,
|
|
2004
2010
|
},
|
|
2005
|
-
}
|
|
2011
|
+
},
|
|
2006
2012
|
});
|
|
2007
|
-
|
|
2008
|
-
const { result } = await response.json();
|
|
2009
2013
|
- lang: Python
|
|
2010
2014
|
label: Python
|
|
2011
2015
|
source: |
|
|
2012
|
-
|
|
2016
|
+
# pip install addresszen
|
|
2017
|
+
from addresszen import AddressZen
|
|
2013
2018
|
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
"
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
},
|
|
2022
|
-
)
|
|
2023
|
-
result = response.json()["result"]
|
|
2019
|
+
with AddressZen("ak_test") as client:
|
|
2020
|
+
result = client.update_licensee(
|
|
2021
|
+
"ak_test",
|
|
2022
|
+
"sl_ijoiqsxeQgXW2gkiE0X94",
|
|
2023
|
+
user_token="uk_secret",
|
|
2024
|
+
daily={"limit": 20000},
|
|
2025
|
+
)
|
|
2024
2026
|
- lang: Ruby
|
|
2025
2027
|
label: Ruby
|
|
2026
2028
|
source: |
|
|
@@ -2077,6 +2079,49 @@ paths:
|
|
|
2077
2079
|
application/json:
|
|
2078
2080
|
schema:
|
|
2079
2081
|
$ref: '#/components/schemas/ErrorResponse'
|
|
2082
|
+
x-codeSamples:
|
|
2083
|
+
- lang: cURL
|
|
2084
|
+
label: curl
|
|
2085
|
+
source: |
|
|
2086
|
+
curl -X POST 'https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94/regenerate-key?user_token=uk_secret'
|
|
2087
|
+
- lang: JavaScript
|
|
2088
|
+
label: JavaScript
|
|
2089
|
+
source: |
|
|
2090
|
+
import { createZenClient, regenerateLicenseeKey } from '@addresszen/sdk';
|
|
2091
|
+
|
|
2092
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
2093
|
+
|
|
2094
|
+
const { data } = await regenerateLicenseeKey({
|
|
2095
|
+
client,
|
|
2096
|
+
path: { key: 'ak_test', licensee: 'sl_ijoiqsxeQgXW2gkiE0X94' },
|
|
2097
|
+
});
|
|
2098
|
+
- lang: Python
|
|
2099
|
+
label: Python
|
|
2100
|
+
source: |
|
|
2101
|
+
# pip install addresszen
|
|
2102
|
+
from addresszen import AddressZen
|
|
2103
|
+
|
|
2104
|
+
with AddressZen("ak_test") as client:
|
|
2105
|
+
result = client.regenerate_licensee_key("ak_test", "sl_ijoiqsxeQgXW2gkiE0X94", user_token="uk_secret")
|
|
2106
|
+
- lang: Ruby
|
|
2107
|
+
label: Ruby
|
|
2108
|
+
source: |
|
|
2109
|
+
require "net/http"
|
|
2110
|
+
require "json"
|
|
2111
|
+
|
|
2112
|
+
uri = URI("https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94/regenerate-key?user_token=uk_secret")
|
|
2113
|
+
response = Net::HTTP.post(uri, "")
|
|
2114
|
+
result = JSON.parse(response.body)["result"]
|
|
2115
|
+
- lang: PHP
|
|
2116
|
+
label: PHP
|
|
2117
|
+
source: |
|
|
2118
|
+
<?php
|
|
2119
|
+
$ch = curl_init("https://api.addresszen.com/v1/keys/ak_test/licensees/sl_ijoiqsxeQgXW2gkiE0X94/regenerate-key?user_token=uk_secret");
|
|
2120
|
+
curl_setopt_array($ch, [
|
|
2121
|
+
CURLOPT_POST => true,
|
|
2122
|
+
CURLOPT_RETURNTRANSFER => true,
|
|
2123
|
+
]);
|
|
2124
|
+
$result = json_decode(curl_exec($ch), true)["result"];
|
|
2080
2125
|
/keys/{key}/configs:
|
|
2081
2126
|
get:
|
|
2082
2127
|
tags:
|
|
@@ -2115,26 +2160,22 @@ paths:
|
|
|
2115
2160
|
- lang: JavaScript
|
|
2116
2161
|
label: JavaScript
|
|
2117
2162
|
source: |
|
|
2118
|
-
|
|
2119
|
-
'https://api.addresszen.com/v1/keys/ak_test/configs?' +
|
|
2120
|
-
new URLSearchParams({
|
|
2121
|
-
user_token: 'uk_secret',
|
|
2122
|
-
})
|
|
2123
|
-
);
|
|
2163
|
+
import { createZenClient, listConfigs } from '@addresszen/sdk';
|
|
2124
2164
|
|
|
2125
|
-
const {
|
|
2165
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
2166
|
+
|
|
2167
|
+
const { data } = await listConfigs({
|
|
2168
|
+
client,
|
|
2169
|
+
path: { key: 'ak_test' },
|
|
2170
|
+
});
|
|
2126
2171
|
- lang: Python
|
|
2127
2172
|
label: Python
|
|
2128
2173
|
source: |
|
|
2129
|
-
|
|
2174
|
+
# pip install addresszen
|
|
2175
|
+
from addresszen import AddressZen
|
|
2130
2176
|
|
|
2131
|
-
|
|
2132
|
-
"
|
|
2133
|
-
params={
|
|
2134
|
-
"user_token": "uk_secret",
|
|
2135
|
-
},
|
|
2136
|
-
)
|
|
2137
|
-
result = response.json()["result"]
|
|
2177
|
+
with AddressZen("ak_test") as client:
|
|
2178
|
+
result = client.list_configs("ak_test", user_token="uk_secret")
|
|
2138
2179
|
- lang: Ruby
|
|
2139
2180
|
label: Ruby
|
|
2140
2181
|
source: |
|
|
@@ -2198,30 +2239,33 @@ paths:
|
|
|
2198
2239
|
- lang: JavaScript
|
|
2199
2240
|
label: JavaScript
|
|
2200
2241
|
source: |
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2242
|
+
import { createZenClient, createConfig } from '@addresszen/sdk';
|
|
2243
|
+
|
|
2244
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
2245
|
+
|
|
2246
|
+
const { data } = await createConfig({
|
|
2247
|
+
client,
|
|
2248
|
+
path: { key: 'ak_test' },
|
|
2249
|
+
body: {
|
|
2205
2250
|
name: 'woocommerce',
|
|
2206
2251
|
payload: '{"removeOrganisation": false}',
|
|
2207
|
-
}
|
|
2252
|
+
},
|
|
2208
2253
|
});
|
|
2209
|
-
|
|
2210
|
-
const { result } = await response.json();
|
|
2211
2254
|
- lang: Python
|
|
2212
2255
|
label: Python
|
|
2213
2256
|
source: |
|
|
2214
|
-
|
|
2257
|
+
# pip install addresszen
|
|
2258
|
+
import json
|
|
2215
2259
|
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
"
|
|
2221
|
-
"
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2260
|
+
from addresszen import AddressZen
|
|
2261
|
+
|
|
2262
|
+
with AddressZen("ak_test") as client:
|
|
2263
|
+
result = client.create_config(
|
|
2264
|
+
"ak_test",
|
|
2265
|
+
user_token="uk_secret",
|
|
2266
|
+
name="woocommerce",
|
|
2267
|
+
payload=json.dumps({"removeOrganisation": False}),
|
|
2268
|
+
)
|
|
2225
2269
|
- lang: Ruby
|
|
2226
2270
|
label: Ruby
|
|
2227
2271
|
source: |
|
|
@@ -2293,26 +2337,22 @@ paths:
|
|
|
2293
2337
|
- lang: JavaScript
|
|
2294
2338
|
label: JavaScript
|
|
2295
2339
|
source: |
|
|
2296
|
-
|
|
2297
|
-
'https://api.addresszen.com/v1/keys/ak_test/configs/woocommerce?' +
|
|
2298
|
-
new URLSearchParams({
|
|
2299
|
-
user_token: 'uk_secret',
|
|
2300
|
-
})
|
|
2301
|
-
);
|
|
2340
|
+
import { createZenClient, retrieveConfig } from '@addresszen/sdk';
|
|
2302
2341
|
|
|
2303
|
-
const
|
|
2342
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
2343
|
+
|
|
2344
|
+
const { data } = await retrieveConfig({
|
|
2345
|
+
client,
|
|
2346
|
+
path: { key: 'ak_test', config: 'woocommerce' },
|
|
2347
|
+
});
|
|
2304
2348
|
- lang: Python
|
|
2305
2349
|
label: Python
|
|
2306
2350
|
source: |
|
|
2307
|
-
|
|
2351
|
+
# pip install addresszen
|
|
2352
|
+
from addresszen import AddressZen
|
|
2308
2353
|
|
|
2309
|
-
|
|
2310
|
-
"
|
|
2311
|
-
params={
|
|
2312
|
-
"user_token": "uk_secret",
|
|
2313
|
-
},
|
|
2314
|
-
)
|
|
2315
|
-
result = response.json()["result"]
|
|
2354
|
+
with AddressZen("ak_test") as client:
|
|
2355
|
+
result = client.retrieve_config("ak_test", "woocommerce")
|
|
2316
2356
|
- lang: Ruby
|
|
2317
2357
|
label: Ruby
|
|
2318
2358
|
source: |
|
|
@@ -2397,19 +2437,22 @@ paths:
|
|
|
2397
2437
|
- lang: JavaScript
|
|
2398
2438
|
label: JavaScript
|
|
2399
2439
|
source: |
|
|
2400
|
-
|
|
2401
|
-
|
|
2440
|
+
import { createZenClient, deleteConfig } from '@addresszen/sdk';
|
|
2441
|
+
|
|
2442
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
2443
|
+
|
|
2444
|
+
const { data } = await deleteConfig({
|
|
2445
|
+
client,
|
|
2446
|
+
path: { key: 'ak_test', config: 'woocommerce' },
|
|
2402
2447
|
});
|
|
2403
2448
|
- lang: Python
|
|
2404
2449
|
label: Python
|
|
2405
2450
|
source: |
|
|
2406
|
-
|
|
2451
|
+
# pip install addresszen
|
|
2452
|
+
from addresszen import AddressZen
|
|
2407
2453
|
|
|
2408
|
-
|
|
2409
|
-
"
|
|
2410
|
-
params={"user_token": "uk_secret"},
|
|
2411
|
-
)
|
|
2412
|
-
response.raise_for_status()
|
|
2454
|
+
with AddressZen("ak_test") as client:
|
|
2455
|
+
result = client.delete_config("ak_test", "woocommerce", user_token="uk_secret")
|
|
2413
2456
|
- lang: Ruby
|
|
2414
2457
|
label: Ruby
|
|
2415
2458
|
source: |
|
|
@@ -2478,28 +2521,32 @@ paths:
|
|
|
2478
2521
|
- lang: JavaScript
|
|
2479
2522
|
label: JavaScript
|
|
2480
2523
|
source: |
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2524
|
+
import { createZenClient, updateConfig } from '@addresszen/sdk';
|
|
2525
|
+
|
|
2526
|
+
const client = createZenClient({ apiKey: 'ak_test', userToken: 'uk_secret' });
|
|
2527
|
+
|
|
2528
|
+
const { data } = await updateConfig({
|
|
2529
|
+
client,
|
|
2530
|
+
path: { key: 'ak_test', config: 'woocommerce' },
|
|
2531
|
+
body: {
|
|
2485
2532
|
payload: '{"removeOrganisation": true}',
|
|
2486
|
-
}
|
|
2533
|
+
},
|
|
2487
2534
|
});
|
|
2488
|
-
|
|
2489
|
-
const { result } = await response.json();
|
|
2490
2535
|
- lang: Python
|
|
2491
2536
|
label: Python
|
|
2492
2537
|
source: |
|
|
2493
|
-
|
|
2538
|
+
# pip install addresszen
|
|
2539
|
+
import json
|
|
2494
2540
|
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
"
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2541
|
+
from addresszen import AddressZen
|
|
2542
|
+
|
|
2543
|
+
with AddressZen("ak_test") as client:
|
|
2544
|
+
result = client.update_config(
|
|
2545
|
+
"ak_test",
|
|
2546
|
+
"woocommerce",
|
|
2547
|
+
user_token="uk_secret",
|
|
2548
|
+
payload=json.dumps({"removeOrganisation": True}),
|
|
2549
|
+
)
|
|
2503
2550
|
- lang: Ruby
|
|
2504
2551
|
label: Ruby
|
|
2505
2552
|
source: |
|
|
@@ -2592,28 +2639,22 @@ paths:
|
|
|
2592
2639
|
- lang: JavaScript
|
|
2593
2640
|
label: JavaScript
|
|
2594
2641
|
source: |
|
|
2595
|
-
|
|
2596
|
-
'https://api.addresszen.com/v1/emails?' +
|
|
2597
|
-
new URLSearchParams({
|
|
2598
|
-
api_key: 'ak_test',
|
|
2599
|
-
query: 'foo@domain.com',
|
|
2600
|
-
})
|
|
2601
|
-
);
|
|
2642
|
+
import { createZenClient, emailValidation } from '@addresszen/sdk';
|
|
2602
2643
|
|
|
2603
|
-
const
|
|
2644
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
2645
|
+
|
|
2646
|
+
const { data } = await emailValidation({
|
|
2647
|
+
client,
|
|
2648
|
+
query: { query: 'foo@domain.com' },
|
|
2649
|
+
});
|
|
2604
2650
|
- lang: Python
|
|
2605
2651
|
label: Python
|
|
2606
2652
|
source: |
|
|
2607
|
-
|
|
2653
|
+
# pip install addresszen
|
|
2654
|
+
from addresszen import AddressZen
|
|
2608
2655
|
|
|
2609
|
-
|
|
2610
|
-
"
|
|
2611
|
-
params={
|
|
2612
|
-
"api_key": "ak_test",
|
|
2613
|
-
"query": "foo@domain.com",
|
|
2614
|
-
},
|
|
2615
|
-
)
|
|
2616
|
-
result = response.json()["result"]
|
|
2656
|
+
with AddressZen("ak_test") as client:
|
|
2657
|
+
result = client.email_validation(query="foo@domain.com")
|
|
2617
2658
|
- lang: Ruby
|
|
2618
2659
|
label: Ruby
|
|
2619
2660
|
source: |
|
|
@@ -2723,28 +2764,22 @@ paths:
|
|
|
2723
2764
|
- lang: JavaScript
|
|
2724
2765
|
label: JavaScript
|
|
2725
2766
|
source: |
|
|
2726
|
-
|
|
2727
|
-
'https://api.addresszen.com/v1/phone_numbers?' +
|
|
2728
|
-
new URLSearchParams({
|
|
2729
|
-
api_key: 'ak_test',
|
|
2730
|
-
query: '02071128019',
|
|
2731
|
-
})
|
|
2732
|
-
);
|
|
2767
|
+
import { createZenClient, phoneNumberValidation } from '@addresszen/sdk';
|
|
2733
2768
|
|
|
2734
|
-
const
|
|
2769
|
+
const client = createZenClient({ apiKey: 'ak_test' });
|
|
2770
|
+
|
|
2771
|
+
const { data } = await phoneNumberValidation({
|
|
2772
|
+
client,
|
|
2773
|
+
query: { query: '02071128019' },
|
|
2774
|
+
});
|
|
2735
2775
|
- lang: Python
|
|
2736
2776
|
label: Python
|
|
2737
2777
|
source: |
|
|
2738
|
-
|
|
2778
|
+
# pip install addresszen
|
|
2779
|
+
from addresszen import AddressZen
|
|
2739
2780
|
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
params={
|
|
2743
|
-
"api_key": "ak_test",
|
|
2744
|
-
"query": "02071128019",
|
|
2745
|
-
},
|
|
2746
|
-
)
|
|
2747
|
-
result = response.json()["result"]
|
|
2781
|
+
with AddressZen("ak_test") as client:
|
|
2782
|
+
result = client.phone_number_validation(query="02071128019")
|
|
2748
2783
|
- lang: Ruby
|
|
2749
2784
|
label: Ruby
|
|
2750
2785
|
source: |
|
|
@@ -2994,13 +3029,13 @@ paths:
|
|
|
2994
3029
|
properties:
|
|
2995
3030
|
user_token:
|
|
2996
3031
|
type: string
|
|
2997
|
-
description: User-level token used to manage account resources via the
|
|
3032
|
+
description: User-level token used to manage account resources via the API.
|
|
2998
3033
|
test_api_key:
|
|
2999
3034
|
type: string
|
|
3000
3035
|
description: Initial test API key for the account.
|
|
3001
3036
|
user_id:
|
|
3002
3037
|
type: string
|
|
3003
|
-
description: Internal
|
|
3038
|
+
description: Internal API user id.
|
|
3004
3039
|
'202':
|
|
3005
3040
|
description: Pending, keep polling
|
|
3006
3041
|
content:
|
|
@@ -3117,7 +3152,7 @@ components:
|
|
|
3117
3152
|
description: |
|
|
3118
3153
|
**API Key**
|
|
3119
3154
|
|
|
3120
|
-
The API Key
|
|
3155
|
+
The API Key. Begins `ak_`.
|
|
3121
3156
|
UserTokenParam:
|
|
3122
3157
|
in: query
|
|
3123
3158
|
style: form
|
|
@@ -3132,7 +3167,7 @@ components:
|
|
|
3132
3167
|
|
|
3133
3168
|
Your management key can be retrieved and managed from your [accounts page](https://addresszen.com/account).
|
|
3134
3169
|
|
|
3135
|
-
Typically begins `uk_
|
|
3170
|
+
Typically begins `uk_`. Prefer sending it in the `Authorization` header as `Bearer uk_...` instead of this query parameter. The `Authorization: user_token="uk_..."` header also works.
|
|
3136
3171
|
example: uk_B59ScW1p1HHouf1VqclEPZUx
|
|
3137
3172
|
StartParam:
|
|
3138
3173
|
name: start
|
|
@@ -3620,7 +3655,7 @@ components:
|
|
|
3620
3655
|
- Daily limit has been reached on the key
|
|
3621
3656
|
- Daily individual limit has been reached
|
|
3622
3657
|
- Key is not being used via an authorised URL
|
|
3623
|
-
- (Sublicensed key only) Key has
|
|
3658
|
+
- (Sublicensed key only) Key has no valid licensee attached
|
|
3624
3659
|
- (Sublicensed key only) Key is not being used via an authorised URL specified by licensee
|
|
3625
3660
|
type: boolean
|
|
3626
3661
|
example: true
|
|
@@ -4114,7 +4149,7 @@ components:
|
|
|
4114
4149
|
nullable: true
|
|
4115
4150
|
type: integer
|
|
4116
4151
|
description: |-
|
|
4117
|
-
`number` or `null
|
|
4152
|
+
`number` or `null`. Limit set on the number of lookups that can be
|
|
4118
4153
|
performed from a single IP address. `null` means the limit is currently
|
|
4119
4154
|
disabled.
|
|
4120
4155
|
format: int32
|
|
@@ -4173,7 +4208,7 @@ components:
|
|
|
4173
4208
|
description: Accept IP addresses forwarded in the `AZ-Source-IP` header
|
|
4174
4209
|
datasets:
|
|
4175
4210
|
title: API Key Dataset Availability
|
|
4176
|
-
description:
|
|
4211
|
+
description: 'Datasets you can switch on or off for this key. Datasets set by your plan (`paf`, `mr`, `nyb`, `ecad`, `ecaf`) cannot be changed here: sending one with a different value returns a 400.'
|
|
4177
4212
|
type: object
|
|
4178
4213
|
properties:
|
|
4179
4214
|
pafa:
|
|
@@ -4441,7 +4476,7 @@ components:
|
|
|
4441
4476
|
check_digit:
|
|
4442
4477
|
type: string
|
|
4443
4478
|
description: |
|
|
4444
|
-
Character following the 5 or 9
|
|
4479
|
+
Character following the 5-digit or 9-digit ZIP Code. Part of the 11-digit barcode
|
|
4445
4480
|
city:
|
|
4446
4481
|
type: string
|
|
4447
4482
|
description: |
|
|
@@ -4457,7 +4492,7 @@ components:
|
|
|
4457
4492
|
country_code:
|
|
4458
4493
|
type: string
|
|
4459
4494
|
description: |
|
|
4460
|
-
|
|
4495
|
+
ISO 3166 country code. Empty string if not present
|
|
4461
4496
|
county:
|
|
4462
4497
|
type: string
|
|
4463
4498
|
description: |
|
|
@@ -4629,7 +4664,7 @@ components:
|
|
|
4629
4664
|
parsed_pmb_number:
|
|
4630
4665
|
type: string
|
|
4631
4666
|
description: |
|
|
4632
|
-
|
|
4667
|
+
Private Mail Box (PMB) number, if one is found in an address. Empty string if not present
|
|
4633
4668
|
parsed_post_directional:
|
|
4634
4669
|
type: string
|
|
4635
4670
|
description: |
|
|
@@ -4748,208 +4783,10 @@ components:
|
|
|
4748
4783
|
time_zone: MST
|
|
4749
4784
|
urbanization: ''
|
|
4750
4785
|
zip_code: 88310-5631
|
|
4751
|
-
|
|
4752
|
-
title: Address
|
|
4753
|
-
type:
|
|
4754
|
-
|
|
4755
|
-
- query
|
|
4756
|
-
- query_city
|
|
4757
|
-
- query_state
|
|
4758
|
-
- query_zip_code
|
|
4759
|
-
- match
|
|
4760
|
-
- count
|
|
4761
|
-
- fit
|
|
4762
|
-
- confidence
|
|
4763
|
-
- match_information
|
|
4764
|
-
- address_line_one
|
|
4765
|
-
- address_line_two
|
|
4766
|
-
- city
|
|
4767
|
-
- state
|
|
4768
|
-
- zip_code
|
|
4769
|
-
- country_iso_2
|
|
4770
|
-
properties:
|
|
4771
|
-
query:
|
|
4772
|
-
type: string
|
|
4773
|
-
description: Submitted query
|
|
4774
|
-
query_city:
|
|
4775
|
-
type: string
|
|
4776
|
-
description: Submitted city
|
|
4777
|
-
query_state:
|
|
4778
|
-
type: string
|
|
4779
|
-
description: Submitted state
|
|
4780
|
-
query_zip_code:
|
|
4781
|
-
type: string
|
|
4782
|
-
description: Submitted zip_code
|
|
4783
|
-
match:
|
|
4784
|
-
description: Nearest matching address
|
|
4785
|
-
allOf:
|
|
4786
|
-
- $ref: '#/components/schemas/UsaCassVerifiedAddress'
|
|
4787
|
-
count:
|
|
4788
|
-
type: number
|
|
4789
|
-
description: |
|
|
4790
|
-
The number of addresses we matched to the input. We return the closest match by default.
|
|
4791
|
-
maximum: 10
|
|
4792
|
-
minimum: 0
|
|
4793
|
-
fit:
|
|
4794
|
-
type: number
|
|
4795
|
-
description: |
|
|
4796
|
-
A score represented as number between 1 and 0. Fit compares the address elements present in your query against the matching address elements. It does not incorporate elements you have not presented in the score. A partial address (e.g. 123 Main St) will have a fit of 1 even though it is missing city and zip code. Its confidence score will be less than 1 however because it is missing some crucial elements.
|
|
4797
|
-
maximum: 1
|
|
4798
|
-
minimum: 0
|
|
4799
|
-
confidence:
|
|
4800
|
-
type: number
|
|
4801
|
-
maximum: 1
|
|
4802
|
-
minimum: 0
|
|
4803
|
-
description: |
|
|
4804
|
-
A confidence score represented as number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.
|
|
4805
|
-
match_information:
|
|
4806
|
-
type: string
|
|
4807
|
-
description: |
|
|
4808
|
-
Additional information about the match.
|
|
4809
|
-
|
|
4810
|
-
This information is for human consumption and may not be present in all responses.
|
|
4811
|
-
example: Single Response - The delivery address was found in the National Database and no further information was required.
|
|
4812
|
-
address_line_one:
|
|
4813
|
-
type: string
|
|
4814
|
-
description: |
|
|
4815
|
-
Primary delivery address
|
|
4816
|
-
example: 123 Main St
|
|
4817
|
-
address_line_two:
|
|
4818
|
-
type: string
|
|
4819
|
-
description: |
|
|
4820
|
-
Secondary address information
|
|
4821
|
-
example: ''
|
|
4822
|
-
city:
|
|
4823
|
-
type: string
|
|
4824
|
-
description: |
|
|
4825
|
-
City name
|
|
4826
|
-
example: Springfield
|
|
4827
|
-
state:
|
|
4828
|
-
type: string
|
|
4829
|
-
description: |
|
|
4830
|
-
State name
|
|
4831
|
-
example: CO
|
|
4832
|
-
zip_code:
|
|
4833
|
-
type: string
|
|
4834
|
-
description: |
|
|
4835
|
-
Zip code
|
|
4836
|
-
example: 81073-1119
|
|
4837
|
-
country_iso_2:
|
|
4838
|
-
type: string
|
|
4839
|
-
description: |
|
|
4840
|
-
2 letter ISO country code
|
|
4841
|
-
example: US
|
|
4842
|
-
UsaVerifyNoMatch:
|
|
4843
|
-
type: object
|
|
4844
|
-
title: No Address Match
|
|
4845
|
-
required:
|
|
4846
|
-
- query
|
|
4847
|
-
- query_city
|
|
4848
|
-
- query_state
|
|
4849
|
-
- query_zip_code
|
|
4850
|
-
- match
|
|
4851
|
-
- count
|
|
4852
|
-
- fit
|
|
4853
|
-
- confidence
|
|
4854
|
-
- address_line_one
|
|
4855
|
-
- address_line_two
|
|
4856
|
-
- city
|
|
4857
|
-
- state
|
|
4858
|
-
- zip_code
|
|
4859
|
-
- country_iso_2
|
|
4860
|
-
properties:
|
|
4861
|
-
query:
|
|
4862
|
-
type: string
|
|
4863
|
-
description: Originally submitted query
|
|
4864
|
-
query_city:
|
|
4865
|
-
type: string
|
|
4866
|
-
description: Originally submitted city
|
|
4867
|
-
query_state:
|
|
4868
|
-
type: string
|
|
4869
|
-
description: Originally submitted state
|
|
4870
|
-
query_zip_code:
|
|
4871
|
-
type: string
|
|
4872
|
-
description: Originally submitted zip_code
|
|
4873
|
-
match:
|
|
4874
|
-
description: Nearest matching address
|
|
4875
|
-
type: object
|
|
4876
|
-
nullable: true
|
|
4877
|
-
enum:
|
|
4878
|
-
- null
|
|
4879
|
-
count:
|
|
4880
|
-
type: number
|
|
4881
|
-
description: ''
|
|
4882
|
-
enum:
|
|
4883
|
-
- 0
|
|
4884
|
-
fit:
|
|
4885
|
-
type: number
|
|
4886
|
-
format: float
|
|
4887
|
-
description: ''
|
|
4888
|
-
enum:
|
|
4889
|
-
- 0
|
|
4890
|
-
confidence:
|
|
4891
|
-
type: number
|
|
4892
|
-
format: float
|
|
4893
|
-
description: ''
|
|
4894
|
-
enum:
|
|
4895
|
-
- 0
|
|
4896
|
-
address_line_one:
|
|
4897
|
-
type: string
|
|
4898
|
-
description: |
|
|
4899
|
-
Empty if no match
|
|
4900
|
-
enum:
|
|
4901
|
-
- ''
|
|
4902
|
-
address_line_two:
|
|
4903
|
-
type: string
|
|
4904
|
-
description: |
|
|
4905
|
-
Empty if no match
|
|
4906
|
-
enum:
|
|
4907
|
-
- ''
|
|
4908
|
-
city:
|
|
4909
|
-
type: string
|
|
4910
|
-
description: |
|
|
4911
|
-
Empty if no match
|
|
4912
|
-
enum:
|
|
4913
|
-
- ''
|
|
4914
|
-
state:
|
|
4915
|
-
type: string
|
|
4916
|
-
description: |
|
|
4917
|
-
Empty if no match
|
|
4918
|
-
enum:
|
|
4919
|
-
- ''
|
|
4920
|
-
zip_code:
|
|
4921
|
-
type: string
|
|
4922
|
-
description: |
|
|
4923
|
-
Empty if no match
|
|
4924
|
-
enum:
|
|
4925
|
-
- ''
|
|
4926
|
-
country_iso_2:
|
|
4927
|
-
type: string
|
|
4928
|
-
description: |
|
|
4929
|
-
Empty if no match
|
|
4930
|
-
enum:
|
|
4931
|
-
- ''
|
|
4932
|
-
VerifyResponse:
|
|
4933
|
-
title: Address Verify Response
|
|
4934
|
-
type: object
|
|
4935
|
-
required:
|
|
4936
|
-
- message
|
|
4937
|
-
- code
|
|
4938
|
-
- result
|
|
4939
|
-
properties:
|
|
4940
|
-
code:
|
|
4941
|
-
type: integer
|
|
4942
|
-
format: int32
|
|
4943
|
-
enum:
|
|
4944
|
-
- 2000
|
|
4945
|
-
message:
|
|
4946
|
-
type: string
|
|
4947
|
-
enum:
|
|
4948
|
-
- Success
|
|
4949
|
-
result:
|
|
4950
|
-
oneOf:
|
|
4951
|
-
- $ref: '#/components/schemas/UsaVerifyMatch'
|
|
4952
|
-
- $ref: '#/components/schemas/UsaVerifyNoMatch'
|
|
4786
|
+
ID:
|
|
4787
|
+
title: Address Identifier
|
|
4788
|
+
type: string
|
|
4789
|
+
description: Globally unique internally generated identifier for an address
|
|
4953
4790
|
Dataset:
|
|
4954
4791
|
title: Dataset
|
|
4955
4792
|
type: string
|
|
@@ -4988,61 +4825,8 @@ components:
|
|
|
4988
4825
|
- bev
|
|
4989
4826
|
- ban
|
|
4990
4827
|
- swt
|
|
4991
|
-
|
|
4992
|
-
title:
|
|
4993
|
-
type: string
|
|
4994
|
-
description: Global unique internally generated identifier for an address
|
|
4995
|
-
AddressSuggestion:
|
|
4996
|
-
title: Address Suggestion
|
|
4997
|
-
description: Represents an address suggestion for any address in the world
|
|
4998
|
-
type: object
|
|
4999
|
-
required:
|
|
5000
|
-
- id
|
|
5001
|
-
- suggestion
|
|
5002
|
-
- urls
|
|
5003
|
-
example:
|
|
5004
|
-
id: usps_V210079628|10||3797
|
|
5005
|
-
suggestion: 10 Downing St, Montpelier, VT, 05602
|
|
5006
|
-
urls: {}
|
|
5007
|
-
properties:
|
|
5008
|
-
id:
|
|
5009
|
-
$ref: '#/components/schemas/ID'
|
|
5010
|
-
suggestion:
|
|
5011
|
-
type: string
|
|
5012
|
-
description: Address Suggestion to be displayed to the user
|
|
5013
|
-
urls:
|
|
5014
|
-
title: URLs
|
|
5015
|
-
type: object
|
|
5016
|
-
description: Always an empty object (`{}`). Retrieve the full address with `id`
|
|
5017
|
-
additionalProperties: false
|
|
5018
|
-
AutocompleteResponse:
|
|
5019
|
-
title: Address Autocomplete Response
|
|
5020
|
-
type: object
|
|
5021
|
-
required:
|
|
5022
|
-
- message
|
|
5023
|
-
- code
|
|
5024
|
-
- result
|
|
5025
|
-
properties:
|
|
5026
|
-
result:
|
|
5027
|
-
type: object
|
|
5028
|
-
required:
|
|
5029
|
-
- hits
|
|
5030
|
-
properties:
|
|
5031
|
-
hits:
|
|
5032
|
-
type: array
|
|
5033
|
-
items:
|
|
5034
|
-
$ref: '#/components/schemas/AddressSuggestion'
|
|
5035
|
-
code:
|
|
5036
|
-
type: integer
|
|
5037
|
-
format: int32
|
|
5038
|
-
enum:
|
|
5039
|
-
- 2000
|
|
5040
|
-
message:
|
|
5041
|
-
type: string
|
|
5042
|
-
enum:
|
|
5043
|
-
- Success
|
|
5044
|
-
CountryISO:
|
|
5045
|
-
title: ISO Country Code (3)
|
|
4828
|
+
CountryISO:
|
|
4829
|
+
title: ISO Country Code (3)
|
|
5046
4830
|
type: string
|
|
5047
4831
|
description: |2
|
|
5048
4832
|
3 letter country code (ISO 3166-1)
|
|
@@ -14757,11 +14541,11 @@ components:
|
|
|
14757
14541
|
secondary_number:
|
|
14758
14542
|
title: Secondary Number
|
|
14759
14543
|
type: string
|
|
14760
|
-
description: Number of the
|
|
14544
|
+
description: Number of the subunit, apartment, suite etc.
|
|
14761
14545
|
plus_4_code:
|
|
14762
14546
|
title: Plus 4 Code
|
|
14763
14547
|
type: string
|
|
14764
|
-
description: 4
|
|
14548
|
+
description: 4-digit ZIP add-on code. USPS addresses only.
|
|
14765
14549
|
line_1:
|
|
14766
14550
|
title: First Address Line
|
|
14767
14551
|
type: string
|
|
@@ -14777,7 +14561,7 @@ components:
|
|
|
14777
14561
|
zip_code:
|
|
14778
14562
|
title: ZIP Code
|
|
14779
14563
|
type: string
|
|
14780
|
-
description: Postal code identifying the delivery area. For US addresses this is the 5
|
|
14564
|
+
description: Postal code identifying the delivery area. For US addresses this is the 5-digit ZIP Code.
|
|
14781
14565
|
zip_plus_4_code:
|
|
14782
14566
|
title: ZIP + 4 Code
|
|
14783
14567
|
type: string
|
|
@@ -14812,7 +14596,7 @@ components:
|
|
|
14812
14596
|
title: Carrier Route ID
|
|
14813
14597
|
type: string
|
|
14814
14598
|
description: |-
|
|
14815
|
-
A 4
|
|
14599
|
+
A 4-character ID identifying the USPS postal route for the address. The first character indicates the route type:
|
|
14816
14600
|
|
|
14817
14601
|
- "B" indicates PO Box
|
|
14818
14602
|
- "H" indicates highway
|
|
@@ -14892,7 +14676,7 @@ components:
|
|
|
14892
14676
|
state_abbreviation:
|
|
14893
14677
|
title: State Abbreviation
|
|
14894
14678
|
type: string
|
|
14895
|
-
description: Abbreviated name of the state, province or region. For US addresses this is the 2
|
|
14679
|
+
description: Abbreviated name of the state, province or region. For US addresses this is the 2-character state, territory or armed forces designation ("AA", "AE" or "AP" for APO/FPO/DPO).
|
|
14896
14680
|
state:
|
|
14897
14681
|
title: State
|
|
14898
14682
|
type: string
|
|
@@ -15042,6 +14826,267 @@ components:
|
|
|
15042
14826
|
finance_number: 353910
|
|
15043
14827
|
congressional_district_number: 2
|
|
15044
14828
|
county_number: 103
|
|
14829
|
+
UsaVerifyMatch:
|
|
14830
|
+
title: Address Match
|
|
14831
|
+
type: object
|
|
14832
|
+
required:
|
|
14833
|
+
- query
|
|
14834
|
+
- query_city
|
|
14835
|
+
- query_state
|
|
14836
|
+
- query_zip_code
|
|
14837
|
+
- match
|
|
14838
|
+
- count
|
|
14839
|
+
- fit
|
|
14840
|
+
- confidence
|
|
14841
|
+
- match_information
|
|
14842
|
+
- address_line_one
|
|
14843
|
+
- address_line_two
|
|
14844
|
+
- city
|
|
14845
|
+
- state
|
|
14846
|
+
- zip_code
|
|
14847
|
+
- country_iso_2
|
|
14848
|
+
properties:
|
|
14849
|
+
query:
|
|
14850
|
+
type: string
|
|
14851
|
+
description: Submitted query
|
|
14852
|
+
query_city:
|
|
14853
|
+
type: string
|
|
14854
|
+
description: Submitted city
|
|
14855
|
+
query_state:
|
|
14856
|
+
type: string
|
|
14857
|
+
description: Submitted state
|
|
14858
|
+
query_zip_code:
|
|
14859
|
+
type: string
|
|
14860
|
+
description: Submitted zip_code
|
|
14861
|
+
match:
|
|
14862
|
+
description: |
|
|
14863
|
+
Nearest matching address. A CASS verified address in the United States. Elsewhere, the address in the same format Retrieve Address returns, with the raw dataset record in `native`
|
|
14864
|
+
oneOf:
|
|
14865
|
+
- $ref: '#/components/schemas/UsaCassVerifiedAddress'
|
|
14866
|
+
- $ref: '#/components/schemas/Address'
|
|
14867
|
+
count:
|
|
14868
|
+
type: number
|
|
14869
|
+
description: |
|
|
14870
|
+
The number of addresses we matched to the input. We return the closest match by default.
|
|
14871
|
+
maximum: 10
|
|
14872
|
+
minimum: 0
|
|
14873
|
+
fit:
|
|
14874
|
+
type: number
|
|
14875
|
+
description: |
|
|
14876
|
+
A score represented as number between 1 and 0. Fit compares the address elements present in your query against the matching address elements. It does not incorporate elements you have not presented in the score. A partial address (e.g. 123 Main St) will have a fit of 1 even though it is missing city and zip code. Its confidence score will be less than 1 however because it is missing some crucial elements.
|
|
14877
|
+
maximum: 1
|
|
14878
|
+
minimum: 0
|
|
14879
|
+
confidence:
|
|
14880
|
+
type: number
|
|
14881
|
+
maximum: 1
|
|
14882
|
+
minimum: 0
|
|
14883
|
+
description: |
|
|
14884
|
+
A confidence score represented as number between 1 and 0. 1 indicates a full match. 0 indicates no complete matching elements.
|
|
14885
|
+
match_information:
|
|
14886
|
+
type: string
|
|
14887
|
+
description: |
|
|
14888
|
+
Additional information about the match.
|
|
14889
|
+
|
|
14890
|
+
This information is for human consumption and may not be present in all responses.
|
|
14891
|
+
example: Single Response - The delivery address was found in the National Database and no further information was required.
|
|
14892
|
+
address_line_one:
|
|
14893
|
+
type: string
|
|
14894
|
+
description: |
|
|
14895
|
+
Primary delivery address
|
|
14896
|
+
example: 123 Main St
|
|
14897
|
+
address_line_two:
|
|
14898
|
+
type: string
|
|
14899
|
+
description: |
|
|
14900
|
+
Secondary address information
|
|
14901
|
+
example: ''
|
|
14902
|
+
city:
|
|
14903
|
+
type: string
|
|
14904
|
+
description: |
|
|
14905
|
+
City name
|
|
14906
|
+
example: Springfield
|
|
14907
|
+
state:
|
|
14908
|
+
type: string
|
|
14909
|
+
description: |
|
|
14910
|
+
State name
|
|
14911
|
+
example: CO
|
|
14912
|
+
zip_code:
|
|
14913
|
+
type: string
|
|
14914
|
+
description: |
|
|
14915
|
+
ZIP code
|
|
14916
|
+
example: 81073-1119
|
|
14917
|
+
country_iso_2:
|
|
14918
|
+
type: string
|
|
14919
|
+
description: |
|
|
14920
|
+
2-letter ISO country code
|
|
14921
|
+
example: US
|
|
14922
|
+
UsaVerifyNoMatch:
|
|
14923
|
+
type: object
|
|
14924
|
+
title: No Address Match
|
|
14925
|
+
required:
|
|
14926
|
+
- query
|
|
14927
|
+
- query_city
|
|
14928
|
+
- query_state
|
|
14929
|
+
- query_zip_code
|
|
14930
|
+
- match
|
|
14931
|
+
- count
|
|
14932
|
+
- fit
|
|
14933
|
+
- confidence
|
|
14934
|
+
- match_information
|
|
14935
|
+
- address_line_one
|
|
14936
|
+
- address_line_two
|
|
14937
|
+
- city
|
|
14938
|
+
- state
|
|
14939
|
+
- zip_code
|
|
14940
|
+
- country_iso_2
|
|
14941
|
+
properties:
|
|
14942
|
+
query:
|
|
14943
|
+
type: string
|
|
14944
|
+
description: Originally submitted query
|
|
14945
|
+
query_city:
|
|
14946
|
+
type: string
|
|
14947
|
+
description: Originally submitted city
|
|
14948
|
+
query_state:
|
|
14949
|
+
type: string
|
|
14950
|
+
description: Originally submitted state
|
|
14951
|
+
query_zip_code:
|
|
14952
|
+
type: string
|
|
14953
|
+
description: Originally submitted zip_code
|
|
14954
|
+
match:
|
|
14955
|
+
description: Nearest matching address
|
|
14956
|
+
type: object
|
|
14957
|
+
nullable: true
|
|
14958
|
+
enum:
|
|
14959
|
+
- null
|
|
14960
|
+
count:
|
|
14961
|
+
type: number
|
|
14962
|
+
description: ''
|
|
14963
|
+
enum:
|
|
14964
|
+
- 0
|
|
14965
|
+
fit:
|
|
14966
|
+
type: number
|
|
14967
|
+
format: float
|
|
14968
|
+
description: ''
|
|
14969
|
+
enum:
|
|
14970
|
+
- 0
|
|
14971
|
+
confidence:
|
|
14972
|
+
type: number
|
|
14973
|
+
format: float
|
|
14974
|
+
description: ''
|
|
14975
|
+
enum:
|
|
14976
|
+
- 0
|
|
14977
|
+
match_information:
|
|
14978
|
+
type: string
|
|
14979
|
+
description: |
|
|
14980
|
+
Why the address could not be verified, for people to read. For example `Address not found`, `House number not valid for this street`, `Invalid city, state or ZIP code` or `Address could not be parsed`.
|
|
14981
|
+
|
|
14982
|
+
The wording may change, so do not parse it. Test `match` for `null` instead.
|
|
14983
|
+
example: Address not found
|
|
14984
|
+
address_line_one:
|
|
14985
|
+
type: string
|
|
14986
|
+
description: |
|
|
14987
|
+
Empty if no match
|
|
14988
|
+
enum:
|
|
14989
|
+
- ''
|
|
14990
|
+
address_line_two:
|
|
14991
|
+
type: string
|
|
14992
|
+
description: |
|
|
14993
|
+
Empty if no match
|
|
14994
|
+
enum:
|
|
14995
|
+
- ''
|
|
14996
|
+
city:
|
|
14997
|
+
type: string
|
|
14998
|
+
description: |
|
|
14999
|
+
Empty if no match
|
|
15000
|
+
enum:
|
|
15001
|
+
- ''
|
|
15002
|
+
state:
|
|
15003
|
+
type: string
|
|
15004
|
+
description: |
|
|
15005
|
+
Empty if no match
|
|
15006
|
+
enum:
|
|
15007
|
+
- ''
|
|
15008
|
+
zip_code:
|
|
15009
|
+
type: string
|
|
15010
|
+
description: |
|
|
15011
|
+
Empty if no match
|
|
15012
|
+
enum:
|
|
15013
|
+
- ''
|
|
15014
|
+
country_iso_2:
|
|
15015
|
+
type: string
|
|
15016
|
+
description: |
|
|
15017
|
+
Empty if no match
|
|
15018
|
+
enum:
|
|
15019
|
+
- ''
|
|
15020
|
+
VerifyResponse:
|
|
15021
|
+
title: Address Verify Response
|
|
15022
|
+
type: object
|
|
15023
|
+
required:
|
|
15024
|
+
- message
|
|
15025
|
+
- code
|
|
15026
|
+
- result
|
|
15027
|
+
properties:
|
|
15028
|
+
code:
|
|
15029
|
+
type: integer
|
|
15030
|
+
format: int32
|
|
15031
|
+
enum:
|
|
15032
|
+
- 2000
|
|
15033
|
+
message:
|
|
15034
|
+
type: string
|
|
15035
|
+
enum:
|
|
15036
|
+
- Success
|
|
15037
|
+
result:
|
|
15038
|
+
oneOf:
|
|
15039
|
+
- $ref: '#/components/schemas/UsaVerifyMatch'
|
|
15040
|
+
- $ref: '#/components/schemas/UsaVerifyNoMatch'
|
|
15041
|
+
AddressSuggestion:
|
|
15042
|
+
title: Address Suggestion
|
|
15043
|
+
description: Represents an address suggestion for any address in the world
|
|
15044
|
+
type: object
|
|
15045
|
+
required:
|
|
15046
|
+
- id
|
|
15047
|
+
- suggestion
|
|
15048
|
+
- urls
|
|
15049
|
+
example:
|
|
15050
|
+
id: usps_V210079628|10||3797
|
|
15051
|
+
suggestion: 10 Downing St, Montpelier, VT, 05602
|
|
15052
|
+
urls: {}
|
|
15053
|
+
properties:
|
|
15054
|
+
id:
|
|
15055
|
+
$ref: '#/components/schemas/ID'
|
|
15056
|
+
suggestion:
|
|
15057
|
+
type: string
|
|
15058
|
+
description: Address Suggestion to be displayed to the user
|
|
15059
|
+
urls:
|
|
15060
|
+
title: URLs
|
|
15061
|
+
type: object
|
|
15062
|
+
description: Always an empty object (`{}`). Retrieve the full address with `id`
|
|
15063
|
+
additionalProperties: false
|
|
15064
|
+
AutocompleteResponse:
|
|
15065
|
+
title: Address Autocomplete Response
|
|
15066
|
+
type: object
|
|
15067
|
+
required:
|
|
15068
|
+
- message
|
|
15069
|
+
- code
|
|
15070
|
+
- result
|
|
15071
|
+
properties:
|
|
15072
|
+
result:
|
|
15073
|
+
type: object
|
|
15074
|
+
required:
|
|
15075
|
+
- hits
|
|
15076
|
+
properties:
|
|
15077
|
+
hits:
|
|
15078
|
+
type: array
|
|
15079
|
+
items:
|
|
15080
|
+
$ref: '#/components/schemas/AddressSuggestion'
|
|
15081
|
+
code:
|
|
15082
|
+
type: integer
|
|
15083
|
+
format: int32
|
|
15084
|
+
enum:
|
|
15085
|
+
- 2000
|
|
15086
|
+
message:
|
|
15087
|
+
type: string
|
|
15088
|
+
enum:
|
|
15089
|
+
- Success
|
|
15045
15090
|
UsaResolveAddressResponse:
|
|
15046
15091
|
title: Address Retrieve Response
|
|
15047
15092
|
type: object
|
|
@@ -15347,7 +15392,7 @@ components:
|
|
|
15347
15392
|
id:
|
|
15348
15393
|
title: Place Identifier
|
|
15349
15394
|
type: string
|
|
15350
|
-
description:
|
|
15395
|
+
description: Globally unique internally generated identifier for a place
|
|
15351
15396
|
dataset:
|
|
15352
15397
|
title: Dataset
|
|
15353
15398
|
type: string
|
|
@@ -15426,11 +15471,35 @@ components:
|
|
|
15426
15471
|
- Success
|
|
15427
15472
|
result:
|
|
15428
15473
|
$ref: '#/components/schemas/Place'
|
|
15429
|
-
|
|
15474
|
+
Licensee:
|
|
15430
15475
|
title: Licensee
|
|
15431
|
-
description: Licensee object which can be defined by user
|
|
15432
15476
|
type: object
|
|
15477
|
+
required:
|
|
15478
|
+
- id
|
|
15479
|
+
- key
|
|
15480
|
+
- createdAt
|
|
15481
|
+
- name
|
|
15482
|
+
- address
|
|
15483
|
+
- postcode
|
|
15484
|
+
- whitelist
|
|
15485
|
+
- daily
|
|
15433
15486
|
properties:
|
|
15487
|
+
id:
|
|
15488
|
+
type: string
|
|
15489
|
+
example: 56a11209ebe230380bf104c3
|
|
15490
|
+
description: |
|
|
15491
|
+
An immutable ID provided for every licensee. Primarily used for paginated list requests.
|
|
15492
|
+
key:
|
|
15493
|
+
type: string
|
|
15494
|
+
example: sl_ijoiqsxeQgXW2gkiE0X94
|
|
15495
|
+
description: |
|
|
15496
|
+
Uniquely identifies a licensee for a key.
|
|
15497
|
+
|
|
15498
|
+
Required to perform paid lookups for a specific licensee. Typically begins `sl_`.
|
|
15499
|
+
createdAt:
|
|
15500
|
+
type: string
|
|
15501
|
+
example: '2016-01-21T17:14:49.971Z'
|
|
15502
|
+
description: Timestamp for when the licensee was created
|
|
15434
15503
|
name:
|
|
15435
15504
|
type: string
|
|
15436
15505
|
example: Qwerty Widgets Limited
|
|
@@ -15457,6 +15526,10 @@ components:
|
|
|
15457
15526
|
- `*.example.com` allows the domain and all its subdomains
|
|
15458
15527
|
daily:
|
|
15459
15528
|
type: object
|
|
15529
|
+
required:
|
|
15530
|
+
- limit
|
|
15531
|
+
- count
|
|
15532
|
+
- updatedAt
|
|
15460
15533
|
properties:
|
|
15461
15534
|
limit:
|
|
15462
15535
|
example: 10000
|
|
@@ -15466,53 +15539,16 @@ components:
|
|
|
15466
15539
|
format: int32
|
|
15467
15540
|
type: number
|
|
15468
15541
|
description: The maximum number of lookups this licensee can perform in a day. `null` indicates the limit is not active
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
- key
|
|
15477
|
-
- createdAt
|
|
15478
|
-
- name
|
|
15479
|
-
- address
|
|
15480
|
-
- postcode
|
|
15481
|
-
- whitelist
|
|
15482
|
-
- daily
|
|
15483
|
-
properties:
|
|
15484
|
-
id:
|
|
15485
|
-
type: string
|
|
15486
|
-
example: 56a11209ebe230380bf104c3
|
|
15487
|
-
description: |
|
|
15488
|
-
An immutable ID provided for every licensee. Primarily used for paginated list requests.
|
|
15489
|
-
key:
|
|
15490
|
-
type: string
|
|
15491
|
-
example: sl_ijoiqsxeQgXW2gkiE0X94
|
|
15492
|
-
description: |
|
|
15493
|
-
Uniquely identifies a licensee for a key.
|
|
15494
|
-
|
|
15495
|
-
Required to perform paid lookups for a specific licensee. Typically begins `sl_`.
|
|
15496
|
-
createdAt:
|
|
15542
|
+
count:
|
|
15543
|
+
example: 232
|
|
15544
|
+
minimum: 0
|
|
15545
|
+
type: number
|
|
15546
|
+
format: int32
|
|
15547
|
+
description: The number of lookups performed by the licensee on the day represented by `licensees.daily.updatedAt`
|
|
15548
|
+
updatedAt:
|
|
15497
15549
|
type: string
|
|
15498
|
-
example: '2016-
|
|
15499
|
-
description:
|
|
15500
|
-
daily:
|
|
15501
|
-
required:
|
|
15502
|
-
- count
|
|
15503
|
-
- updatedAt
|
|
15504
|
-
type: object
|
|
15505
|
-
properties:
|
|
15506
|
-
count:
|
|
15507
|
-
example: 232
|
|
15508
|
-
minimum: 0
|
|
15509
|
-
type: number
|
|
15510
|
-
format: int32
|
|
15511
|
-
description: The number of lookups performed by the licensee on the day represented by `licensees.daily.updatedAt`
|
|
15512
|
-
updatedAt:
|
|
15513
|
-
type: string
|
|
15514
|
-
example: '2016-08-05T16:43:28.865Z'
|
|
15515
|
-
description: The timestamp when the limit was last used.
|
|
15550
|
+
example: '2016-08-05T16:43:28.865Z'
|
|
15551
|
+
description: The timestamp when the limit was last used.
|
|
15516
15552
|
LicenseesResponse:
|
|
15517
15553
|
title: Licensee List Response
|
|
15518
15554
|
type: object
|
|
@@ -15524,6 +15560,9 @@ components:
|
|
|
15524
15560
|
result:
|
|
15525
15561
|
description: List of licensees
|
|
15526
15562
|
type: object
|
|
15563
|
+
required:
|
|
15564
|
+
- licensees
|
|
15565
|
+
- hasMore
|
|
15527
15566
|
properties:
|
|
15528
15567
|
licensees:
|
|
15529
15568
|
type: array
|
|
@@ -15541,6 +15580,46 @@ components:
|
|
|
15541
15580
|
format: int32
|
|
15542
15581
|
enum:
|
|
15543
15582
|
- 2000
|
|
15583
|
+
LicenseeEditable:
|
|
15584
|
+
title: Licensee
|
|
15585
|
+
description: Licensee object which can be defined by user
|
|
15586
|
+
type: object
|
|
15587
|
+
properties:
|
|
15588
|
+
name:
|
|
15589
|
+
type: string
|
|
15590
|
+
example: Qwerty Widgets Limited
|
|
15591
|
+
description: Licensee individual or organisation name
|
|
15592
|
+
address:
|
|
15593
|
+
example: 12 High Street, Manchester
|
|
15594
|
+
type: string
|
|
15595
|
+
description: Licensee's first, second and third line address as well as post town concatenated by commas
|
|
15596
|
+
postcode:
|
|
15597
|
+
example: BR8 7RE
|
|
15598
|
+
type: string
|
|
15599
|
+
description: Licensee's postcode
|
|
15600
|
+
whitelist:
|
|
15601
|
+
type: array
|
|
15602
|
+
items:
|
|
15603
|
+
type: string
|
|
15604
|
+
example: https://www.example.com
|
|
15605
|
+
description: |-
|
|
15606
|
+
A list of allowed URLs. An empty list disables the check.
|
|
15607
|
+
|
|
15608
|
+
A request is allowed when its `Origin` or `Referer` header matches an entry. Use one of these formats:
|
|
15609
|
+
|
|
15610
|
+
- `https://www.example.com` allows one site. Scheme and host must match
|
|
15611
|
+
- `*.example.com` allows the domain and all its subdomains
|
|
15612
|
+
daily:
|
|
15613
|
+
type: object
|
|
15614
|
+
properties:
|
|
15615
|
+
limit:
|
|
15616
|
+
example: 10000
|
|
15617
|
+
x-nullable: true
|
|
15618
|
+
nullable: true
|
|
15619
|
+
minimum: 0
|
|
15620
|
+
format: int32
|
|
15621
|
+
type: number
|
|
15622
|
+
description: The maximum number of lookups this licensee can perform in a day. `null` indicates the limit is not active
|
|
15544
15623
|
LicenseeResponse:
|
|
15545
15624
|
title: Licensee Response
|
|
15546
15625
|
type: object
|
|
@@ -15572,11 +15651,11 @@ components:
|
|
|
15572
15651
|
updatedAt:
|
|
15573
15652
|
type: string
|
|
15574
15653
|
example: '2016-01-21T17:14:49.971Z'
|
|
15575
|
-
description: Timestamp for when the config was
|
|
15654
|
+
description: Timestamp for when the config was last updated
|
|
15576
15655
|
createdAt:
|
|
15577
15656
|
type: string
|
|
15578
15657
|
example: '2016-01-21T17:14:49.971Z'
|
|
15579
|
-
description: Timestamp for when the config was
|
|
15658
|
+
description: Timestamp for when the config was created
|
|
15580
15659
|
name:
|
|
15581
15660
|
type: string
|
|
15582
15661
|
example: woocommerce
|