Examples

View example requests and responses to understand how the validation service works.

Use these examples with the Calculate Tax as a Seller request.

Valid tax number

This example validates a single business tax number against the VAT Info.

Request

{

    "saleMessageType": "QUOTATION",
    "lineItems": [
        {
            "customer": {
                "customerName": "Swatch",
                "destination": {
                    "country": "CH"
                },
                "taxRegistrations": [
                    {
                        "taxRegistrationNumber": "CHCHE-116.294.121",
                        "taxRegistrationType": "VAT Registration"
                    },
                    {
                        "taxRegistrationNumber": "GB473116503"
                    }
                ]
            },
            "extendedPrice": 100
        },
        {
            "customer": {
                "customerCode": {
                    "value": "orlen"
                },
                "customerName": "Orlen",
                "destination": {
                    "country": "Poland"
                },
                "taxRegistrations": [
                    {
                        "isoCountryCode": "PL",
                        "taxRegistrationNumber": "PL774-00-01-454",
                        "taxRegistrationType": "VAT Registration"
                    }
                ]
            },
            "extendedPrice": 100
        }
    ],
    "seller": {
        "company": "demoSeller",
        "physicalOrigin": {
            "country": "FR"
        }
    },
    "transactionType": "SALE"
}

Response

{
    "data": {
        "documentDate": "2025-07-23",
        "lineItems": [
            {
                "customer": {
                    "customerName": "MWST-Gruppe, The Swatch Group SA",
                    "destination": {
                        "country": "CH",
                        "taxAreaId": "807560000"
                    },
                    "taxRegistrations": [
                        {
                            "isoCountryCode": "CH",
                            "taxRegistrationNumber": "CHCHE-116.294.121",
                            "taxRegistrationType": "VAT Registration",
                            "validationResult": {
                                "cacheTimestamp": "2025-07-23T09:35:34.4650Z",
                                "cached": true,
                                "isSyntaxValid": true,
                                "isValid": true,
                                "name": "MWST-Gruppe, The Swatch Group SA",
                                "taxNumberService": "uid.admin.ch",
                                "taxRegistrationNumberNormalized": "CHE116.294.121",
                                "validationInfo": "tax-number-valid-according-to-external-service"
                            }
                        },
                        {
                            "isoCountryCode": "GB",
                            "taxRegistrationNumber": "GB473116503",
                            "validationResult": {
                                "address": "BUILDING 1000\nTHE ROYALS BUSINESS PARK\nLONDON\nE16 2QU\nGB",
                                "cacheTimestamp": "2025-07-23T09:35:34.0210Z",
                                "cached": true,
                                "isSyntaxValid": true,
                                "isValid": true,
                                "name": "THE SWATCH GROUP (UK) LIMITED",
                                "taxNumberService": "tax.service.gov.uk",
                                "taxRegistrationNumberNormalized": "473116503",
                                "validationInfo": "tax-number-valid-according-to-external-service"
                            }
                        }
                    ]
                },
                "extendedPrice": 100.0,
                "fairMarketValue": 100.0,
                "quantity": {
                    "value": 1.0
                },
                "seller": {
                    "company": "demoSeller",
                    "physicalOrigin": {
                        "country": "FR",
                        "taxAreaId": "802500000"
                    },
                    "taxRegistrations": []
                },
                "taxIncludedIndicator": false,
                "taxes": [
                    {
                        "calculatedTax": 0.0,
                        "effectiveRate": 0.0,
                        "exempt": 0.0,
                        "invoiceTextCodes": [
                            1,
                            16
                        ],
                        "isService": false,
                        "jurisdiction": {
                            "effectiveDate": "1900-01-01",
                            "expirationDate": "9999-12-31",
                            "jurisdictionId": "78282",
                            "jurisdictionType": "COUNTRY",
                            "value": "FRANCE"
                        },
                        "maxTaxIndicator": false,
                        "nonTaxable": 0.0,
                        "notRegisteredIndicator": false,
                        "situs": "PHYSICAL_ORIGIN",
                        "taxCollectedFromParty": "BUYER",
                        "taxRateReductionExempt": 0.0,
                        "taxResult": "NO_TAX",
                        "taxType": "NONE",
                        "taxable": 0.0
                    }
                ],
                "totalTax": 0.0,
                "transactionType": "SALE"
            },
            {
                "customer": {
                    "customerCode": {
                        "isBusinessIndicator": true,
                        "value": "orlen"
                    },
                    "customerName": "ORLEN SPÓŁKA AKCYJNA",
                    "destination": {
                        "country": "Poland",
                        "taxAreaId": "806160000"
                    },
                    "isTaxExempt": false,
                    "taxRegistrations": [
                        {
                            "isoCountryCode": "PL",
                            "taxRegistrationNumber": "PL774-00-01-454",
                            "taxRegistrationType": "VAT Registration",
                            "validationResult": {
                                "address": "CHEMIKÓW 7\n09-411 PŁOCK",
                                "cacheTimestamp": "2025-07-23T09:35:34.0000Z",
                                "cached": true,
                                "isSyntaxValid": true,
                                "isValid": true,
                                "name": "ORLEN SPÓŁKA AKCYJNA",
                                "taxNumberService": "vies",
                                "taxRegistrationNumberNormalized": "7740001454",
                                "validationInfo": "tax-number-valid-according-to-external-service"
                            }
                        }
                    ]
                },
                "extendedPrice": 100.0,
                "fairMarketValue": 100.0,
                "quantity": {
                    "value": 1.0
                },
                "seller": {
                    "company": "demoSeller",
                    "physicalOrigin": {
                        "country": "FR",
                        "taxAreaId": "802500000"
                    },
                    "taxRegistrations": []
                },
                "taxIncludedIndicator": false,
                "taxes": [
                    {
                        "buyerRegistrationId": "PL774-00-01-454",
                        "calculatedTax": 0.0,
                        "effectiveRate": 0.0,
                        "exempt": 0.0,
                        "invoiceTextCodes": [
                            2,
                            16
                              ],
                        "isService": false,
                        "jurisdiction": {
                            "effectiveDate": "1900-01-01",
                            "expirationDate": "9999-12-31",
                            "jurisdictionId": "78282",
                            "jurisdictionType": "COUNTRY",
                            "value": "FRANCE"
                        },
                        "maxTaxIndicator": false,
                        "nonTaxable": 0.0,
                        "notRegisteredIndicator": false,
                        "situs": "PHYSICAL_ORIGIN",
                        "taxCollectedFromParty": "BUYER",
                        "taxRateReductionExempt": 0.0,
                        "taxResult": "NO_TAX",
                        "taxType": "NONE",
                        "taxable": 0.0
                    }
                ],
                 "totalTax": 0.0,
                "transactionType": "SALE"
            }
        ],
        "returnAssistedParametersIndicator": true,
        "roundAtLineLevel": false,
        "saleMessageType": "QUOTATION",
        "seller": {
            "company": "demoSeller",
            "physicalOrigin": {
                "country": "FR",
                "taxAreaId": "802500000"
            },
            "taxRegistrations": []
        },
        "subTotal": 200.0,
        "total": 200.0,
        "totalTax": 0.0,
        "transactionType": "SALE"
    },
    "meta": {
        "app": "vertex-ws.war v9.0.20.1.25",
        "extension": "oseries-plus 20250722144320-9da1187d6204c073ac0dc4d6d8efec0f32544d28",
        "timeElapsed(ms)": 23,
        "timeReceived": "2025-07-23T09:36:56.632Z"
    }
}

