Orders ~~~~~~ List orders +++++++++++ .. http:get:: /fast-events/v1/admin/orders Retrieve all orders. You can limit the result-set by setting query-parameters. **Optional query parameters** *event_id* A comma separated string of event ids. For example ``22,45``. Only orders belonging to these events will be included. *_fields* A comma separated string of fields included in the response. For example ``id,name,email``. *per_page* Only return this many items. The default is ``10`` and the maximum is ``100``. *offset* Offset the result set by a specific number of orders. *page* The page number in the collection. *search* Search the ``email`` field. If the string is found in the field the order is included. *include* A comma separated string of order ids. For example ``14732,15341``. Only orders with these ids will be included in the result. *exclude* A comma separated string of order ids. For example ``14732,15341``. Orders with these ids will be excluded from the result. *orderby* Order the result set by ``id``, ``event_id`` or ``email``. The default is ``id``. *order* Ascending (``asc``) is the default. You can set it to ``desc``. **Example request** .. tabs:: .. code-tab:: bash $ curl \ -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT" \ -H "Content-Type: application/json" \ -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \ https://exampledomain.com/wp-json/fast-events/v1/admin/orders .. code-tab:: php "Harry Doe", ])); $result = curl_exec($ch); echo $result; .. code-tab:: python import requests from requests.auth import HTTPBasicAuth URL = 'https://exampledomain.com/wp-json/fast-events/v1/admin/orders/14779' HEADERS = {'X-FE-API-KEY':'3zo58AUYP9zOE6YT'} AUTH = HTTPBasicAuth('test', '4ZAN O5OY OAvZ FZb2 Lslv JnJG') JSON = {'name': 'Harry Doe'} response = requests.put(URL, headers=HEADERS, auth=AUTH, json=JSON) print(response.json()) **Example response** .. sourcecode:: json { "custom_status": "", "name": "Harry Doe", "email": "John@Doe999.com", "_links": { "self": [ { "href": "https://exampledomain.com/wp-json/fast-events/v1/admin/orders/14779" } ], "collection": [ { "href": "https://exampledomain.com/wp-json/fast-events/v1/admin/orders" } ] } } **Changelog** .. csv-table:: :header: "Version", "Description" :width: 100% :widths: auto "1.0", "Introduced." ---- Delete order ++++++++++++ .. http:delete:: /fast-events/v1/admin/orders/(integer:id) Delete a single email list. **Example request** .. tabs:: .. code-tab:: bash $ curl \ -X DELETE \ -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT" \ -H "Content-Type: application/json" \ -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \ https://exampledomain.com/wp-json/fast-events/v1/admin/orders/14779 .. code-tab:: php ` and :doc:`ticket_types ` endpoints. Include **all ticket_types** in the request and set them to 0 if you don't want to order a specific ticket_type. **Example request** .. tabs:: .. code-tab:: bash $ curl \ -X POST \ -H "X-FE-API-KEY: 3zo58AUYP9zOE6YT" \ -H "Content-Type: application/json" \ -u "test:4ZAN O5OY OAvZ FZb2 Lslv JnJG" \ -d '{"event_id":65,"name":"John Doe","email":"John999@doe999.com","fields":[],"amount":"2.50","tickets":[{"v14a1f":1}]}' \ https://exampledomain.com/wp-json/fast-events/v1/admin/orders .. code-tab:: php 65, "name" => "John Doe", "email" => "John999@doe999.com", "fields" => [], "amount" => "2.50", "tickets" => [ [ "v14a1f" => 1 ] ] ])); $result = curl_exec($ch); echo $result; .. code-tab:: python import requests from requests.auth import HTTPBasicAuth URL = 'https://exampledomain.com/wp-json/fast-events/v1/admin/orders' HEADERS = {'X-FE-API-KEY':'3zo58AUYP9zOE6YT'} AUTH = HTTPBasicAuth('test', '4ZAN O5OY OAvZ FZb2 Lslv JnJG') JSON = { 'event_id': 65, 'name': 'John Doe', 'email': 'John999@doe999.com', 'fields': [], 'amount': '2.50', 'tickets': [ {'v14a1f': 1} ] } response = requests.post(URL, headers=HEADERS, auth=AUTH, json=JSON) print(response.json()) **Example response** .. sourcecode:: json { "id": 14824, "event_id": 65, "event_date": "2021-01-31 09:00:00", "payment_id": "", "payment_status": "dashboard", "custom_status": "", "created_at": "2021-01-05 09:24:35", "uid": "mhQhzs4HV1u3GcJUIhmccHvJQtldxWkRBmqpU3Hv", "name": "John Doe", "email": "John999@doe999.com", "input_fields": { "fields": [], "tickets": [ { "name": "Silver", "price": 40.25, "vat": 0, "is_counted": true, "number": 1 } ] }, "num_tickets": 1, "total": 2.5, "discount": 37.75 "ip_address": "3.14.17.20", "_links": { "self": [ { "href": "https://exampledomain.com/wp-json/fast-events/v1/admin/orders/14824" } ], "collection": [ { "href": "https://exampledomain.com/wp-json/fast-events/v1/admin/orders" } ], "tickets": [ { "embeddable": true, "href": "https://exampledomain.com/wp-json/fast-events/v1/admin/tickets/14824" } ] } } **Changelog** .. csv-table:: :header: "Version", "Description" :width: 100% :widths: auto "1.0", "Introduced." "3.0.0", "Added ``amount``."