post
https://api.duodeal.app/api/taxes
Creates a new tax rate.
Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Tax name (e.g., "VAT 20%", "GST 10%") |
rate | float | Yes | Tax rate as decimal between 0 and 1 (0.20 = 20%) |
byDefault | boolean | No | Set as default tax rate (default: false) |
Rate Examples
| Percentage | Rate Value |
|---|---|
| 0% (exempt) | 0 |
| 5.5% | 0.055 |
| 10% | 0.10 |
| 20% | 0.20 |
Response Fields
| Field | Type | Description |
|---|---|---|
id | integer | Newly created tax unique identifier |
name | string | Tax name |
rate | float | Tax rate as decimal |
byDefault | boolean | Whether this is the default tax rate |
createdAt | datetime | Creation timestamp |
updatedAt | datetime | Last update timestamp |
Response
201 Created: Tax successfully created400 Bad Request: Invalid request body or validation error (rate must be between 0 and 1)401 Unauthorized: Invalid or missing API key
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
201Resource created
400Bad request
401Unauthorized