Invalid tax number

This example shows the response when the tax number is invalid.

Request

{
    "saleMessageType": "QUOTATION",
    "deliveryTerm": "SUP",
    "customer": {
        "customerCode": {
            "value": "customer1"
        },
        "destination": {
            "country": "Poland"
        },
        "taxRegistrations": [
            {
                "isoCountryCode": "PL",
                "taxRegistrationNumber": "PL774-00-01-451",
                "taxRegistrationType": "VAT Registration"
            }
        ]
    },
    "lineItems": [
        {
            "extendedPrice": 100,
            "seller": {
                "company": "seller1",
                "physicalOrigin": {
                    "country": "DE"
                }
            }
        }
    ],
    "transactionType": "SALE"
}

Response

{
    "data": {
        "customer": {
            "customerCode": {
                "isBusinessIndicator": false,
                "value": "customer1"
            },
            "destination": {
                "country": "Poland",
                "taxAreaId": "806160000"
            },
            "isTaxExempt": false,
            "taxRegistrations": [
                {
                    "isoCountryCode": "PL",
                    "taxRegistrationNumber": "PL774-00-01-451",
                    "taxRegistrationType": "VAT Registration",
                    "validationResult": {
                        "cacheTimestamp": "2025-07-23T11:54:11.3610Z",
                        "cached": true,
                        "isSyntaxValid": true,
                        "isValid": false,
                        "taxNumberService": "vies",
                        "taxRegistrationNumberNormalized": "7740001451",
                        "validationInfo": "TAX_NUMBER_INVALID_ACCORDING_TO_EXTERNAL_SERVICE"
                    }
                }
            ]
        },
        "deliveryTerm": "SUP",
        "documentDate": "2025-07-23",
        "lineItems": [
            {
                "backToBackInvoice": {
                    "country": "DE"
                },
                "customer": {
                    "customerCode": {
                        "isBusinessIndicator": false,
                        "value": "customer1"
                    },
                    "destination": {
                        "country": "Poland",
                        "taxAreaId": "806160000"
                    },
                    "isTaxExempt": false,
                    "taxRegistrations": [
                        {
                            "isoCountryCode": "PL",
                            "taxRegistrationNumber": "PL774-00-01-451",
                            "taxRegistrationType": "VAT Registration",
                            "validationResult": {
                                "cacheTimestamp": "2025-07-23T11:54:11.3610Z",
                                "cached": true,
                                "isSyntaxValid": true,
                                "isValid": false,
                                "taxNumberService": "vies",
                                "taxRegistrationNumberNormalized": "7740001451",
                                "validationInfo": "TAX_NUMBER_INVALID_ACCORDING_TO_EXTERNAL_SERVICE"
                            }
                        }
                    ]
                },
                "deliveryTerm": "SUP",
                "extendedPrice": 100.0,
                "fairMarketValue": 100.0,
                "quantity": {
                    "value": 1.0
                },
                "seller": {
                    "company": "seller1",
                    "physicalOrigin": {
                        "country": "DE",
                        "taxAreaId": "802760000"
                    },
                    "taxRegistrations": []
                },
                "taxIncludedIndicator": false,
                "taxes": [
                    {
                        "calculatedTax": 0.0,
                        "effectiveRate": 0.0,
                        "exempt": 0.0,
                        "invoiceTextCodes": [
                            16,
                            27
                        ],
                        "isService": false,
                        "jurisdiction": {
                            "effectiveDate": "1900-01-01",
                            "expirationDate": "9999-12-31",
                            "jurisdictionId": "78283",
                            "jurisdictionType": "COUNTRY",
                            "value": "GERMANY"
                        },
                        "maxTaxIndicator": false,
                        "nonTaxable": 0.0,
                        "notRegisteredIndicator": false,
                        "situs": "PHYSICAL_ORIGIN",
                        "taxCollectedFromParty": "BUYER",
                        "taxRateReductionExempt": 0.0,
                        "taxResult": "NO_TAX",
                        "taxType": "NONE",
                        "taxable": 0.0
                    },
                    {
                        "calculatedTax": 23.0,
                        "calculationRuleId": {
                            "salesTaxHolidayIndicator": false,
                            "userDefined": false,
                            "value": "v301086010"
                        },
                        "effectiveRate": 0.23,
                        "exempt": 0.0,
                        "imposition": {
                            "impositionId": "1",
                            "jurisdictionId": "78327",
                            "userDefined": false,
                            "value": "VAT"
                        },
                        "impositionType": {
                            "impositionTypeId": "v19",
                            "userDefined": false,
                            "value": "VAT"
                        },
                        "inputOutputType": "OUTPUT",
                        "invoiceTextCodes": [
                            2,
                            27
                        ],
                        "isService": false,
                        "jurisdiction": {
                            "effectiveDate": "1900-01-01",
                            "expirationDate": "9999-12-31",
                            "jurisdictionId": "78327",
                            "jurisdictionType": "COUNTRY",
                            "value": "POLAND"
                        },
                        "maxTaxIndicator": false,
                        "nominalRate": 0.23,
                        "nonTaxable": 0.0,
                        "notRegisteredIndicator": false,
                        "postCalculationEvaluationRuleId": {
                            "salesTaxHolidayIndicator": false,
                            "userDefined": false,
                            "value": "v318456382"
                        },
                        "rateClassification": "Standard Rate",
                        "situs": "DESTINATION",
                        "taxCollectedFromParty": "BUYER",
                        "taxLiabilityOwner": "MARKETPLACE",
                        "taxLiabilityRule": "physical-shipment-inside-EU-seller-outside-EU",
                        "taxRateReductionExempt": 0.0,
                        "taxResult": "TAXABLE",
                        "taxStructure": "SINGLE_RATE",
                        "taxType": "VAT",
                        "taxable": 100.0
                    }
                ],
                "totalTax": 23.0,
                "transactionType": "SALE"
            }
        ],
        "returnAssistedParametersIndicator": true,
        "roundAtLineLevel": false,
        "saleMessageType": "QUOTATION",
        "subTotal": 100.0,
        "total": 123.0,
        "totalTax": 23.0,
        "transactionType": "SALE"
    },
    "meta": {
        "app": "vertex-ws.war v9.0.20.1.25",
        "extension": "oseries-plus 20250723095736-9b25506a74da7a403dc802e3b48c920b202ace1e",
        "timeElapsed(ms)": 21,
        "timeReceived": "2025-07-23T11:56:15.998Z"
    }
}

 

