-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1835 lines (1835 loc) · 56.2 KB
/
openapi.json
File metadata and controls
1835 lines (1835 loc) · 56.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "vatverify API",
"version": "1.0.0",
"description": "VAT validation across 32 countries. Real checksums, 30-day caching, tax-rules engine."
},
"servers": [
{
"url": "https://api.vatverify.dev",
"description": "Production"
},
{
"url": "http://localhost:3000",
"description": "Local development"
}
],
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"HealthResponse": {
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"enum": [
true
]
}
},
"required": [
"ok"
],
"additionalProperties": false,
"example": {
"ok": true
}
},
"CountryVat": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Official local name of the tax (e.g. \"Arvonlisävero\", \"Mehrwertsteuer\", \"TVA\").",
"example": "Value Added Tax"
},
"abbreviation": {
"type": "string",
"description": "Short abbreviation used in invoices and official docs (e.g. \"VAT\", \"MwSt\", \"TVA\", \"IVA\").",
"example": "VAT"
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code used when invoicing in this country.",
"example": "EUR"
},
"standard_rate": {
"type": "number",
"description": "Standard VAT rate applied to most goods and services, in percent.",
"example": 23
},
"reduced_rates": {
"type": "array",
"items": {
"type": "number"
},
"description": "Reduced VAT rates applied to specific categories (food, medicine, books, etc). Empty array when the country has no reduced rate.",
"example": [
9,
13.5
]
},
"super_reduced_rate": {
"type": [
"number",
"null"
],
"description": "Super-reduced rate for essential items, where applicable (currently CY, ES, FR, IT, LU, PT). Null for countries that do not use one.",
"example": 4.8
},
"parking_rate": {
"type": [
"number",
"null"
],
"description": "Transitional \"parking\" rate for items that previously qualified for a reduced rate. Null for most countries.",
"example": 13.5
},
"number_format": {
"type": "string",
"description": "Human-readable description of the VAT number format for this country.",
"example": "IE + 7 digits + 1-2 letters"
},
"number_pattern": {
"type": "string",
"description": "Regex pattern for client-side format validation before hitting the API. Matches the normalized (uppercased, stripped) VAT string.",
"example": "^IE\\d{7}[A-Z]{1,2}$"
},
"updated_at": {
"type": "string",
"description": "ISO date when the VAT metadata for this country was last reviewed.",
"example": "2026-04-01"
}
},
"required": [
"name",
"abbreviation",
"currency",
"standard_rate",
"reduced_rates",
"super_reduced_rate",
"parking_rate",
"number_format",
"number_pattern",
"updated_at"
],
"description": "VAT metadata for this country (rates, currency, number format). Null when we have no data for the country (currently XI, LI)."
},
"Company": {
"type": [
"object",
"null"
],
"properties": {
"name": {
"type": "string",
"description": "Registered legal name of the company as reported by the upstream registry.",
"example": "GOOGLE IRELAND LIMITED"
},
"address": {
"type": "string",
"description": "Registered address of the company. Absent when the registry does not publish an address (e.g. Germany).",
"example": "3RD FLOOR GORDON HOUSE, BARROW STREET, DUBLIN 4"
}
},
"required": [
"name"
],
"description": "Company details returned by the upstream registry. Null when `valid: false` or when the registry does not publish company info (e.g. Germany)."
},
"ValidateData": {
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "Whether the VAT number is registered and active according to the upstream registry.",
"example": true
},
"vat_number": {
"type": "string",
"description": "The normalized VAT number — uppercased, stripped of spaces/dots/dashes, with country prefix.",
"example": "IE6388047V"
},
"country": {
"type": "object",
"properties": {
"code": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "Two-letter ISO-3166 country code extracted from the VAT prefix.",
"example": "IE"
},
"name": {
"type": "string",
"description": "Full English country name.",
"example": "Ireland"
},
"vat": {
"$ref": "#/components/schemas/CountryVat"
}
},
"required": [
"code",
"name",
"vat"
],
"description": "Country derived from the VAT prefix, with VAT metadata useful for invoicing and client-side validation."
},
"company": {
"$ref": "#/components/schemas/Company"
},
"verify_id": {
"type": [
"string",
"null"
],
"description": "Official verification identifier emitted by the upstream registry (VIES consultation number / HMRC check reference). Populated when `requester_vat_number` is provided and the source supports it; null otherwise. Tax auditors accept this as proof of a valid query.",
"example": "WAPIAAAAA1BBB2"
},
"verified_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of when the VAT number was fetched from the registry. For cached responses this is the original fetch time, not the current request time.",
"example": "2026-04-14T15:42:03.451Z"
}
},
"required": [
"valid",
"vat_number",
"country",
"company",
"verify_id",
"verified_at"
]
},
"Meta": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "UUID v7 identifying this specific HTTP request. Include it in any support ticket so we can trace the call in our logs.",
"example": "0190f8ea-a5b2-7000-a123-000000000000"
},
"latency_ms": {
"type": "integer",
"minimum": 0,
"description": "Total server-side processing time in milliseconds, from request received to response sent.",
"example": 694
},
"cached": {
"type": "boolean",
"description": "Whether this response was served from the 30-day cache instead of a fresh registry fetch. Cached hits do not count toward your monthly quota.",
"example": false
},
"source": {
"type": "string",
"enum": [
"vies",
"hmrc",
"bfs",
"brreg"
],
"description": "Which official registry produced this result. `vies` for EU-27 + XI, `hmrc` for GB, `bfs` for CH/LI, `brreg` for NO.",
"example": "vies"
},
"source_status": {
"type": "string",
"enum": [
"live",
"cached",
"degraded"
],
"description": "Upstream data source reliability. `live` = confirmed fresh registry response. `cached` = served from the 30-day cache. `degraded` = result may be unreliable (reserved for future expansion).",
"example": "live"
}
},
"required": [
"request_id",
"latency_ms",
"cached",
"source",
"source_status"
]
},
"ValidateResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ValidateData"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
]
},
"ErrorMeta": {
"type": "object",
"properties": {
"request_id": {
"type": "string"
},
"latency_ms": {
"type": "integer",
"minimum": 0
}
},
"required": [
"request_id",
"latency_ms"
]
},
"ErrorEnvelope": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthorized",
"plan_required",
"invalid_format",
"country_unsupported",
"country_unknown",
"batch_too_large",
"webhook_limit_reached",
"seller_country_unsupported",
"b2c_not_supported",
"buyer_vat_not_registered",
"not_found",
"rate_limited",
"registry_unavailable"
],
"example": "invalid_format"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
]
},
"meta": {
"$ref": "#/components/schemas/ErrorMeta"
}
},
"required": [
"error",
"meta"
],
"additionalProperties": false
},
"DecideData": {
"type": "object",
"properties": {
"charge_vat": {
"type": "boolean",
"description": "Whether the seller should charge VAT to the buyer on this transaction.",
"example": false
},
"rate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "VAT rate to charge, in percent. Zero when the mechanism is `reverse_charge` or `zero_rated`.",
"example": 0
},
"mechanism": {
"type": "string",
"enum": [
"standard",
"reverse_charge",
"zero_rated",
"out_of_scope"
],
"description": "VAT mechanism that applies. `standard` = seller charges VAT at the applicable rate. `reverse_charge` = buyer accounts for VAT (EU cross-border B2B, Article 196). `zero_rated` = 0% rate applies. `out_of_scope` = transaction falls outside VAT scope.",
"example": "reverse_charge"
},
"legal_basis": {
"type": "string",
"description": "Legal article or rule that justifies the mechanism. Cite this on the invoice when required by local tax authorities.",
"example": "EU VAT Directive Article 196"
},
"explanation": {
"type": "string",
"description": "Plain-English explanation of why this mechanism applies. Safe to surface in your app as a tooltip or help text.",
"example": "Your customer provided a valid French VAT number, so this is an EU cross-border B2B supply. The reverse-charge mechanism applies — you do not charge VAT, and the buyer self-accounts."
},
"invoice_note": {
"type": "string",
"description": "Text to print on the invoice when the mechanism requires it (e.g. reverse-charge notice). Empty string when no note is needed.",
"example": "Reverse charge — VAT to be accounted for by the recipient"
},
"disclaimer": {
"type": "string",
"description": "Standard disclaimer. This endpoint applies deterministic tax rules — always confirm with a qualified tax adviser for your specific situation.",
"example": "This is guidance, not legal advice. Confirm with a qualified tax adviser for your specific situation."
},
"buyer_vat": {
"type": "object",
"properties": {
"valid": {
"type": "boolean",
"description": "Whether the buyer VAT number is registered and active according to the upstream registry.",
"example": true
},
"country": {
"type": "object",
"properties": {
"code": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"example": "FR"
},
"name": {
"type": "string",
"example": "France"
}
},
"required": [
"code",
"name"
],
"description": "Buyer country derived from the VAT prefix. Absent when the VAT is malformed."
}
},
"required": [
"valid"
],
"description": "Summary of the buyer VAT validation performed as part of the decide call."
},
"decided_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of when this decision was computed server-side.",
"example": "2026-04-14T15:42:03.451Z"
}
},
"required": [
"charge_vat",
"rate",
"mechanism",
"legal_basis",
"explanation",
"invoice_note",
"disclaimer",
"decided_at"
]
},
"DecideSourceEntry": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"seller",
"buyer"
],
"description": "Whether this entry describes the seller or buyer VAT lookup.",
"example": "buyer"
},
"source": {
"type": "string",
"enum": [
"vies",
"hmrc",
"bfs",
"brreg"
],
"description": "Which registry was used for this lookup.",
"example": "vies"
},
"source_status": {
"type": "string",
"enum": [
"live",
"cached",
"degraded"
],
"description": "Upstream data source reliability. `live` = confirmed fresh registry response. `cached` = served from the 30-day cache. `degraded` = result may be unreliable (reserved for future expansion).",
"example": "live"
},
"cached": {
"type": "boolean",
"description": "Whether this result was served from cache.",
"example": false
},
"cached_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "ISO 8601 timestamp of when the value was originally fetched and cached. Null for live results.",
"example": null
},
"stale_seconds": {
"type": [
"integer",
"null"
],
"minimum": 0,
"description": "Age of the cached value in seconds. Null for live results.",
"example": null
}
},
"required": [
"role",
"source",
"source_status",
"cached",
"cached_at",
"stale_seconds"
]
},
"DecideMeta": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "UUID v7 identifying this specific HTTP request.",
"example": "0190f8ea-a5b2-7000-a123-000000000000"
},
"latency_ms": {
"type": "integer",
"minimum": 0,
"description": "Total server-side processing time in milliseconds.",
"example": 820
},
"source_status": {
"type": "string",
"enum": [
"live",
"cached",
"degraded"
],
"description": "Rolled-up worst-case source status across all lookups (seller + buyer).",
"example": "live"
},
"sources": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DecideSourceEntry"
},
"description": "Per-VAT source details for the seller and buyer lookups."
}
},
"required": [
"request_id",
"latency_ms",
"source_status",
"sources"
]
},
"DecideResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/DecideData"
},
"meta": {
"$ref": "#/components/schemas/DecideMeta"
}
},
"required": [
"data",
"meta"
]
},
"DecideRequest": {
"type": "object",
"properties": {
"seller_vat": {
"type": "string",
"minLength": 4,
"description": "Seller VAT number, full with country prefix. Seller country is derived from the prefix (e.g., \"DE...\" → Germany).",
"example": "DE811569869"
},
"buyer_vat": {
"type": "string",
"minLength": 4,
"description": "Buyer VAT number, full with country prefix. Buyer country is derived from the prefix. This endpoint is B2B-only in v1; for B2C transactions (consumer, no VAT number) support is on the roadmap.",
"example": "FR44732829320"
}
},
"required": [
"seller_vat",
"buyer_vat"
],
"additionalProperties": false
},
"RegistrationThreshold": {
"type": [
"object",
"null"
],
"properties": {
"domestic": {
"type": [
"number",
"null"
],
"description": "Revenue above which a seller based in this country must register for VAT. Null when no threshold exists (VAT mandatory from €0) or when we do not track a threshold for this country.",
"example": 22000
},
"distance_selling": {
"type": [
"number",
"null"
],
"description": "EU-wide OSS cross-border B2C threshold (uniform €10,000 since July 2021). Null for non-EU countries.",
"example": 10000
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "ISO 4217 currency for the thresholds.",
"example": "EUR"
}
},
"required": [
"domestic",
"distance_selling",
"currency"
],
"description": "VAT registration thresholds; null when we do not track thresholds for this country."
},
"CountryRate": {
"type": "object",
"properties": {
"country_code": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"description": "ISO 3166-1 alpha-2 code, lowercase.",
"example": "de"
},
"country_name": {
"type": "string",
"description": "English country name.",
"example": "Germany"
},
"country_name_local": {
"type": "string",
"description": "Country name in its official local language.",
"example": "Deutschland"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "ISO 4217 currency code used for invoicing in this country.",
"example": "EUR"
},
"is_eu_member": {
"type": "boolean",
"description": "True for the 27 EU member states plus XI (Northern Ireland under the Brexit protocol).",
"example": true
},
"supports_live_validation": {
"type": "boolean",
"description": "True when /v1/validate can verify a VAT number for this country against a live registry.",
"example": true
},
"standard_rate": {
"type": "number",
"description": "Standard VAT rate as a percentage, e.g. 19 for 19%.",
"example": 19
},
"reduced_rates": {
"type": "array",
"items": {
"type": "number"
},
"description": "Ordered array of reduced rates; empty if none.",
"example": [
7
]
},
"super_reduced_rate": {
"type": [
"number",
"null"
],
"description": "Super-reduced rate if applicable, otherwise null.",
"example": null
},
"parking_rate": {
"type": [
"number",
"null"
],
"description": "Transitional parking rate if applicable, otherwise null.",
"example": null
},
"vat_name": {
"type": "string",
"description": "Local tax name in the country language.",
"example": "Umsatzsteuer"
},
"vat_abbr": {
"type": "string",
"description": "Local tax abbreviation.",
"example": "USt"
},
"vat_number_format": {
"type": "string",
"description": "Human-readable description of the VAT number format.",
"example": "DE + 9 digits"
},
"vat_number_regex": {
"type": "string",
"description": "Regex pattern for client-side format validation.",
"example": "^DE\\d{9}$"
},
"registration_threshold": {
"$ref": "#/components/schemas/RegistrationThreshold"
},
"updated_at": {
"type": "string",
"description": "ISO date (YYYY-MM-DD) of the last verified refresh for this country row. Not a full datetime — precision is day-level.",
"example": "2026-04-13"
}
},
"required": [
"country_code",
"country_name",
"country_name_local",
"currency",
"is_eu_member",
"supports_live_validation",
"standard_rate",
"reduced_rates",
"super_reduced_rate",
"parking_rate",
"vat_name",
"vat_abbr",
"vat_number_format",
"vat_number_regex",
"registration_threshold",
"updated_at"
]
},
"RatesMeta": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "UUID v7 identifying this specific HTTP request.",
"example": "0190f8ea-a5b2-7000-a123-000000000000"
},
"data_version": {
"type": "string",
"description": "ISO date (YYYY-MM-DD) of the underlying rates dataset. Use as an ETag key.",
"example": "2026-04-13"
},
"cached": {
"type": "boolean",
"description": "Always true for /v1/rates — data is loaded in-process at startup.",
"example": true
}
},
"required": [
"request_id",
"data_version",
"cached"
]
},
"RatesListMeta": {
"allOf": [
{
"$ref": "#/components/schemas/RatesMeta"
},
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 0,
"description": "Number of country objects in `data`.",
"example": 44
}
},
"required": [
"count"
]
}
]
},
"RatesListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CountryRate"
}
},
"meta": {
"$ref": "#/components/schemas/RatesListMeta"
}
},
"required": [
"data",
"meta"
]
},
"RatesSingleResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/CountryRate"
},
"meta": {
"$ref": "#/components/schemas/RatesMeta"
}
},
"required": [
"data",
"meta"
]
},
"BatchSummary": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"minimum": 0,
"description": "Total number of items in the request (`vat_numbers.length`).",
"example": 3
},
"successful": {
"type": "integer",
"minimum": 0,
"description": "Items that returned `ok: true` (the registry answered, regardless of valid/invalid outcome).",
"example": 2
},
"failed": {
"type": "integer",
"minimum": 0,
"description": "Items that returned `ok: false` (normalization failed, country unsupported, or registry unavailable).",
"example": 1
}
},
"required": [
"total",
"successful",
"failed"
]
},
"BatchPerItemError": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"invalid_format",
"country_unsupported",
"registry_unavailable"
],
"description": "Per-item error code. Only these three codes are possible inside a per-item error; auth / plan / rate-limit errors fail the whole batch, not individual items.",
"example": "invalid_format"
},
"message": {
"type": "string",
"description": "Human-readable message for this item. Safe to surface in UIs.",
"example": "Unsupported country prefix `ZZ`"
}
},
"required": [
"code",
"message"
]
},
"BatchResultItem": {
"oneOf": [
{
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"enum": [
true
]
},
"data": {
"$ref": "#/components/schemas/ValidateData"
}
},
"required": [
"ok",
"data"
]
},
{
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"enum": [
false
]
},
"error": {
"$ref": "#/components/schemas/BatchPerItemError"
}
},
"required": [
"ok",
"error"
]
}
]
},
"ValidateBatchResponse": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"summary": {
"$ref": "#/components/schemas/BatchSummary"
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BatchResultItem"
},
"description": "Per-item results in the same order as the input `vat_numbers` array. `results.length === total`."
}
},
"required": [
"summary",
"results"
]
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"required": [
"data",
"meta"
]
},
"ValidateBatchRequest": {
"type": "object",
"properties": {
"vat_numbers": {
"type": "array",
"items": {
"type": "string",
"minLength": 4
},
"minItems": 1,
"maxItems": 50,
"description": "Array of VAT numbers to validate. Each can include spaces, dots, or mixed case — normalized automatically. Max 50 items per request. Each item is normalized and routed to the correct registry (VIES/HMRC/BFS/BRREG) independently.",
"example": [
"IE6388047V",
"DE811569869",
"FR44732829320"
]
},
"requester_vat_number": {
"type": "string",
"minLength": 4,
"description": "Your own VAT number. When provided, each VIES item is looked up via an authenticated consultation and the response includes a per-item `verify_id` — the official consultation identifier accepted by tax auditors as proof of verification. These calls always bypass the cache and count toward your quota. Not applicable for CH, LI, or NO registrations (those items will have `verify_id: null`).",
"example": "DE100000001"
}
},
"required": [
"vat_numbers"
]
},
"AuditResponse": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"format": "uuid",
"example": "019d917e-4fa4-766e-9e0f-d977b47bf2c6"
},
"endpoint": {
"type": "string",
"enum": [
"validate",
"decide",
"validate_batch"
],
"example": "validate"
},
"response": {
"type": "object",
"additionalProperties": {},
"description": "The full original success response envelope."
},
"created_at": {
"type": "string",
"example": "2026-04-15T14:11:49.110Z"
},
"expires_at": {
"type": "string",
"example": "2026-07-14T14:11:49.110Z"
}
},
"required": [
"request_id",
"endpoint",
"response",
"created_at",
"expires_at"