Improve API stock action endpoint response (closes #769)

This commit is contained in:
Bernd Bestel
2020-12-20 14:43:07 +01:00
parent cef3086a63
commit a5326aa95c
10 changed files with 94 additions and 45 deletions

View File

@@ -194,6 +194,19 @@
- The field `expiring_products` was renamed to `due_products`
- The field `expired_products` now only contains expired products (so them with `Due date type = Expiration date`)
- The new field `overdue_products` contains only overdue products (so them with `Due date type = Best before date`)
- The following endpoints now return all bookings of the transaction (so the response is now an array, was before a single stock booking - and a random one if the transaction affected multiple stock entries)
- PUT `/stock/entry/{entryId}`
- POST `/stock/products/{productId}/add`
- POST `/stock/products/{productId}/consume`
- POST `/stock/products/{productId}/transfer`
- POST `/stock/products/{productId}/inventory`
- POST `/stock/products/{productId}/open`
- POST `/stock/products/by-barcode/{barcode}/add`
- POST `/stock/products/by-barcode/{barcode}/consume`
- POST `/stock/products/by-barcode/{barcode}/transfer`
- POST `/stock/products/by-barcode/{barcode}/inventory`
- POST `/stock/products/by-barcode/{barcode}/open`
- (The response is the same as if you would fetch the stock transaction via `/stock/transactions/{transactionId}`)
- For better integration (apps), it's now possible to show a QR-Code for API keys (thanks @fipwmaqzufheoxq92ebc)
- New QR-Code button on the "Manage API keys"-page (top right corner settings menu), the QR-Codes contains `<API-Url>|<API-Key>`
- And on the calendar page when using the button "Share/Integrate calendar (iCal)", there the QR-Codes contains the Share-URL (which is displayed in the textbox above)