feat(api): fix POST /invoice
This commit is contained in:
64
README.md
64
README.md
@@ -1 +1,65 @@
|
||||
docker run --rm -p 3030:3000 gotenberg/gotenberg:8
|
||||
|
||||
## Configuration
|
||||
|
||||
This application is configured using a `config.json` file in the root of the project. You can use the `config.json.example` file as a starting point.
|
||||
|
||||
```json
|
||||
{
|
||||
"email": {
|
||||
"smtp": {
|
||||
"host": "smtp.example.com",
|
||||
"port": 587,
|
||||
"username": "user",
|
||||
"password": "password"
|
||||
},
|
||||
"from": "from@example.com"
|
||||
},
|
||||
"pdf": {
|
||||
"hostname": "http://localhost:3030"
|
||||
},
|
||||
"gitea": {
|
||||
"url": "https://gitea.example.com",
|
||||
"token": "your-gitea-token"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### POST /invoice
|
||||
|
||||
Creates a new invoice.
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/json" -d '{
|
||||
"debtor": {
|
||||
"name": "John Doe",
|
||||
"Address": {
|
||||
"street": "Musterstrasse",
|
||||
"number": "1",
|
||||
"zipCode": "1234",
|
||||
"place": "Musterstadt",
|
||||
"country": "CH"
|
||||
},
|
||||
"contact": "john.doe@example.com"
|
||||
},
|
||||
"creditor": {
|
||||
"name": "Jane Doe",
|
||||
"Address": {
|
||||
"street": "Beispielweg",
|
||||
"number": "2",
|
||||
"zipCode": "5678",
|
||||
"place": "Beispielhausen",
|
||||
"country": "CH"
|
||||
},
|
||||
"contact": "jane.doe@example.com",
|
||||
"iban": "CH1234567890123456789"
|
||||
},
|
||||
"durationThreshold": "1h",
|
||||
"hourlyRate": 100,
|
||||
"repositories": [
|
||||
"lou-taylor/accounting"
|
||||
]
|
||||
}' http://localhost:8080/invoice
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user