Usage

To use data and mechanisms provided by Taxamo, it is required to use the RESTful API. Taxamo.js JavaScript API, plugins and PSP integration mechanisms - they all use the very same RESTful API operations underneath.

Before using the Taxamo RESTful API, merchants should also consult the reference documentation.

API conventions

Taxamo’s API follows standard REST conventions, so:

  • it is available through HTTPS,
  • operations are grouped around resources – transaction, VAT, stats, etc.
  • HTTP verbs and paths map to operations in a coherent way (e.g. POST / – create resource instance, PUT /:id – update resource instance),
  • API version is set in the url – for example /api/v1 designates version 1.

More information

Authenticating calls

API calls are authenticated using either public or private tokens, which can be retrieved from API setting in merchant dashboard.

Depending on the scope of a token – test or production, calls are applied to appropriate data set. Test tokens are available immediately upon account activation, and production tokens are generated once billing details are provided.

More information

Swagger

Taxamo API is compliant with Swagger RESTful API specification v1.2, meaning that:

JSON Schema

Taxamo API also provides JSON Schema definitions to define endpoint’s input and output. The same data source is used for validation of the input.

To view each endpoint’s schema, merchants need to provide additional query string parameters:

  • json_input_schema=1 if merchants want to retrieve input JSON schema
  • json_ouput_schema=1 if merchants want to retrieve output JSON schema instead

As some endpoints are bound to other HTTP verbs – POST, PUT, DELETE, etc, there is also convenience query string parameter that can be used to mark usage of specific HTTP verb:

  • http_verb=post – simulates POST HTTP verb
  • http_verb=put – simulates PUT HTTP verb
  • http_verb=delete – simulates DELETE HTTP verb

Please note, that this parameter will work only in conjunction with json_input_schema orjson_output_schema parameter.

For example:

Each API endpoint documentation contains a link to its JSON Schema specification.