Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tax ID Pro (Independent Publisher) #3690

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
{
"swagger": "2.0",
"info": {
"title": "Tax ID Pro",
"description": "Tax ID Pro makes it easy to validate over 200 different tax ID formats for over 100+ countries.",
"version": "1.0",
"contact": {
"name": "Fördős András",
"email": "[email protected]"
}
},
"host": "v3.api.taxid.pro",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [],
"paths": {
"/validate": {
"get": {
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"is_valid": {
"type": "boolean",
"description": "Defines, whether the tax number is valid or not.",
"title": "Is valid?"
},
"message": {
"type": "string",
"description": "If the tax number is invalid, this property provides further guidance.",
"title": "Message"
},
"tin_compact": {
"type": "string",
"description": "Compact format of the tax number.",
"title": "TIN compact"
},
"tin_standard": {
"type": "string",
"description": "Tax number in its standard format.",
"title": "TIN standard"
},
"country_name": {
"type": "string",
"description": "Name of the identified country to where the tax number belongs.",
"title": "Country name"
},
"format_name": {
"type": "string",
"description": "Name of the tax number format.",
"title": "Format name"
}
}
}
}
},
"summary": "Tax ID Validation",
"operationId": "Validate",
"description": "The Tax ID Pro API makes it easy to validate tax ID numbers for over 100 countries.",
"parameters": [
{
"name": "country",
"in": "query",
"required": true,
"type": "string",
"x-ms-summary": "Country",
"description": "A two-letter country code, as defined in the ISO standard. If you need to use IRS country codes, see the is_irs query parameter"
},
{
"name": "tin",
"in": "query",
"required": true,
"type": "string",
"x-ms-summary": "TIN",
"description": "The tax ID Number. It may contain numbers, letters (uppercase or lowercase), dots, dashes, or slashes."
},
{
"name": "type",
"in": "query",
"required": false,
"type": "string",
"description": "Specify type of tax number. Exclude this parameter to test all available types for a given country.",
"x-ms-summary": "Type",
"enum": [
"individual",
"entity",
"vat"
]
},
{
"name": "locale",
"in": "query",
"required": false,
"type": "string",
"x-ms-summary": "Locale",
"description": "Determines the language of the message property in the response. Messages are in English by default.",
"enum": [
"auto",
"nl",
"en",
"fr",
"de",
"it",
"jp",
"ru",
"es"
]
},
{
"name": "is_irs",
"in": "query",
"required": false,
"type": "boolean",
"description": "If you are using IRS country codes instead of ISO country codes, set is_irs to true",
"x-ms-summary": "Is IRS"
}
]
}
},
"/lookup": {
"get": {
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"is_valid": {
"type": "boolean",
"description": "Defines, whether the tax number is valid or not.",
"title": "Is valid?"
},
"message": {
"type": "string",
"description": "If the tax number is invalid, this property provides further guidance.",
"title": "Message"
},
"tin_compact": {
"type": "string",
"description": "Compact format of the tax number.",
"title": "TIN compact"
},
"tin_standard": {
"type": "string",
"description": "Tax number in its standard format.",
"title": "TIN standard"
},
"country_name": {
"type": "string",
"description": "Name of the identified country to where the tax number belongs.",
"title": "Country name"
},
"format_name": {
"type": "string",
"description": "Name of the tax number format.",
"title": "Format name"
},
"lookup_data": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Associated name.",
"title": "Name"
},
"address": {
"type": "string",
"description": "Associated address.",
"title": "Address"
}
}
}
}
}
}
},
"summary": "Tax ID Lookup",
"operationId": "Lookup",
"description": "The lookup endpoint first validates the tax number, then enriches the response with additional data.",
"parameters": [
{
"name": "country",
"in": "query",
"required": true,
"type": "string",
"x-ms-summary": "Country",
"description": "A two-letter country code, as defined in the ISO standard. If you need to use IRS country codes, see the is_irs query parameter"
},
{
"name": "tin",
"in": "query",
"required": true,
"type": "string",
"x-ms-summary": "TIN",
"description": "The tax ID Number. It may contain numbers, letters (uppercase or lowercase), dots, dashes, or slashes."
},
{
"name": "type",
"in": "query",
"required": false,
"type": "string",
"description": "Specify type of tax number. Exclude this parameter to test all available types for a given country.",
"x-ms-summary": "Type",
"enum": [
"individual",
"entity",
"vat"
]
},
{
"name": "locale",
"in": "query",
"required": false,
"type": "string",
"x-ms-summary": "Locale",
"description": "Determines the language of the message property in the response. Messages are in English by default.",
"enum": [
"auto",
"nl",
"en",
"fr",
"de",
"it",
"jp",
"ru",
"es"
]
},
{
"name": "is_irs",
"in": "query",
"required": false,
"type": "boolean",
"description": "If you are using IRS country codes instead of ISO country codes, set is_irs to true",
"x-ms-summary": "Is IRS"
}
]
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {
"API Key": {
"type": "apiKey",
"in": "header",
"name": "api_key"
}
},
"security": [
{
"API Key": []
}
],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://taxid.pro/"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://taxid.pro/docs/privacy-policy"
},
{
"propertyName": "Categories",
"propertyValue": "Data"
}
]
}
24 changes: 24 additions & 0 deletions independent-publisher-connectors/Tax ID Pro/apiProperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"properties": {
"connectionParameters": {
"api_key": {
"type": "securestring",
"uiDefinition": {
"displayName": "API Key",
"description": "The API Key for this api",
"tooltip": "Provide your API Key",
"constraints": {
"tabIndex": 2,
"clearText": false,
"required": "true"
}
}
}
},
"iconBrandColor": "#da3b01",
"capabilities": [],
"policyTemplateInstances": [],
"publisher": "Fördős András",
"stackOwner": "Balancer Services LLC"
}
}
24 changes: 24 additions & 0 deletions independent-publisher-connectors/Tax ID Pro/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Tax ID Pro
Tax ID Pro makes it easy to validate over 200 different tax ID formats for over 100+ countries.

## Publisher: Fördős András

## Prerequisites
There are no prerequisites needed for this connector.

## Obtaining Credentials
You need to have an API key, for which you must sign for the service. There is a free plan available, follow the instructions here: [https://taxid.pro/docs/getting-started](https://taxid.pro/docs/getting-started)

## Supported Operations
### Validate
The Tax ID Pro API makes it easy to validate tax ID numbers for over 100 countries.
### Lookup
The lookup endpoint first validates the tax number, then enriches the response with additional data.

## Known Issues and Limitations
There are no known issues at this time.

The connector does not implement the batch endpoint from the udnerlying service, while there might be missing parameters and properties too. If you miss anything, get in touch and let's figure out together how to bring in the missing pie
fordosa90 marked this conversation as resolved.
Show resolved Hide resolved

Additionally, there might be limits applied by the underlying service based on your subscription plan.

21 changes: 21 additions & 0 deletions independent-publisher-connectors/Tax ID Pro/script.csx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
public class Script : ScriptBase
{
public override async Task<HttpResponseMessage> ExecuteAsync()
{
addBearerPrefix();

var response = await Context.SendAsync(Context.Request, CancellationToken)
.ConfigureAwait(continueOnCapturedContext: false);

return response;
}

private void addBearerPrefix() {
var headerValuesToken = Context.Request.Headers.GetValues("api_key");
var apikey = headerValuesToken.FirstOrDefault<string>();

Context.Request.Headers.Remove("api_key");
Context.Request.Headers.Remove("Authorization");
Context.Request.Headers.TryAddWithoutValidation("Authorization", "Bearer " + apikey);
}
}
Loading