OAuth 2.0 · v1.0UAE Peppol NetworkREST · JSON

Taxstar E-Invoice OAuth API

Integrate your software with the Taxstar E-Invoice platform. One API to register applications, manage users and companies, and dispatch legally compliant invoices to the UAE Peppol network — all secured with OAuth 2.0 client credentials.

Base URL

https://integration-einv.taxstar.app/api

All endpoints are relative to this base. Every resource endpoint requires Authorization: Bearer <access_token>.

API overview

All 33 endpoints across 7 resource groups. Click a card to go to the full reference.

Applications
8 endpoints

Register OAuth apps, obtain client credentials, rotate secrets, and track per-app activity. New apps start as PENDING and require admin approval before tokens can be issued.

  • POST /oauth/apps — create an app
  • GET /oauth/apps — list your apps
  • POST /oauth/apps/{id}/regenerate-secret — rotate secret
  • POST /oauth/apps/{id}/activate|deactivate
View reference
Token
2 endpoints

Exchange client credentials for a short-lived access token and a refresh token. Use the refresh token to get a new access token without re-supplying credentials.

  • POST /oauth/token grant_type=client_credentials
  • POST /oauth/token grant_type=refresh_token
View reference
Identity
1 endpoint

Inspect the application behind the current access token. Useful for debugging and validating that the right credentials are in use.

  • GET /oauth/me — return app identity
View reference
Users
3 endpoints

Create end-users scoped to your application. Users own their own entities and invoices. A user can even create further users, letting you build a hierarchy within one app.

  • POST /oauth/users — create a user
  • GET /oauth/users — list users
  • GET /oauth/users/{id} — get a user
View reference
Entities
5 endpoints

Register companies (entities) that will issue invoices on the UAE Peppol network. Each entity holds its TRN, address, and contact details and can be owned by any user of your app.

  • POST /oauth/entities — create an entity
  • GET /oauth/entities — list entities
  • PATCH /oauth/entities/{id} — update
  • DELETE /oauth/entities/{id} — delete
View reference
Invoices
7 endpoints

Create, validate, and dispatch invoices to the UAE Peppol network. Send one invoice or a batch of invoices in a single call. Also list and inspect sent and received invoices.

  • POST /oauth/invoices — push a single invoice
  • POST /oauth/invoices/bulk — push multiple at once
  • GET /oauth/invoices/sent — list sent invoices
  • GET /oauth/invoices/received — list received invoices
View reference
Webhooks
7 endpoints

Register HTTPS endpoints and subscribe to invoice lifecycle events. Taxstar signs every payload so you can verify it came from us. Rotate secrets at any time without downtime.

  • POST /oauth/webhooks — create an endpoint
  • PATCH /oauth/webhooks/{id} — update subscription
  • POST /oauth/webhooks/{id}/rotate-secret
  • DELETE /oauth/webhooks/{id} — remove
View reference

Key features

Capabilities beyond simple CRUD — built for production invoice automation.

Bulk invoice sending

POST /oauth/invoices/bulk accepts an array of invoice objects. Each is processed independently — one failure never blocks the rest. Returns HTTP 207 with per-item status codes.

Signed webhook events

Subscribe to invoice.sent, invoice.delivered, invoice.failed, invoice.received, and invoice.status_changed. Every payload carries an HMAC signature so you can verify authenticity.

UAE Peppol network

Invoices are dispatched via the UAE national Peppol framework. The API handles XML generation, schema validation (EN 16931 + BTUAE), and network delivery.

OAuth 2.0 client credentials

Standard grant_type=client_credentials flow. Tokens are short-lived; refresh tokens rotate on every use. Secret rotation is non-disruptive — the old secret stops working immediately.

Multi-user hierarchy

One application can own many users. Each user owns their own entities and invoices. Pass created_by_user_id on POST /oauth/users to build a tree of sub-accounts under one app.

Async processing pipeline

After POST /oauth/invoices returns 202, the invoice moves through a Temporal workflow: validate → generate XML → deliver. Track progress with GET /oauth/invoices/sent/{id}.

Ownership model

Every resource belongs to your application. Within it, users own entities, and entities own invoices. You can omit the user_id on most calls to attribute everything directly to the application owner — handy for simple single-tenant integrations.

Application

client_id + client_secret

owns all resources; must be approved

Users

optional sub-accounts

each user can own their own entities

Entities

companies / TRNs

the invoice sender; holds TRN & address

Invoices

sent & received

scoped to an entity; tracked per-app

Response codes

All errors return a JSON body with an error key. Validation errors return an array of field-level messages.

CodeStatusMeaning
200OKSuccessful GET / PATCH / DELETE
202AcceptedInvoice queued for async processing
207Multi-StatusBulk invoice results (per-item codes inside)
400Bad RequestValidation failed — see error field
401UnauthorizedMissing or expired access token
404Not FoundResource does not exist or does not belong to your app
409ConflictDuplicate invoice number for the same entity
502Bad GatewayPeppol network delivery failed

Authentication

All resource endpoints (Users, Entities, Invoices, Webhooks) require an Authorization: Bearer <access_token> header. Application management endpoints (POST /oauth/apps and related) require a developer login token instead. The Token endpoint itself is public — no auth header needed to exchange credentials.