Domestic tax number

This example shows how the service validates a domestic tax number.

Request

{
    "saleMessageType": "QUOTATION",
    "deliveryTerm": "SUP",
    "customer": {
        "customerCode": {
            "value": "customer1"
        },
        "destination": {
            "country": "Poland"
        },
        "taxRegistrations": [
            {
                "isoCountryCode": "PL",
                "taxRegistrationNumber": "PL774-00-01-451",
                "taxRegistrationType": "VAT Registration"
            }
        ]
    },
    "lineItems": [
        {
            "extendedPrice": 100,
            "seller": {
                "company": "seller1",
                "physicalOrigin": {
                    "country": "PL"
                }
            }
        }
    ],
    "transactionType": "SALE"
}

Response

{
    "data": {
        "customer": {
            "customerCode": {
                "isBusinessIndicator": true,
                "value": "customer1"
            },
            "destination": {
                "country": "Poland",
                "taxAreaId": "806160000"
            },
            "isTaxExempt": false,
            "taxRegistrations": [
                {
                    "isoCountryCode": "PL",
                    "taxRegistrationNumber": "PL774-00-01-451",
                    "taxRegistrationType": "VAT Registration",
                    "validationResult": {
                        "isSyntaxValid": true,
                        "isValid": true,
                        "taxRegistrationNumberNormalized": "7740001451",
                        "validationInfo": "TAX_NUMBER_CONSIDERED_VALID_IN_DOMESTIC_COUNTRY"
                    }
                }
            ]
        },
        "deliveryTerm": "SUP",
        "documentDate": "2025-07-23",
        "lineItems": [
            {
                "customer": {
                    "customerCode": {
                        "isBusinessIndicator": true,
                        "value": "customer1"
                    },
                    "destination": {
                        "country": "Poland",
                        "taxAreaId": "806160000"
                    },
                    "isTaxExempt": false,
                    "taxRegistrations": [
                        {
                            "isoCountryCode": "PL",
                            "taxRegistrationNumber": "PL774-00-01-451",
                            "taxRegistrationType": "VAT Registration",
                            "validationResult": {
                                "isSyntaxValid": true,
                                "isValid": true,
                                "taxRegistrationNumberNormalized": "7740001451",
                                "validationInfo": "TAX_NUMBER_CONSIDERED_VALID_IN_DOMESTIC_COUNTRY"
                            }
                        }
                    ]
                },
                "deliveryTerm": "SUP",
                "extendedPrice": 100.0,
                "fairMarketValue": 100.0,
                "quantity": {
                    "value": 1.0
                },
                "seller": {
                    "company": "seller1",
                    "physicalOrigin": {
                        "country": "PL",
                        "taxAreaId": "806160000"
                    },
                    "taxRegistrations": []
                },
                "taxIncludedIndicator": false,
                "taxes": [
                    {
                        "buyerRegistrationId": "PL774-00-01-451",
                        "calculatedTax": 23.0,
                        "calculationRuleId": {
                            "salesTaxHolidayIndicator": false,
                            "userDefined": false,
                            "value": "v301086010"
                        },
                        "effectiveRate": 0.23,
                        "exempt": 0.0,
                        "imposition": {
                            "impositionId": "1",
                            "jurisdictionId": "78327",
                            "userDefined": false,
                            "value": "VAT"
                        },
                        "impositionType": {
                            "impositionTypeId": "v19",
                            "userDefined": false,
                            "value": "VAT"
                        },
                        "inputOutputType": "OUTPUT",
                        "invoiceTextCodes": [
                            18,
                            21
                        ],
                        "isService": false,
                        "jurisdiction": {
                            "effectiveDate": "1900-01-01",
                            "expirationDate": "9999-12-31",
                            "jurisdictionId": "78327",
                            "jurisdictionType": "COUNTRY",
                            "value": "POLAND"
                        },
                        "maxTaxIndicator": false,
                        "nominalRate": 0.23,
                        "nonTaxable": 0.0,
                        "notRegisteredIndicator": false,
                        "postCalculationEvaluationRuleId": {
                            "salesTaxHolidayIndicator": false,
                            "userDefined": false,
                            "value": "v318456382"
                        },
                        "rateClassification": "Standard Rate",
                        "situs": "DESTINATION",
                        "taxCollectedFromParty": "BUYER",
                        "taxLiabilityOwner": "SELLER",
                        "taxLiabilityRule": "physical-shipment-inside-EU-b2b-domestic",
                        "taxRateReductionExempt": 0.0,
                        "taxResult": "TAXABLE",
                        "taxStructure": "SINGLE_RATE",
                        "taxType": "VAT",
                        "taxable": 100.0
                    }
                ],
                "totalTax": 23.0,
                "transactionType": "SALE"
            }
        ],
        "returnAssistedParametersIndicator": true,
        "roundAtLineLevel": false,
        "saleMessageType": "QUOTATION",
        "subTotal": 100.0,
        "total": 123.0,
        "totalTax": 23.0,
        "transactionType": "SALE"
    },
    "meta": {
        "app": "vertex-ws.war v9.0.20.1.25",
        "extension": "oseries-plus 20250723095736-9b25506a74da7a403dc802e3b48c920b202ace1e",
        "timeElapsed(ms)": 9,
        "timeReceived": "2025-07-23T12:01:04.014Z"
    }
}

Validate multiple tax numbers

This example shows how the service validates multiple tax numbers using the buyer_tax_numbers object.

"buyer_tax_numbers": [
         {"buyer_tax_number": "119364511"},
         {"buyer_tax_number": "7273121"}
     ],