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.
/oauth/entities/connectAccess tokenConnect 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.
{
"entity_id": "64a1b2c3d4e5f6g7h8i9j0k1"
}Body parameters
entity_id | string | optional |
/oauth/entitiesAccess tokenCreate 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.
{
"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": ""
}/oauth/entitiesAccess tokenList 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.
/oauth/entities/{entity_id}Access tokenGet an entity
Fetch a single entity connected to your application.
/oauth/entities/{entity_id}Access tokenUpdate an entity
Update one or more fields of an entity.
{
"city": "Abu Dhabi",
"email": "billing@abccorp.com"
}/oauth/entities/{entity_id}/disconnectAccess tokenDisconnect 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}.
/oauth/entities/{entity_id}Access tokenDelete 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.