Laravel REST API
Bearer Token Authentication, PDF Generation and ZUGFeRD 2.0 E-Invoicing
Authentication
Protected endpoints require a Bearer Token in the Authorization header.
Health Check
Checks if the API is available.
Login
Authenticates a user and returns a Bearer Token.
| Name | Type | Description |
|---|---|---|
email* | string | Email address |
password* | string | Password |
device_name | string | Optional token name (default: "api-token") |
expires_at | string | Optional expiration date (e.g., "2025-12-31 23:59:59") |
expires_in_days | integer | Optional days until expiration (1-365) |
User Info
Returns information about the authenticated user.
Logout
Invalidates the current token.
Ping
Protected health check with user info.
Create Personal Access Token
Creates a new personal access token with optional expiry date. Similar to GitHub's personal access tokens.
| Name | Type | Description |
|---|---|---|
name* | string | Token name/description (max 255 chars) |
expires_at | string | Specific expiration date (e.g., "2025-12-31 23:59:59") |
expires_in_days | integer | Days until expiration (1-365) |
expires_at or expires_in_days can be provided. If neither is provided, the token will not expire.
List Personal Access Tokens
Returns all personal access tokens for the authenticated user.
Revoke Token
Revokes (deletes) a specific personal access token by ID.
| Name | Type | Description |
|---|---|---|
tokenId* | integer | Token ID to revoke |
Revokes all personal access tokens for the authenticated user.
Standard PDF
Generates a test invoice as PDF.
ZUGFeRD PDF
ZUGFeRD 2.0 compliant e-invoice according to EN16931 with embedded XML.
ZUGFeRD XML
Returns only the ZUGFeRD XML.