initial implementation

This commit is contained in:
Lukas Bockstaller
2026-01-26 14:23:16 +01:00
parent fd5dd989f7
commit 4a0884aaca
4 changed files with 116 additions and 92 deletions

View File

@@ -1719,6 +1719,13 @@ List of all order positions
:statuscode 401: Authentication failure
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
.. http:get:: /api/v1/organizers/(organizer)/orderpositions/
Returns a list of all order positions.
It works in the same way as :http:get:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/`
but does not make use of the event parameter, operating across all order positions of an organizer.
Fetching individual positions
-----------------------------
@@ -1820,6 +1827,12 @@ Fetching individual positions
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
:statuscode 404: The requested order position does not exist.
.. http:get:: /api/v1/organizers/(organizer)/orderpositions/(id)/
Returns information on one order position, identified by its internal ID.
It works in the same way as :http:get:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)`
but does not make use of the event parameter, operating across all order positions of an organizer.
.. _`order-position-ticket-download`:
Order position ticket download
@@ -1872,6 +1885,12 @@ Order position ticket download
:statuscode 409: The file is not yet ready and will now be prepared. Retry the request after waiting for a few
seconds.
.. http:get:: /api/v1/organizers/(organizer)/orderpositions/(id)/download/(output)/
Download tickets for one order position, identified by its internal ID.
It works in the same way as :http:get:`/api/v1/organizers/(organizer)/orderpositions/(id)/download/(output)/`
but does not make use of the event parameter, operating across all order positions of an organizer.
.. _rest-orderpositions-manipulate:
Manipulating individual positions
@@ -1964,6 +1983,12 @@ Manipulating individual positions
:statuscode 401: Authentication failure
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to update this order.
.. http:patch:: /api/v1/organizers/(organizer)/orderpositions/(id)/
Updates specific fields of an order position.
It works in the same way as :http:patch:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/`
but does not make use of the event parameter, operating across all order positions of an organizer.
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/
Adds a new position to an order. Currently, only the following fields are supported:
@@ -2043,6 +2068,12 @@ Manipulating individual positions
:statuscode 401: Authentication failure
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to create this position.
.. http:post:: /api/v1/organizers/(organizer)/orderpositions/
Adds a new position to an order.
It works in the same way as :http:post:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/`
but does not make use of the event parameter, operating across all order positions of an organizer.
.. http:delete:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/
Cancels an order position, identified by its internal ID.
@@ -2071,6 +2102,12 @@ Manipulating individual positions
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
:statuscode 404: The requested order position does not exist.
.. http:delete:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/
Cancels an order position, identified by its internal ID.
It works in the same way as :http:delete:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/`
but does not make use of the event parameter, operating across all order positions of an organizer.
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/add_block/
Blocks an order position from being used. The block name either needs to be ``"admin"`` or start with ``"api:"``. It
@@ -2109,6 +2146,12 @@ Manipulating individual positions
:statuscode 401: Authentication failure
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to update this order position.
.. http:post:: /api/v1/organizers/(organizer)/orderpositions/(id)/add_block/
Blocks an order position from being used.
It works in the same way as :http:post:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/add_block/`
but does not make use of the event parameter, operating across all order positions of an organizer.
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/remove_block/
Unblocks an order position from being used. The block name either needs to be ``"admin"`` or start with ``"api:"``. It
@@ -2147,6 +2190,12 @@ Manipulating individual positions
:statuscode 401: Authentication failure
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to update this order position.
.. http:post:: /api/v1/organizers/(organizer)/orderpositions/(id)/remove_block/
Unblocks an order position from being used.
It works in the same way as :http:post:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/remove_block/`
but does not make use of the event parameter, operating across all order positions of an organizer.
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/printlog/
Creates a print log, stating that this ticket has been printed.
@@ -2200,6 +2249,13 @@ Manipulating individual positions
:statuscode 409: The file is not yet ready and will now be prepared. Retry the request after waiting for a few
seconds.
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/printlog/
Creates a print log, stating that this ticket has been printed.
It works in the same way as :http:post:`/api/v1/organizers/(organizer)/events/(event)/orderpositions/(id)/printlog/`
but does not make use of the event parameter, operating across all order positions of an organizer.
Changing order contents
-----------------------