API reference

Entities

Register and manage companies (entities) that will send invoices. You can create new entities directly via the API, or connect entities you already have in the Tax Star E-Invoice application. Each entity is owned by a user of your application. Requires an access token.

POST/oauth/entities/connectAccess token

Connect an existing entity

Connect a company you already registered in the Tax Star E-Invoice application to this OAuth app. The entity must be owned by the same account that owns your application — find your entity IDs on the entity details page at einv.taxstar.app. After connecting, the entity appears in GET /oauth/entities and can be used as entity_id in all invoice API calls. This operation is idempotent — calling it again on an already-connected entity returns success.

Request body example
{
  "entity_id": "64a1b2c3d4e5f6g7h8i9j0k1"
}

Body parameters

entity_idstringoptional
POST/oauth/entitiesAccess token

Create an entity

Register a new company directly through the API. TRN must be exactly 15 characters and unique. Omit user_id and the entity is owned by the application owner (the default — you create the entity for yourself). To create the entity on behalf of one of your users, set user_id to that user's id (from POST /oauth/users); it must belong to this same application.

Request body example
{
  "company_name": "ABC Corporation",
  "trn": "123456442311611",
  "country": "United Arab Emirates",
  "state": "Dubai",
  "city": "Dubai",
  "area": "Downtown",
  "postal_code": "12345",
  "mobile": "+971501234567",
  "landline": "+97143210000",
  "email": "info@abccorp.com",
  "email_notifications_enabled": true,
  "user_id": ""
}
GET/oauth/entitiesAccess token

List entities

Return all entities connected to your application — both created via the API and connected from the Tax Star platform. Pass user_id to return only the entities owned by a specific user.

GET/oauth/entities/{entity_id}Access token

Get an entity

Fetch a single entity connected to your application.

PATCH/oauth/entities/{entity_id}Access token

Update an entity

Update one or more fields of an entity.

Request body example
{
  "city": "Abu Dhabi",
  "email": "billing@abccorp.com"
}
DELETE/oauth/entities/{entity_id}/disconnectAccess token

Disconnect an entity

Remove the OAuth application link from an entity. The entity remains in the Tax Star platform but is no longer accessible via this application's API. Use this for entities that were connected (not created) via the API. To permanently remove an entity use DELETE /oauth/entities/{entity_id}.

DELETE/oauth/entities/{entity_id}Access token

Delete an entity

Permanently soft-delete an entity created by your application. For entities that were connected (not created) via the API, use /disconnect instead to preserve the entity in the platform.