Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.e-cross.tech/llms.txt

Use this file to discover all available pages before exploring further.

Simulate taxes for the items in a cart together with freight, for a given destination country and state.
All input and output monetary values for this API are in the local currency (for example, BRL when country is BR).
curl -X POST 'https://product.api.e-cross.tech/ext/taxes' \
  -H 'Authorization: Bearer YOUR_SALES_CHANNEL_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
        {
            "id": "029c31c8-6576-42fb-a846-5144d2efb3a4",
            "skuId": "1",
            "quantity": 1,
            "unitPriceWithDiscount": 180.00
        }
    ],
    "freight": 50,
    "country": "BR",
    "state": "SP"
}'
{
  "items": [
    {
      "id": "029c31c8-6576-42fb-a846-5144d2efb3a4",
      "skuId": "1",
      "icmsTaxValue": 31.6,
      "importTaxValue": 0,
      "totalTaxValue": 31.6
    }
  ],
  "totals": {
    "icmsTaxValue": 31.6,
    "importTaxValue": 0,
    "totalTaxValue": 31.6
  }
}

How authentication works

This endpoint uses the sales channel token authentication model, not the auth token generated with merchant credentials. The bearer token is provided by e-CROSS to the sales channel during the integration process.
Authorization: Bearer YOUR_SALES_CHANNEL_TOKEN

Headers

Authorization
string
required
Bearer token for the sales channel request. Use the format Bearer YOUR_SALES_CHANNEL_TOKEN.

Request body

items
array
required
Line items to simulate taxes for together.
freight
number
required
Freight value for the cart in local currency, without any shipping discount applied.
country
string
required
ISO 3166-1 alpha-2 destination country code (for example, BR).
state
string
required
Destination state or region code. For countries where taxes depend on state (for example, Brazil), use the correct two-letter state code (for example, SP).

Response fields

items
array
required
One entry per request line, in the same order as requested.
totals
object
required
Aggregates for the whole request.

Errors

The request is missing the Authorization header, the bearer format is invalid, or the token is invalid.