Update Receipt
You can use this endpoint to update an existing receipt. All fields are optional; only provided fields will be updated.
Request
PATCH /api/v1/receipts/:id
curl --request PATCH \
--url 'https://www.zep-online.de/zepinstanz/next/api/v1/receipts/123' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"note": "Berlin -> Hamburg (Deutsche Bahn) - Business trip",
"project_task_id": 42
}'Optional Fields
All fields are optional. You can update one or multiple fields at once:
- employee_id (string): Username of the employee (max. 255 characters)
- date (string): Receipt date in format
YYYY-MM-DD - performance_date (string, nullable): Performance date in format
YYYY-MM-DD - receipt_type_id (string): Receipt type identifier (max. 255 characters)
- project_id (integer): Project ID
- project_task_id (integer, nullable): Project task ID
- payment_method (string): Payment method (max. 255 characters)
- currency (string): Currency code, e.g. EUR, USD (max. 32 characters)
- is_amount_net (boolean): Indicates whether the amount is net (
true) or gross (false) - is_invoice_amount_net (boolean, nullable): Indicates whether the invoice amount is net (
true) or gross (false). Required if any receiptAmount has invoicing_share > 0 - note (string, nullable): Receipt notes (max. 255 characters)
- receiptAmounts (array): Array of receipt amounts
- tax (number): Tax rate percentage (0-100)
- quantity (number): Quantity (minimum 1)
- amount (number): Amount (minimum 0)
- private_share (number, nullable): Private share amount (minimum 0)
- invoicing_share (number, nullable): Invoicing share amount (minimum 0)
Response
{
"data": {
"id": 123,
"employee_id": "john.doe",
"date": "2024-11-15",
"receipt_type_id": "Train Ticket",
"currency": "EUR",
"invoice_amount_currency": null,
"note": "Berlin -> Hamburg (Deutsche Bahn) - Business trip",
"payment_method": "private",
"breakfast": 0,
"lunch_or_dinner": 0,
"location": null,
"is_amount_net": false,
"is_invoice_amount_net": false,
"billing_status": null,
"performance_date": "2024-11-15",
"client_id": null,
"created": "2024-11-15T14:23:45.000000Z",
"modified": "2024-11-16T09:12:30.000000Z",
"invoice_item_id": null,
"project_id": 456,
"project_task_id": 42,
"ticket_id": null,
"subtask_id": null,
"filename": "receipt_2024_11_15.pdf"
}
}Error Codes
- 401 Unauthorized: Invalid or missing authentication
- 404 Not Found: Receipt with the specified ID was not found
- 422 Unprocessable Entity: Validation error - check your request data
Examples
Update Only the Note
PATCH /api/v1/receipts/123{
"note": "Updated description for the receipt"
}Change Project and Project Task
PATCH /api/v1/receipts/123{
"project_id": 789,
"project_task_id": 15
}Update Receipt Amounts
PATCH /api/v1/receipts/123{
"is_invoice_amount_net": true,
"receiptAmounts": [
{
"tax": 19.0,
"quantity": 1,
"amount": 95.00,
"private_share": 0,
"invoicing_share": 95.00
}
]
}Update Multiple Fields at Once
PATCH /api/v1/receipts/123{
"date": "2024-11-20",
"performance_date": "2024-11-20",
"payment_method": "Company Credit Card",
"note": "Corrected information after consultation",
"project_task_id": 28
}