@spaceinvoices/js-sdk 13.0.0 → 13.1.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/generated/model/index.d.cts +4 -0
- package/dist/generated/model/index.d.ts +4 -0
- package/dist/generated/model/transactionTypeCheckRequest.d.cts +12 -0
- package/dist/generated/model/transactionTypeCheckRequest.d.ts +12 -0
- package/dist/generated/model/transactionTypeCheckRequestIssuer.d.cts +5 -0
- package/dist/generated/model/transactionTypeCheckRequestIssuer.d.ts +5 -0
- package/dist/generated/model/transactionTypeCheckRequestItemsItem.d.cts +26 -0
- package/dist/generated/model/transactionTypeCheckRequestItemsItem.d.ts +26 -0
- package/dist/generated/model/transactionTypeCheckRequestItemsItemClassification.d.cts +17 -0
- package/dist/generated/model/transactionTypeCheckRequestItemsItemClassification.d.ts +17 -0
- package/dist/generated/model/transactionTypeCheckRequestItemsItemType.d.cts +15 -0
- package/dist/generated/model/transactionTypeCheckRequestItemsItemType.d.ts +15 -0
- package/dist/generated/model/transactionTypeCheckRequestSupplyType.d.cts +16 -0
- package/dist/generated/model/transactionTypeCheckRequestSupplyType.d.ts +16 -0
- package/dist/generated/model/transactionTypeCheckResponse.d.cts +6 -1
- package/dist/generated/model/transactionTypeCheckResponse.d.ts +6 -1
- package/dist/generated/transaction-type/transaction-type.d.cts +7 -1
- package/dist/generated/transaction-type/transaction-type.d.ts +7 -1
- package/dist/generated/vies/vies.d.cts +2 -0
- package/dist/generated/vies/vies.d.ts +2 -0
- package/dist/generated-zod/transaction-type/transaction-type.d.cts +15 -1
- package/dist/generated-zod/transaction-type/transaction-type.d.ts +15 -1
- package/dist/generated-zod/vies/vies.d.cts +10 -0
- package/dist/generated-zod/vies/vies.d.ts +10 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -1411,6 +1411,10 @@ export * from './ticketBaiSettingsTerritory.cjs';
|
|
|
1411
1411
|
export * from './transactionTypeCheckRequest.cjs';
|
|
1412
1412
|
export * from './transactionTypeCheckRequestCustomer.cjs';
|
|
1413
1413
|
export * from './transactionTypeCheckRequestIssuer.cjs';
|
|
1414
|
+
export * from './transactionTypeCheckRequestItemsItem.cjs';
|
|
1415
|
+
export * from './transactionTypeCheckRequestItemsItemClassification.cjs';
|
|
1416
|
+
export * from './transactionTypeCheckRequestItemsItemType.cjs';
|
|
1417
|
+
export * from './transactionTypeCheckRequestSupplyType.cjs';
|
|
1414
1418
|
export * from './transactionTypeCheckResponse.cjs';
|
|
1415
1419
|
export * from './transactionTypeCheckResponseTransactionType.cjs';
|
|
1416
1420
|
export * from './travelOrder.cjs';
|
|
@@ -1411,6 +1411,10 @@ export * from './ticketBaiSettingsTerritory.js';
|
|
|
1411
1411
|
export * from './transactionTypeCheckRequest.js';
|
|
1412
1412
|
export * from './transactionTypeCheckRequestCustomer.js';
|
|
1413
1413
|
export * from './transactionTypeCheckRequestIssuer.js';
|
|
1414
|
+
export * from './transactionTypeCheckRequestItemsItem.js';
|
|
1415
|
+
export * from './transactionTypeCheckRequestItemsItemClassification.js';
|
|
1416
|
+
export * from './transactionTypeCheckRequestItemsItemType.js';
|
|
1417
|
+
export * from './transactionTypeCheckRequestSupplyType.js';
|
|
1414
1418
|
export * from './transactionTypeCheckResponse.js';
|
|
1415
1419
|
export * from './transactionTypeCheckResponseTransactionType.js';
|
|
1416
1420
|
export * from './travelOrder.js';
|
|
@@ -7,9 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { TransactionTypeCheckRequestCustomer } from './transactionTypeCheckRequestCustomer.cjs';
|
|
9
9
|
import type { TransactionTypeCheckRequestIssuer } from './transactionTypeCheckRequestIssuer.cjs';
|
|
10
|
+
import type { TransactionTypeCheckRequestItemsItem } from './transactionTypeCheckRequestItemsItem.cjs';
|
|
11
|
+
import type { TransactionTypeCheckRequestSupplyType } from './transactionTypeCheckRequestSupplyType.cjs';
|
|
10
12
|
export interface TransactionTypeCheckRequest {
|
|
11
13
|
/** Issuer (seller) information */
|
|
12
14
|
issuer: TransactionTypeCheckRequestIssuer;
|
|
13
15
|
/** Customer (buyer) information */
|
|
14
16
|
customer: TransactionTypeCheckRequestCustomer;
|
|
17
|
+
/**
|
|
18
|
+
* What is being supplied. Only sales between the EU and Northern Ireland (country_code XI, or GB with an XI-prefixed VAT number) depend on it: goods are an intra-EU supply and the XI number is checked in VIES, services are a third-country supply. When it is omitted or null and no items are given, such a sale is classified as third-country and the response carries a warning. Ignored for every other country pair.
|
|
19
|
+
* @nullable
|
|
20
|
+
*/
|
|
21
|
+
supply_type?: TransactionTypeCheckRequestSupplyType;
|
|
22
|
+
/**
|
|
23
|
+
* The document's lines, as an alternative to supply_type: the supply type is derived from them with the rule a saved document uses (every line product = goods, every line service = services, anything else = not known). Ignored when supply_type is given.
|
|
24
|
+
* @nullable
|
|
25
|
+
*/
|
|
26
|
+
items?: TransactionTypeCheckRequestItemsItem[] | null;
|
|
15
27
|
}
|
|
@@ -7,9 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { TransactionTypeCheckRequestCustomer } from './transactionTypeCheckRequestCustomer.js';
|
|
9
9
|
import type { TransactionTypeCheckRequestIssuer } from './transactionTypeCheckRequestIssuer.js';
|
|
10
|
+
import type { TransactionTypeCheckRequestItemsItem } from './transactionTypeCheckRequestItemsItem.js';
|
|
11
|
+
import type { TransactionTypeCheckRequestSupplyType } from './transactionTypeCheckRequestSupplyType.js';
|
|
10
12
|
export interface TransactionTypeCheckRequest {
|
|
11
13
|
/** Issuer (seller) information */
|
|
12
14
|
issuer: TransactionTypeCheckRequestIssuer;
|
|
13
15
|
/** Customer (buyer) information */
|
|
14
16
|
customer: TransactionTypeCheckRequestCustomer;
|
|
17
|
+
/**
|
|
18
|
+
* What is being supplied. Only sales between the EU and Northern Ireland (country_code XI, or GB with an XI-prefixed VAT number) depend on it: goods are an intra-EU supply and the XI number is checked in VIES, services are a third-country supply. When it is omitted or null and no items are given, such a sale is classified as third-country and the response carries a warning. Ignored for every other country pair.
|
|
19
|
+
* @nullable
|
|
20
|
+
*/
|
|
21
|
+
supply_type?: TransactionTypeCheckRequestSupplyType;
|
|
22
|
+
/**
|
|
23
|
+
* The document's lines, as an alternative to supply_type: the supply type is derived from them with the rule a saved document uses (every line product = goods, every line service = services, anything else = not known). Ignored when supply_type is given.
|
|
24
|
+
* @nullable
|
|
25
|
+
*/
|
|
26
|
+
items?: TransactionTypeCheckRequestItemsItem[] | null;
|
|
15
27
|
}
|
|
@@ -19,4 +19,9 @@ export type TransactionTypeCheckRequestIssuer = {
|
|
|
19
19
|
country_code?: string;
|
|
20
20
|
/** Whether the issuer is a tax subject. Set false for small businesses or tax-exempt organizations. */
|
|
21
21
|
is_tax_subject?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Issuer VAT number. Only used to recognise a Northern Ireland issuer: country_code GB with an XI-prefixed number (or country_code XI).
|
|
24
|
+
* @nullable
|
|
25
|
+
*/
|
|
26
|
+
tax_number?: string | null;
|
|
22
27
|
};
|
|
@@ -19,4 +19,9 @@ export type TransactionTypeCheckRequestIssuer = {
|
|
|
19
19
|
country_code?: string;
|
|
20
20
|
/** Whether the issuer is a tax subject. Set false for small businesses or tax-exempt organizations. */
|
|
21
21
|
is_tax_subject?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Issuer VAT number. Only used to recognise a Northern Ireland issuer: country_code GB with an XI-prefixed number (or country_code XI).
|
|
24
|
+
* @nullable
|
|
25
|
+
*/
|
|
26
|
+
tax_number?: string | null;
|
|
22
27
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
import type { TransactionTypeCheckRequestItemsItemClassification } from './transactionTypeCheckRequestItemsItemClassification.cjs';
|
|
9
|
+
import type { TransactionTypeCheckRequestItemsItemType } from './transactionTypeCheckRequestItemsItemType.cjs';
|
|
10
|
+
export type TransactionTypeCheckRequestItemsItem = {
|
|
11
|
+
/**
|
|
12
|
+
* Set to 'separator' for a section header line; separators are ignored.
|
|
13
|
+
* @nullable
|
|
14
|
+
*/
|
|
15
|
+
type?: TransactionTypeCheckRequestItemsItemType;
|
|
16
|
+
/**
|
|
17
|
+
* The line's classification, as on a document line. Leave it out for a line that takes its classification from the catalog item in item_id; null means the line is unclassified.
|
|
18
|
+
* @nullable
|
|
19
|
+
*/
|
|
20
|
+
classification?: TransactionTypeCheckRequestItemsItemClassification;
|
|
21
|
+
/**
|
|
22
|
+
* Catalog item the line references. Used to inherit the item's classification when the line has none of its own. This needs a selected entity (X-Entity-Id header or an entity-scoped API key) on POST /transaction-type/check; without one, and on the deprecated POST /vies/check, such a line counts as unclassified.
|
|
23
|
+
* @nullable
|
|
24
|
+
*/
|
|
25
|
+
item_id?: string | null;
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
import type { TransactionTypeCheckRequestItemsItemClassification } from './transactionTypeCheckRequestItemsItemClassification.js';
|
|
9
|
+
import type { TransactionTypeCheckRequestItemsItemType } from './transactionTypeCheckRequestItemsItemType.js';
|
|
10
|
+
export type TransactionTypeCheckRequestItemsItem = {
|
|
11
|
+
/**
|
|
12
|
+
* Set to 'separator' for a section header line; separators are ignored.
|
|
13
|
+
* @nullable
|
|
14
|
+
*/
|
|
15
|
+
type?: TransactionTypeCheckRequestItemsItemType;
|
|
16
|
+
/**
|
|
17
|
+
* The line's classification, as on a document line. Leave it out for a line that takes its classification from the catalog item in item_id; null means the line is unclassified.
|
|
18
|
+
* @nullable
|
|
19
|
+
*/
|
|
20
|
+
classification?: TransactionTypeCheckRequestItemsItemClassification;
|
|
21
|
+
/**
|
|
22
|
+
* Catalog item the line references. Used to inherit the item's classification when the line has none of its own. This needs a selected entity (X-Entity-Id header or an entity-scoped API key) on POST /transaction-type/check; without one, and on the deprecated POST /vies/check, such a line counts as unclassified.
|
|
23
|
+
* @nullable
|
|
24
|
+
*/
|
|
25
|
+
item_id?: string | null;
|
|
26
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The line's classification, as on a document line. Leave it out for a line that takes its classification from the catalog item in item_id; null means the line is unclassified.
|
|
10
|
+
* @nullable
|
|
11
|
+
*/
|
|
12
|
+
export type TransactionTypeCheckRequestItemsItemClassification = typeof TransactionTypeCheckRequestItemsItemClassification[keyof typeof TransactionTypeCheckRequestItemsItemClassification] | null;
|
|
13
|
+
export declare const TransactionTypeCheckRequestItemsItemClassification: {
|
|
14
|
+
readonly product: "product";
|
|
15
|
+
readonly service: "service";
|
|
16
|
+
readonly advance: "advance";
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The line's classification, as on a document line. Leave it out for a line that takes its classification from the catalog item in item_id; null means the line is unclassified.
|
|
10
|
+
* @nullable
|
|
11
|
+
*/
|
|
12
|
+
export type TransactionTypeCheckRequestItemsItemClassification = typeof TransactionTypeCheckRequestItemsItemClassification[keyof typeof TransactionTypeCheckRequestItemsItemClassification] | null;
|
|
13
|
+
export declare const TransactionTypeCheckRequestItemsItemClassification: {
|
|
14
|
+
readonly product: "product";
|
|
15
|
+
readonly service: "service";
|
|
16
|
+
readonly advance: "advance";
|
|
17
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Set to 'separator' for a section header line; separators are ignored.
|
|
10
|
+
* @nullable
|
|
11
|
+
*/
|
|
12
|
+
export type TransactionTypeCheckRequestItemsItemType = typeof TransactionTypeCheckRequestItemsItemType[keyof typeof TransactionTypeCheckRequestItemsItemType] | null;
|
|
13
|
+
export declare const TransactionTypeCheckRequestItemsItemType: {
|
|
14
|
+
readonly separator: "separator";
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Set to 'separator' for a section header line; separators are ignored.
|
|
10
|
+
* @nullable
|
|
11
|
+
*/
|
|
12
|
+
export type TransactionTypeCheckRequestItemsItemType = typeof TransactionTypeCheckRequestItemsItemType[keyof typeof TransactionTypeCheckRequestItemsItemType] | null;
|
|
13
|
+
export declare const TransactionTypeCheckRequestItemsItemType: {
|
|
14
|
+
readonly separator: "separator";
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* What is being supplied. Only sales between the EU and Northern Ireland (country_code XI, or GB with an XI-prefixed VAT number) depend on it: goods are an intra-EU supply and the XI number is checked in VIES, services are a third-country supply. When it is omitted or null and no items are given, such a sale is classified as third-country and the response carries a warning. Ignored for every other country pair.
|
|
10
|
+
* @nullable
|
|
11
|
+
*/
|
|
12
|
+
export type TransactionTypeCheckRequestSupplyType = typeof TransactionTypeCheckRequestSupplyType[keyof typeof TransactionTypeCheckRequestSupplyType] | null;
|
|
13
|
+
export declare const TransactionTypeCheckRequestSupplyType: {
|
|
14
|
+
readonly goods: "goods";
|
|
15
|
+
readonly services: "services";
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Space Invoices API
|
|
5
|
+
* REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* What is being supplied. Only sales between the EU and Northern Ireland (country_code XI, or GB with an XI-prefixed VAT number) depend on it: goods are an intra-EU supply and the XI number is checked in VIES, services are a third-country supply. When it is omitted or null and no items are given, such a sale is classified as third-country and the response carries a warning. Ignored for every other country pair.
|
|
10
|
+
* @nullable
|
|
11
|
+
*/
|
|
12
|
+
export type TransactionTypeCheckRequestSupplyType = typeof TransactionTypeCheckRequestSupplyType[keyof typeof TransactionTypeCheckRequestSupplyType] | null;
|
|
13
|
+
export declare const TransactionTypeCheckRequestSupplyType: {
|
|
14
|
+
readonly goods: "goods";
|
|
15
|
+
readonly services: "services";
|
|
16
|
+
};
|
|
@@ -34,10 +34,15 @@ export interface TransactionTypeCheckResponse {
|
|
|
34
34
|
*/
|
|
35
35
|
vies_valid: boolean | null;
|
|
36
36
|
/**
|
|
37
|
-
* Warning message if VIES validation was unavailable or tax number was invalid
|
|
37
|
+
* Warning message if VIES validation was unavailable or the tax number was invalid, if a GB- or XI-prefixed UK VAT number failed the format check or the HMRC check, or if a Northern Ireland sale has no supply_type
|
|
38
38
|
* @nullable
|
|
39
39
|
*/
|
|
40
40
|
warning: string | null;
|
|
41
41
|
/** False when issuer is not a tax subject (transaction treated as B2C) */
|
|
42
42
|
is_tax_subject?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Present when the customer is in the United Kingdom with a tax number that VIES does not cover (Great Britain, or Northern Ireland services). True or false is HMRC's answer for the UK VAT number; null means HMRC was not asked (lookup not enabled, or the number failed the format check) or gave no answer. Informational: it never changes transaction_type.
|
|
45
|
+
* @nullable
|
|
46
|
+
*/
|
|
47
|
+
hmrc_valid?: boolean | null;
|
|
43
48
|
}
|
|
@@ -34,10 +34,15 @@ export interface TransactionTypeCheckResponse {
|
|
|
34
34
|
*/
|
|
35
35
|
vies_valid: boolean | null;
|
|
36
36
|
/**
|
|
37
|
-
* Warning message if VIES validation was unavailable or tax number was invalid
|
|
37
|
+
* Warning message if VIES validation was unavailable or the tax number was invalid, if a GB- or XI-prefixed UK VAT number failed the format check or the HMRC check, or if a Northern Ireland sale has no supply_type
|
|
38
38
|
* @nullable
|
|
39
39
|
*/
|
|
40
40
|
warning: string | null;
|
|
41
41
|
/** False when issuer is not a tax subject (transaction treated as B2C) */
|
|
42
42
|
is_tax_subject?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Present when the customer is in the United Kingdom with a tax number that VIES does not cover (Great Britain, or Northern Ireland services). True or false is HMRC's answer for the UK VAT number; null means HMRC was not asked (lookup not enabled, or the number failed the format check) or gave no answer. Informational: it never changes transaction_type.
|
|
45
|
+
* @nullable
|
|
46
|
+
*/
|
|
47
|
+
hmrc_valid?: boolean | null;
|
|
43
48
|
}
|
|
@@ -25,6 +25,12 @@ Applies when:
|
|
|
25
25
|
- Issuer is an EU tax subject
|
|
26
26
|
- Customer is in a different EU country with valid tax number, OR customer is outside EU
|
|
27
27
|
|
|
28
|
+
**Northern Ireland:**
|
|
29
|
+
A customer is in Northern Ireland when its country_code is `XI`, or `GB` with an `XI`-prefixed VAT number. Great Britain and Northern Ireland are one country for domestic sales. Between the EU and Northern Ireland, `supply_type` decides: `goods` are an intra-EU supply (`intra_eu_b2b` when VIES confirms the XI number or VIES is unavailable, `intra_eu_b2c` when VIES rejects it or there is no number), `services` are a third-country supply (`3w_b2b` / `3w_b2c`). Instead of `supply_type` you can send the document's `items` (classification and item_id per line): the supply type is then derived exactly as for a saved document. Without either, the sale is classified as third-country and `warning` says so.
|
|
30
|
+
|
|
31
|
+
**UK VAT numbers:**
|
|
32
|
+
A UK customer's tax number with a GB or XI prefix that VIES does not cover gets a format check (9 or 12 digits with valid check digits); a failed check is reported in `warning`. A number without the prefix that is not a VAT number (a company number, a UTR) is ignored. `hmrc_valid` carries HMRC's answer when the HMRC lookup is enabled. Neither changes `transaction_type`.
|
|
33
|
+
|
|
28
34
|
**End Consumer Override:**
|
|
29
35
|
When customer.is_end_consumer is true, forces B2C classification for non-EU transactions even if the customer has a tax number. For intra-EU transactions, VIES validation takes precedence.
|
|
30
36
|
|
|
@@ -32,7 +38,7 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
|
|
|
32
38
|
When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
|
|
33
39
|
|
|
34
40
|
**Entity VIES setting:**
|
|
35
|
-
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
41
|
+
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request and no UK VAT number check is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
36
42
|
* @summary Check transaction type
|
|
37
43
|
*/
|
|
38
44
|
export type checkTransactionTypeResponse200 = {
|
|
@@ -25,6 +25,12 @@ Applies when:
|
|
|
25
25
|
- Issuer is an EU tax subject
|
|
26
26
|
- Customer is in a different EU country with valid tax number, OR customer is outside EU
|
|
27
27
|
|
|
28
|
+
**Northern Ireland:**
|
|
29
|
+
A customer is in Northern Ireland when its country_code is `XI`, or `GB` with an `XI`-prefixed VAT number. Great Britain and Northern Ireland are one country for domestic sales. Between the EU and Northern Ireland, `supply_type` decides: `goods` are an intra-EU supply (`intra_eu_b2b` when VIES confirms the XI number or VIES is unavailable, `intra_eu_b2c` when VIES rejects it or there is no number), `services` are a third-country supply (`3w_b2b` / `3w_b2c`). Instead of `supply_type` you can send the document's `items` (classification and item_id per line): the supply type is then derived exactly as for a saved document. Without either, the sale is classified as third-country and `warning` says so.
|
|
30
|
+
|
|
31
|
+
**UK VAT numbers:**
|
|
32
|
+
A UK customer's tax number with a GB or XI prefix that VIES does not cover gets a format check (9 or 12 digits with valid check digits); a failed check is reported in `warning`. A number without the prefix that is not a VAT number (a company number, a UTR) is ignored. `hmrc_valid` carries HMRC's answer when the HMRC lookup is enabled. Neither changes `transaction_type`.
|
|
33
|
+
|
|
28
34
|
**End Consumer Override:**
|
|
29
35
|
When customer.is_end_consumer is true, forces B2C classification for non-EU transactions even if the customer has a tax number. For intra-EU transactions, VIES validation takes precedence.
|
|
30
36
|
|
|
@@ -32,7 +38,7 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
|
|
|
32
38
|
When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
|
|
33
39
|
|
|
34
40
|
**Entity VIES setting:**
|
|
35
|
-
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
41
|
+
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request and no UK VAT number check is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
36
42
|
* @summary Check transaction type
|
|
37
43
|
*/
|
|
38
44
|
export type checkTransactionTypeResponse200 = {
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import type { Error, TransactionTypeCheckRequest, TransactionTypeCheckResponse, ValidationError } from '../model/index.cjs';
|
|
9
9
|
/**
|
|
10
10
|
* **Deprecated:** Use `POST /transaction-type/check` instead. This endpoint is kept for backward compatibility.
|
|
11
|
+
|
|
12
|
+
This endpoint never selects an entity. When `items` are sent, a line's own `classification` is used, but a line that only has an `item_id` cannot take its classification from the catalog here and counts as unclassified. Use `POST /transaction-type/check` with the entity selected for that.
|
|
11
13
|
* @deprecated
|
|
12
14
|
* @summary Check VIES status (deprecated)
|
|
13
15
|
*/
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import type { Error, TransactionTypeCheckRequest, TransactionTypeCheckResponse, ValidationError } from '../model/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* **Deprecated:** Use `POST /transaction-type/check` instead. This endpoint is kept for backward compatibility.
|
|
11
|
+
|
|
12
|
+
This endpoint never selects an entity. When `items` are sent, a line's own `classification` is used, but a line that only has an `item_id` cannot take its classification from the catalog here and counts as unclassified. Use `POST /transaction-type/check` with the entity selected for that.
|
|
11
13
|
* @deprecated
|
|
12
14
|
* @summary Check VIES status (deprecated)
|
|
13
15
|
*/
|
|
@@ -25,6 +25,12 @@ Applies when:
|
|
|
25
25
|
- Issuer is an EU tax subject
|
|
26
26
|
- Customer is in a different EU country with valid tax number, OR customer is outside EU
|
|
27
27
|
|
|
28
|
+
**Northern Ireland:**
|
|
29
|
+
A customer is in Northern Ireland when its country_code is `XI`, or `GB` with an `XI`-prefixed VAT number. Great Britain and Northern Ireland are one country for domestic sales. Between the EU and Northern Ireland, `supply_type` decides: `goods` are an intra-EU supply (`intra_eu_b2b` when VIES confirms the XI number or VIES is unavailable, `intra_eu_b2c` when VIES rejects it or there is no number), `services` are a third-country supply (`3w_b2b` / `3w_b2c`). Instead of `supply_type` you can send the document's `items` (classification and item_id per line): the supply type is then derived exactly as for a saved document. Without either, the sale is classified as third-country and `warning` says so.
|
|
30
|
+
|
|
31
|
+
**UK VAT numbers:**
|
|
32
|
+
A UK customer's tax number with a GB or XI prefix that VIES does not cover gets a format check (9 or 12 digits with valid check digits); a failed check is reported in `warning`. A number without the prefix that is not a VAT number (a company number, a UTR) is ignored. `hmrc_valid` carries HMRC's answer when the HMRC lookup is enabled. Neither changes `transaction_type`.
|
|
33
|
+
|
|
28
34
|
**End Consumer Override:**
|
|
29
35
|
When customer.is_end_consumer is true, forces B2C classification for non-EU transactions even if the customer has a tax number. For intra-EU transactions, VIES validation takes precedence.
|
|
30
36
|
|
|
@@ -32,7 +38,7 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
|
|
|
32
38
|
When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
|
|
33
39
|
|
|
34
40
|
**Entity VIES setting:**
|
|
35
|
-
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
41
|
+
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request and no UK VAT number check is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
36
42
|
* @summary Check transaction type
|
|
37
43
|
*/
|
|
38
44
|
export declare const CheckTransactionTypeHeader: zod.ZodObject<{
|
|
@@ -48,6 +54,7 @@ export declare const CheckTransactionTypeBody: zod.ZodObject<{
|
|
|
48
54
|
country: zod.ZodOptional<zod.ZodString>;
|
|
49
55
|
country_code: zod.ZodOptional<zod.ZodString>;
|
|
50
56
|
is_tax_subject: zod.ZodDefault<zod.ZodBoolean>;
|
|
57
|
+
tax_number: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
51
58
|
}, zod.z.core.$strip>;
|
|
52
59
|
customer: zod.ZodObject<{
|
|
53
60
|
country: zod.ZodOptional<zod.ZodString>;
|
|
@@ -55,6 +62,12 @@ export declare const CheckTransactionTypeBody: zod.ZodObject<{
|
|
|
55
62
|
tax_number: zod.ZodOptional<zod.ZodString>;
|
|
56
63
|
is_end_consumer: zod.ZodOptional<zod.ZodBoolean>;
|
|
57
64
|
}, zod.z.core.$strip>;
|
|
65
|
+
supply_type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"goods">, zod.ZodLiteral<"services">, zod.ZodLiteral<null>]>>>;
|
|
66
|
+
items: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
67
|
+
type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"separator">, zod.ZodLiteral<null>]>>>;
|
|
68
|
+
classification: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"product">, zod.ZodLiteral<"service">, zod.ZodLiteral<"advance">, zod.ZodLiteral<null>]>>>;
|
|
69
|
+
item_id: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
70
|
+
}, zod.z.core.$strip>>>>;
|
|
58
71
|
}, zod.z.core.$strip>;
|
|
59
72
|
export declare const checkTransactionTypeResponseIssuerCountryCodeMin = 2;
|
|
60
73
|
export declare const checkTransactionTypeResponseIssuerCountryCodeMax = 2;
|
|
@@ -68,4 +81,5 @@ export declare const CheckTransactionTypeResponse: zod.ZodObject<{
|
|
|
68
81
|
vies_valid: zod.ZodNullable<zod.ZodBoolean>;
|
|
69
82
|
warning: zod.ZodNullable<zod.ZodString>;
|
|
70
83
|
is_tax_subject: zod.ZodOptional<zod.ZodBoolean>;
|
|
84
|
+
hmrc_valid: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
|
|
71
85
|
}, zod.z.core.$strip>;
|
|
@@ -25,6 +25,12 @@ Applies when:
|
|
|
25
25
|
- Issuer is an EU tax subject
|
|
26
26
|
- Customer is in a different EU country with valid tax number, OR customer is outside EU
|
|
27
27
|
|
|
28
|
+
**Northern Ireland:**
|
|
29
|
+
A customer is in Northern Ireland when its country_code is `XI`, or `GB` with an `XI`-prefixed VAT number. Great Britain and Northern Ireland are one country for domestic sales. Between the EU and Northern Ireland, `supply_type` decides: `goods` are an intra-EU supply (`intra_eu_b2b` when VIES confirms the XI number or VIES is unavailable, `intra_eu_b2c` when VIES rejects it or there is no number), `services` are a third-country supply (`3w_b2b` / `3w_b2c`). Instead of `supply_type` you can send the document's `items` (classification and item_id per line): the supply type is then derived exactly as for a saved document. Without either, the sale is classified as third-country and `warning` says so.
|
|
30
|
+
|
|
31
|
+
**UK VAT numbers:**
|
|
32
|
+
A UK customer's tax number with a GB or XI prefix that VIES does not cover gets a format check (9 or 12 digits with valid check digits); a failed check is reported in `warning`. A number without the prefix that is not a VAT number (a company number, a UTR) is ignored. `hmrc_valid` carries HMRC's answer when the HMRC lookup is enabled. Neither changes `transaction_type`.
|
|
33
|
+
|
|
28
34
|
**End Consumer Override:**
|
|
29
35
|
When customer.is_end_consumer is true, forces B2C classification for non-EU transactions even if the customer has a tax number. For intra-EU transactions, VIES validation takes precedence.
|
|
30
36
|
|
|
@@ -32,7 +38,7 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
|
|
|
32
38
|
When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
|
|
33
39
|
|
|
34
40
|
**Entity VIES setting:**
|
|
35
|
-
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
41
|
+
When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request and no UK VAT number check is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
|
|
36
42
|
* @summary Check transaction type
|
|
37
43
|
*/
|
|
38
44
|
export declare const CheckTransactionTypeHeader: zod.ZodObject<{
|
|
@@ -48,6 +54,7 @@ export declare const CheckTransactionTypeBody: zod.ZodObject<{
|
|
|
48
54
|
country: zod.ZodOptional<zod.ZodString>;
|
|
49
55
|
country_code: zod.ZodOptional<zod.ZodString>;
|
|
50
56
|
is_tax_subject: zod.ZodDefault<zod.ZodBoolean>;
|
|
57
|
+
tax_number: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
51
58
|
}, zod.z.core.$strip>;
|
|
52
59
|
customer: zod.ZodObject<{
|
|
53
60
|
country: zod.ZodOptional<zod.ZodString>;
|
|
@@ -55,6 +62,12 @@ export declare const CheckTransactionTypeBody: zod.ZodObject<{
|
|
|
55
62
|
tax_number: zod.ZodOptional<zod.ZodString>;
|
|
56
63
|
is_end_consumer: zod.ZodOptional<zod.ZodBoolean>;
|
|
57
64
|
}, zod.z.core.$strip>;
|
|
65
|
+
supply_type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"goods">, zod.ZodLiteral<"services">, zod.ZodLiteral<null>]>>>;
|
|
66
|
+
items: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
67
|
+
type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"separator">, zod.ZodLiteral<null>]>>>;
|
|
68
|
+
classification: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"product">, zod.ZodLiteral<"service">, zod.ZodLiteral<"advance">, zod.ZodLiteral<null>]>>>;
|
|
69
|
+
item_id: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
70
|
+
}, zod.z.core.$strip>>>>;
|
|
58
71
|
}, zod.z.core.$strip>;
|
|
59
72
|
export declare const checkTransactionTypeResponseIssuerCountryCodeMin = 2;
|
|
60
73
|
export declare const checkTransactionTypeResponseIssuerCountryCodeMax = 2;
|
|
@@ -68,4 +81,5 @@ export declare const CheckTransactionTypeResponse: zod.ZodObject<{
|
|
|
68
81
|
vies_valid: zod.ZodNullable<zod.ZodBoolean>;
|
|
69
82
|
warning: zod.ZodNullable<zod.ZodString>;
|
|
70
83
|
is_tax_subject: zod.ZodOptional<zod.ZodBoolean>;
|
|
84
|
+
hmrc_valid: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
|
|
71
85
|
}, zod.z.core.$strip>;
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
/**
|
|
10
10
|
* **Deprecated:** Use `POST /transaction-type/check` instead. This endpoint is kept for backward compatibility.
|
|
11
|
+
|
|
12
|
+
This endpoint never selects an entity. When `items` are sent, a line's own `classification` is used, but a line that only has an `item_id` cannot take its classification from the catalog here and counts as unclassified. Use `POST /transaction-type/check` with the entity selected for that.
|
|
11
13
|
* @deprecated
|
|
12
14
|
* @summary Check VIES status (deprecated)
|
|
13
15
|
*/
|
|
@@ -21,6 +23,7 @@ export declare const CheckViesBody: zod.ZodObject<{
|
|
|
21
23
|
country: zod.ZodOptional<zod.ZodString>;
|
|
22
24
|
country_code: zod.ZodOptional<zod.ZodString>;
|
|
23
25
|
is_tax_subject: zod.ZodDefault<zod.ZodBoolean>;
|
|
26
|
+
tax_number: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
24
27
|
}, zod.z.core.$strip>;
|
|
25
28
|
customer: zod.ZodObject<{
|
|
26
29
|
country: zod.ZodOptional<zod.ZodString>;
|
|
@@ -28,6 +31,12 @@ export declare const CheckViesBody: zod.ZodObject<{
|
|
|
28
31
|
tax_number: zod.ZodOptional<zod.ZodString>;
|
|
29
32
|
is_end_consumer: zod.ZodOptional<zod.ZodBoolean>;
|
|
30
33
|
}, zod.z.core.$strip>;
|
|
34
|
+
supply_type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"goods">, zod.ZodLiteral<"services">, zod.ZodLiteral<null>]>>>;
|
|
35
|
+
items: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
36
|
+
type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"separator">, zod.ZodLiteral<null>]>>>;
|
|
37
|
+
classification: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"product">, zod.ZodLiteral<"service">, zod.ZodLiteral<"advance">, zod.ZodLiteral<null>]>>>;
|
|
38
|
+
item_id: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
39
|
+
}, zod.z.core.$strip>>>>;
|
|
31
40
|
}, zod.z.core.$strip>;
|
|
32
41
|
export declare const checkViesResponseIssuerCountryCodeMin = 2;
|
|
33
42
|
export declare const checkViesResponseIssuerCountryCodeMax = 2;
|
|
@@ -41,4 +50,5 @@ export declare const CheckViesResponse: zod.ZodObject<{
|
|
|
41
50
|
vies_valid: zod.ZodNullable<zod.ZodBoolean>;
|
|
42
51
|
warning: zod.ZodNullable<zod.ZodString>;
|
|
43
52
|
is_tax_subject: zod.ZodOptional<zod.ZodBoolean>;
|
|
53
|
+
hmrc_valid: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
|
|
44
54
|
}, zod.z.core.$strip>;
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
/**
|
|
10
10
|
* **Deprecated:** Use `POST /transaction-type/check` instead. This endpoint is kept for backward compatibility.
|
|
11
|
+
|
|
12
|
+
This endpoint never selects an entity. When `items` are sent, a line's own `classification` is used, but a line that only has an `item_id` cannot take its classification from the catalog here and counts as unclassified. Use `POST /transaction-type/check` with the entity selected for that.
|
|
11
13
|
* @deprecated
|
|
12
14
|
* @summary Check VIES status (deprecated)
|
|
13
15
|
*/
|
|
@@ -21,6 +23,7 @@ export declare const CheckViesBody: zod.ZodObject<{
|
|
|
21
23
|
country: zod.ZodOptional<zod.ZodString>;
|
|
22
24
|
country_code: zod.ZodOptional<zod.ZodString>;
|
|
23
25
|
is_tax_subject: zod.ZodDefault<zod.ZodBoolean>;
|
|
26
|
+
tax_number: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
24
27
|
}, zod.z.core.$strip>;
|
|
25
28
|
customer: zod.ZodObject<{
|
|
26
29
|
country: zod.ZodOptional<zod.ZodString>;
|
|
@@ -28,6 +31,12 @@ export declare const CheckViesBody: zod.ZodObject<{
|
|
|
28
31
|
tax_number: zod.ZodOptional<zod.ZodString>;
|
|
29
32
|
is_end_consumer: zod.ZodOptional<zod.ZodBoolean>;
|
|
30
33
|
}, zod.z.core.$strip>;
|
|
34
|
+
supply_type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"goods">, zod.ZodLiteral<"services">, zod.ZodLiteral<null>]>>>;
|
|
35
|
+
items: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodObject<{
|
|
36
|
+
type: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"separator">, zod.ZodLiteral<null>]>>>;
|
|
37
|
+
classification: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"product">, zod.ZodLiteral<"service">, zod.ZodLiteral<"advance">, zod.ZodLiteral<null>]>>>;
|
|
38
|
+
item_id: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
39
|
+
}, zod.z.core.$strip>>>>;
|
|
31
40
|
}, zod.z.core.$strip>;
|
|
32
41
|
export declare const checkViesResponseIssuerCountryCodeMin = 2;
|
|
33
42
|
export declare const checkViesResponseIssuerCountryCodeMax = 2;
|
|
@@ -41,4 +50,5 @@ export declare const CheckViesResponse: zod.ZodObject<{
|
|
|
41
50
|
vies_valid: zod.ZodNullable<zod.ZodBoolean>;
|
|
42
51
|
warning: zod.ZodNullable<zod.ZodString>;
|
|
43
52
|
is_tax_subject: zod.ZodOptional<zod.ZodBoolean>;
|
|
53
|
+
hmrc_valid: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
|
|
44
54
|
}, zod.z.core.$strip>;
|