Tax calculation

Calculating net and gross values for prices

put

Supports the following calculation operations for prices:

  • Net to gross values

  • Gross to net values

  • Gross values in one country to gross values in another country

Note: This endpoint calculates net and gross values for prices based on existing tax configurations. To use this endpoint, you need to create tax configurations first.

  • To calculate gross values beetween countries, you need to create tax configurations for both countries.

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Body
commandUuidstringOptional

Calculation command's unique identifier.

Note: This field is optional. If not specified, the commandUuid will be generated by the server.

Responses
200
The request was successful. The calculated value is returned.
application/json
put
PUT /tax/{tenant}/taxes/calculation-commands HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 110

{
  "input": {
    "targetLocation": {
      "countryCode": "DE"
    },
    "targetTaxClass": "STANDARD",
    "includesTax": false,
    "price": 1.59
  }
}
{
  "commandUuid": "cb0d5627-08ef-4de9-a676-a254a4311261",
  "input": {
    "targetCountry": "DE",
    "targetTaxClass": "STANDARD",
    "includesTax": false,
    "price": 1.59
  },
  "output": {
    "netPrice": 1.59,
    "grossPrice": 1.8921,
    "targetTaxRate": 19
  }
}

Was this helpful?