Poll Results Request

After the initial Bulk Validation request is sent and the processing begins, the time needed to complete this processing can vary.

To return an update on how many IDs have been processed, use a GET operation and the following URL:

{service_url}/bulk/api/v1/validate_tax_number

where {service_url} is the URL of the service's environment.

You can also use this request to retrieve previously created results. To do so, you need to specify the request_id in the URL. For example, use a GET operation and the following URL:

{service_url}/bulk/api/v1/validate_tax_number/(request_id}

where:

  • {service_url} is the URL of the service's environment.
  • (request_id} is Offset ID that that is used to identify the set of results.

Details

TypeValue
Endpoint/bulk/api/v1/validate_tax_number/(request_id}
MethodGET
API Reference TopicValidate VAT number

Query Parameter

You can specify the following optional query parameter in your requests:

FieldDescription
request_idThe ID that is generated when the service returns a set of result. Specify it in the URL of your request if you wan to retrieve those results.

The service returns an Offset ID in the request_id field. You can use this ID in subsequent requests to retrieve this set of results again. For example, you can use a GET operation and the following URL:

{service_url}//bulk/api/v1/validate_tax_number/{request_id}

where

  • {service_url} is the URL of the service's environment.
  • {request_id} is the Offset ID that you want to retrieve.

Response Parameters

The following fields are returned in the response to this request:

FieldDescription
request_idThe ID that is generated when the service returns a set of result.
idAn internal results identifier.
statusThe entry can have one of the following statuses:
  • Processed: The ID has been processed successfully.
  • Timeout: The validation failed due to a timeout error.
  • Error: The processing failed due to an unexpected error. For example, if the service could not connect to the repository of Tax IDs.
  • buyer_tax_number_consultation_idThis ID is generated by the service and is assigned to each validation result. You can use to identify it later.

    The response also contains the same output fields as any other Vertex Validator response. See Vertex Validator Output Schema.

    Response

    The following is an example response.

    {
        "items": [
            {
                "id": "CO31AxAAMAA=",
                "output": {
                    "billing_country_code": "PL",
                    "buyer_tax_number": "7251971133",
                    "buyer_tax_number_format_valid": true,
                    "buyer_tax_number_normalized": "7251971133",
                    "buyer_tax_number_cached": "false",
                    "buyer_tax_number_consultaion_id": "ABCGHTYTFqr3yrBRB",
                    "buyer_tax_number_valid": false,
                    "tax_deducted": false,
                    "warnings": [
                        {
                            "message": "ID Recorded, Tax Applicable Sale",
                            "type": "tax-applicable-sale"
                        }
                    ]
                },
                "request_id": "COz1AxABMAA=",
                "status": "processed"
            },
            {
                "id": "CO31AxABMAA=",
                "output": {
                    "billing_country_code": "NL",
                    "buyer_tax_number": "0251981133",
                    "buyer_tax_number_format_valid": true,
                    "buyer_tax_number_normalized": "0251981133",
                    "buyer_tax_number_cached": "false",
                    "buyer_tax_number_consultaion_id": "HGHJHYTRqr1fHGH",
                    "buyer_tax_number_valid": false,
                    "tax_deducted": false,
                    "warnings": [
                        {
                            "message": "ID Recorded, Tax Applicable Sale",
                            "type": "tax-applicable-sale"
                        }
                    ]
                },
                "request_id": "COz1AxAAMAA=",
                "status": "processed"
            }
        ]
    }